smarter return values for Bluebird.promisify

I created a lib and I would like to provide the consumers of my lib an easy way to promisify it
as it is now, it looks like:
var Pool = require('poolio');
var Promise = require('bluebird');

var pool = new Pool({
    filePath: 'child.js',
    size: 4
});

pool.any = Promise.promisify(pool.any);  //unfortunately, this line has to be separate from the above new Pool() line, furthermore, I have to call 'pool.any = Promise.promisify(pool.any);' for every instance of new Pool()...

pool.any({

    dogs: 2,
    cats: 6,
    birds: 'seven'

}).then(function (result) {
    console.log('result:', result);
    return 'boogie';
}).then(function (result) {
    console.log(result);
}).catch(function (err) {
    console.error('error:', err);
});

but what if it could look like:
var Pool = require('poolio');
var Promise = require('bluebird');

var pool = Promise.promisify(new Pool({
    filePath: 'child.js',
    size: 4
}), ['any']);

so basically
Promise.promisify would return the pool object in the call instead of just returning the pool.any function in the call, that way we can save lines of code and also specify exactly what functions to promisify in the array (second argument).
do you follow?

Have you tried promisifyAll ?

I haven't, but in this case I just want to promisify one function, but I want to do the promisification in one line of code. Using a second argument which passes which function(s) to promisify would allow it to happen in one line of code, but otherwise as it stands I have to do it in two.

@ORESoftware the convention when promisifing is to augment rather than replace the original methods. This is usually better because it ensures that anything that depends on the original callback based API keeps on working. In your case, it's better to do something like this:
var Pool = require("poolio");
var Bluebird = require("bluebird");

Bluebird.promisifyAll(Pool.prototype);

var pool = new Pool();
pool.anyAsync({}).then(console.log);

ah yes, that is nice, that works better than anything else, thanks

although that's kind of weird, because
(a) it makes async versions of prototype functions that are straight sync, and never need to be synchronous
(b) it creates the new function anyAsync, whereas promisify just alters the original function, wonder why that is?
I actually do want a "promisifySome" function

for example, here is my whole lib:
var cp = require('child_process');
var _ = require('underscore');
var path = require('path');
var debug = require('debug')('poolio');
var colors = require('colors/safe');

var id = 0;

function Pool(options) {

    this.kill = false;

    this.all = [];
    this.available = [];
    this.msgQueue = [];
    this.callbacks = [];

    this.counter = 0;

    var opts = _.defaults(options, {
        size: 1,
        pool_id: '@pool_' + id++
    });

    for (var option in opts) {
        if (opts.hasOwnProperty(option)) {
            this[option] = opts[option];
        }
    }

    for (var i = 0; i < this.size; i++) {
        var n = cp.fork(path.resolve(__dirname + '/' + this.filePath));
        this.available.push(n);
        this.all.push(n);
    }

    var self = this;
    this.available.forEach(function (cp) {
        cp.on('message', function (data) {
            switch (data.msg) {
                case 'done':
                    var workId = cp.workId;
                    delegateCP.bind(self)(cp);
                    handleCallback.bind(self)(workId, data);
                    break;
                default:
                    console.log(colors.bgYellow('warning: your Poolio worker sent a message that was not recognized.'));
            }
        });
    });

}

function findRemoveAndReturn(workId) {

    var ret = null;

    for (var i = 0; i < this.callbacks.length; i++) {
        if (this.callbacks[i].workId === workId) {
            ret = this.callbacks[i].cb;
            break;
        }
    }

    this.callbacks = this.callbacks.splice(i - 1, 1);
    return ret;

}

function handleCallback(workId, data) {

    if (workId === -1) {
        debug('no cb passed so do nothing');
        return;
    }

    var cb = findRemoveAndReturn.bind(this)(workId);

    if (cb) {
        if (data.error) {
            cb(new Error(data.error));
        }
        else {
            cb(null, data.result);
        }
    }
    else {
        debug(colors.bgRed('this shouldnt happen'));
    }
}

function delegateCP(cp) {

    if (this.kill) {
        cp.send('SIGTERM');
        return;
    }

    if (this.msgQueue.length > 0) {
        var obj = this.msgQueue.shift();
        cp.workId = obj.workId;
        cp.send(obj.msg);
    }
    else {
        debug(colors.yellow('worker is available and is back in the pool'));
        delete cp.workId;
        this.available.push(cp);
        debug('pool size for pool ' + this.pool_id + ' is: ' + this.available.length);
    }
}

Pool.prototype.any = function (msg, cb) {

    if (this.kill) {
        console.log('warning: pool.any called on pool of dead/dying workers');
        return;
    }

    debug('current available pool size for pool_id ' + this.pool_id + ' is: ' + this.available.length);

    var workId = this.counter++;

    if (typeof cb === 'function') {
        this.callbacks.push({
            workId: workId,
            cb: cb
        });
    }
    else {
        workId = -1;
    }

    if (this.available.length > 0) {
        var cp = this.available.shift();
        cp.workId = workId;
        cp.send(msg);
    }
    else {
        this.msgQueue.push({
            workId: workId,
            msg: msg
        });
    }

};

Pool.prototype.killAll = function () {

    this.kill = true;
    this.available.forEach(function (cp) {
        cp.kill();
        //cp.send('SIGTERM');
    });

};

Pool.prototype.killAllImmediate = function () {

    this.kill = true;
    this.all.forEach(function (cp) {
        cp.kill();
        //cp.send('SIGTERM');
    });

};

module.exports = Pool;

as you can see, killAll and killAllImmediate don't need asynchronous versions, but the any function could be promisified.

(b) The reason why it doesn't replace the original functions is that they may call to other original functions while assuming those are callback based (via this.otherOriginalFunction(arg, cb))
Regrading (a), promisifyAll takes options, one of which is filter which lets you write a predicate to decide whether a function should be promisified or not.

thanks, I will do more work to see if I can make due

my goal is to create a simple lib with error-first callbacks only but to also show a simple way for users to promisify my lib if they want to. aka, I don't want to include Bluebird as a hard dependency in my lib, so if users want to use Bluebird to promisify my lib, they can and hopefully in one line with the prototype not needing to do it with each instance of Pool.

look into filter and promisifier options of promisifyAll


Added key-features to config.json

Reviving PR #953 by @sshine, which was created to resolve issue #938: Add key features. The PR already had all six key features written but was closed before it got merged. I started where that PR ended, with the same goal, and have made the following changes:

Removed "features" prefix from icon names so they match names in the icon library.
Replaced language-specific jargon, as encouraged in the spec.
Changed "lazy" icon for the "Non-strict" feature to "evolving" to match an existing icon that vaguely conveys the concept (ie. planting a seed that will sprout later). The original pull request suggested that referring to icons that don't yet exist is okay, but I'm not confident about the outcome of that, so have erred on the side of working now, modifiable later.

Same for "strongly-typed" -> "statically-typed".
Same for "type-inference" -> "fun".
Same for "type-classes" -> "extensible".
Same for "algebraic-data-types" -> "powerful".

Oops, created PR to wrong repo.


[Feature Request]: Support AZAPI Provider 2.0

Feature Description
azapi 2.0 provider has been released with introduces some breaking changes.
Ref: https://github.com/cloudeteer/terraform-azurerm-vm/pull/30
Biggest change to mention: no more json, no jsondecode is manatory.
Use Case
Keep dependencies up2date
Additional Information
No response
Privacy Statement

[x] I agree

Code of Conduct

[x] I agree to follow this repository's Code of Conduct

👀 Announcing AzAPI 2.0


[MM-34163][MM-34165] - UI fixes to direct channel profile pics

Summary
This PR addresses minor UI fixes to direct channel profile picture.

Removes status icon from bot accounts
Reduce spacing between icon and label

Ticket Link
https://mattermost.atlassian.net/browse/MM-34165
https://mattermost.atlassian.net/browse/MM-34163

Updated @matthewbirtch


Option to have ping dots not pulse

Description
Personally, I find the ping dots useful, but their subtle pulsing a little annoying.  It would be nice to be able to have them be static colors rather than moving for my ADHD :) .  Is there a way to do this easily ?
Priority
Low (Nice-to-have)

Hi, yes we can add a setting to disable the animation.

Yay.  I couldn't find an easy way to do this myself.. but i'm not particularly skilled at making adblock type rules for this type of thing.

You do not need adblock rules for that - you need CSS. Altough this would be possible, I think it's better to implement this directly into Homarr.

Yea, I agree that applying and remembering custom CSS filters would be a pain.. and teaching people how would also be necessary.  Much cleaner to do it upstream :)

+1
I agree with this too.


refactor(config): enhance config files adapting to docker containers

Is your feature request related to a problem? Please describe.
In the current Cactus codes, the config settings are written in local config files.
However, in the case of maintaining codes on servers such as docker containers, it is desirable to manage the settings under the "/etc/cactus/..." in the server according to Linux filesystem.
Describe the solution you'd like
To refactor the configs settings in order to solve the above issues.

done by #719
closed


IronicInspector: Remove unused IronicPythonAgentImage

/test ironic-operator-build-deploy-kuttl

Ugh, this does not look right. What is placing IPA images in Inspectors http folder?
I get the feeling we need to add an initcontainer using the IPA image in inspector instead.
pkg/ironicinspector/initcontainer.go pkg/ironicinspector/statefulset.go#L265
@steveb Am I missing something related to the change to use IPA image instead of the http_get script we had earlier?

I created https://github.com/openstack-k8s-operators/ironic-operator/pull/328 - I think we need that to ensure IPA is copied to Inspectors HTTP server.

I'm closing this in favor of https://github.com/openstack-k8s-operators/ironic-operator/pull/328 .


Significantly improve performance of row decoding.

Motivation:

PostgreSQLRowDecoder: _KeyedDecodingContainer.decode is called once for each key on the decoded object. With the current implementation, this performs a linear search on the row dictionary, which results in a total runtime (per object) of O(keys * columns), i.e. quadratic runtime ~O(keys^2). We replace the current linear search with one or two dictionary lookups if tableOID != 0, resulting in linear runtime (per object) in the number of keys (provided dictionary lookups can be assumed to take roughly constant time).
PostgreSQLConnection.TableNameCache: Most lookups are tableName -> OID. We accelerate that lookup by preparing a dictionary for that kind of lookup ahead of time, again replacing linear search.

Effect:
The time required for decoding ~5k objects with 9 fields each drops from ~0.4s on a Core i7-6700k (Release build) to ~0.2s, effectively doubling throughput. Optimization 1 contributes ~130 ms, Optimization 2 contributes ~70ms.

Can this be applied to MySQL as well or is it Postgres specific?

@mcdappdev looks like https://github.com/vapor/mysql/blob/master/Sources/MySQL/Codable/MySQLRowDecoder.swift is doing a linear search as well (firstValue(forColumn:), so Optimization 1. Not sure if a table name cache is being used in the MySQL driver, so Optimization 2 might not apply.

Cool... @tanner0101 thoughts?

@MrMage Are you able to include the performance tests you're running?
Great work btw!

@MrMage Are you able to include the performance tests you're running?

My tests were run with production code and data, so I'm afraid I can't share them. Also, I'm not sure whether Fluent has a good way to observe and record performance improvements/regressions, anyway. (There is https://github.com/vapor/fluent/tree/3/Sources/FluentBenchmark/Benchmarks, but I don't see how changes in these benchmarks' performance would be exposed and recorded.)

Added another micro-optimization (implementing decodeIfPresent to avoid two dictionary lookups). Further gains might be had from overriding all the methods in KeyedDecodingContainerProtocol for the types which have specializations (Bool, String, Double, Int, etc.), provided PostgreSQLDataDecoder.decoded is being specialized in the same fashion.

@MrMage Working on something right now to track performance metrics
https://github.com/vapor/bot-github
https://github.com/vapor/routing/pull/66#issuecomment-466966608
Hoping to have the bot redeployed tomorrow and then integrated with this repo so we can get you some charts :)

@twof sounds good; let me know how to use that bot when its done (and where to add tests to showcase the performance gains; they would be most apparent for DBs with many tables and/or tables with many columns).

they would be most apparent for DBs with many tables and/or tables with many columns

We should add some performance tests for specifically this use case. Most of them end up being against dummy models with very few columns which gives unrealistic results.
Generally, this should be less of a problem in Fluent 4 since we will no longer be decoding all model properties by default. Properties will be decoded lazily on an as needed basis. (i.e., user.name.get()). However, it might be worth optimizing PostgresRow's value fetch method. Maybe we can use a dictionary here? Here's the relevant code in NIOPostgres which we will be using for PostgresKit 2.0:
https://github.com/vapor/nio-postgres/blob/master/Sources/NIOPostgres/Data/PostgresRow.swift#L16

Postgres sends back one RowDescription per query. That's why I made PostgresRow.LookupTable a class type. That way we can share it between rows without worrying about copying.
So we should be able to create a lookup dictionary once (we can even do it lazily), then re-use for all rows. That should be an even bigger performance win than is possible in the current version.

Sounds great! Is there any possibility of backporting the re-use of the column description to Fluent 3 as well?

On 12. Mar 2019, at 19:14, Tanner<EMAIL_ADDRESS>wrote:
Postgres sends back one RowDescription per query. That's why I made PostgresRow.LookupTable a class type. That way we can share it between rows without worrying about copying.
So we should be able to create a lookup dictionary once (we can even do it lazily), then re-use for all rows. That should be an even bigger performance win than is possible in the current version.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I'm not sure, it might be.
Is this PR ready to merge? I've reverted #117 so the 1 branch should be good to go.

This PR is ready to merge; I had just been waiting for better benchmark infrastructure to demonstrate the improvements with hard numbers (and possibly add a benchmark case for this first). It the benchmark infrastructure is already working, please let me know (a pointer to the instructions would be app).

On 12. Mar 2019, at 19:55, Tanner<EMAIL_ADDRESS>wrote:
I'm not sure, it might be.
Is this PR ready to merge? I've reverted #117 so the 1 branch should be good to go.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I looked into adding the performance testing bot to 1 and it looks like it won't be possible without a significant amount of work. @testable is not usable with swift build -c release on Linux for some reason, and a lot of our tests use internal types. We'll need to find a way around this. But I don't want that to hold up this PR, so I think we should go ahead and merge if you all agree.

I'm fine with merging now; however we still have two options left that we could discuss first:

Run benchmarks in Debug mode. This won't give us 100% accurate data, but trends and changes in algorithmic complexity (eg from quadraric to linear should become apparent).
Run benchmarks in Release mode, as part of a separate target. We should be able to create realistic testing scenarios without having to rely on internal APIs, after all.

On 12. Mar 2019, at 21:53, Tanner<EMAIL_ADDRESS>wrote:
I looked into adding the performance testing bot to 1 and it looks like it won't be possible without a significant amount of work. @testable is not usable with swift build -c release on Linux for some reason, and a lot of our tests use internal types. We'll need to find a way around this. But I don't want that to hold up this PR, so I think we should go ahead and merge if you all agree.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Run benchmarks in Release mode, as part of a separate target. We should be able to create realistic testing scenarios without having to rely on internal APIs, after all.

I like this option, but I'm not sure how we'd do it. Any use of @testable causes build errors when using swift test -c release, and AFAIK you must compile the entire package with each invocation of swift build or swift test.
I think the real solution here is to make @testable work in release mode on Linux.

I like this option, but I'm not sure how we'd do it. Any use of @testable causes build errors when using swift test -c release, and AFAIK you must compile the entire package with each invocation of swift build or swift test.
I think the real solution here is to make @testable work in release mode on Linux.

If meant creating "benchmarks" target with different tests that don't use any @testable APIs. How about that?

@MrMage see my edit, I think swift test -c release -Xswiftc -enable-testing might work

Our bot is built on XCTest.measure so it would be a significant amount of work to start doing testing in executable targets.

Merging this into a local branch so that I can merge latest changes.

Hey @MrMage, you just merged a pull request, have a coin!
You now have 13 coins.

Our bot is built on XCTest.measure so it would be a significant amount of work to start doing testing in executable targets.

But couldn't we use XCTest.measure without @testable? I.e. have an extra "benchmarks" test target with custom benchmark code that does not use @testable? (Trying -Xswiftc -enable-testing is also an option, of course, but I feel like we should be able to get by without @testable, anyway.


Experiment data and analysis result classes

Summary
This is a replacement of Qiskit/qiskit-terra#5499. Most of the code remains the same, but I renamed ExperimentData to StoredData since qiskit-experiments has its own ExperimentData class. The attributes in StoredData continue to reference "experiment" (e.g. experiment_type), since the DB service is still called experiment service.
Details and comments

What happened to Quality ?

In stored_data.utils.py we have:
def qiskit_version():
    """Return the Qiskit version."""
    try:
        return pkg_resources.get_distribution("qiskit").version
    except Exception:  # pylint: disable=broad-except
        return {"qiskit-terra": terra_version}

There are tests in test_stored_data.py that look for qiskit-terra; these tests fail in environments where the exception doesn't occur.

What happened to Quality ?

I moved it to qiskit-ibmq-provider because those values are ibmq specific. Although a lot of things here are also ibmq specific, so I can duplicate the code here if you'd like.

There are tests in test_stored_data.py that look for qiskit-terra; these tests fail in environments where the exception doesn't occur.

Good catch! It's fixed in e3a2d31

Thanks @nkanazawa1989 for reviewing this! After reading your comments, I decided to make some name changes and hope that'd clear things up a bit.
I renamed the subpackage to database_service, which contains DatabaseService, DbExperimentData, and DbAnalysisResult. Hopefully that emphasize the fact that these classes defines both the format and the interface for data to be stored in a database. This also allows qiskit-experiments to have its own ExperimentData and AnalysisResult.
Let me know if the new names are even more confusing 😅

For example, ExperimentServiceV1.create_experiment seems to create an entry in the database thus experiment should be completed. ... Perhaps those can be renamed more specifically, such as create_experiment_entry.

I can make that change, but it requires changes on the qiskit-ibmq-provider side as well, so I'll do that in the next few days.

Thanks Jessie! I replied to some comments but almost all issues I found are addressed. I do like new module names! :)
Just one more point: Can you describe the relationship between service, analysis result, and experiment data in the module docstring? This would help third party providers to use this framework. Especially, relationship between experimental data and analysis is very IBM-ish (sometime we update a part of analysis result, e.g. quality, without retrieving full experiment -- this is expected use case but based on our experience).

Just one more point: Can you describe the relationship between service, analysis result, and experiment data in the module docstring?

Added in e916c5f.

@nkanazawa1989 @eliarbel @yaelbh I think this is ready to be merged. A few things not yet addressed in this PR:

rename some of the db service methods (e.g. create_experiment to create_experiment_entry)
local support for tagging a figure
adding value, variance, and chisq as separate fields in DbAnalysisResult.

1 & 2 will take a bit of effort, and 3 I need to think a bit more about how it integrates with the analysis classes.

I'll update #115


Crash after not finding img (clearly visible)

The assistant crashes after i click on any button (example dipatch)
Start NIKKE
Start Assistant
Check For game with Assistant
Game gets found
Click DIspatch
Assistant Freezes show Error msg in DialogBox then Freezes turns no responsive and crashes
Win10 64
RTX2080
Ryzen7 2700X
Setup: https://i.gyazo.com/92b67340454a5fae6e657e863a2f7674.jpg

Thanks for the fast review <3
my screen res is 1920x1080 and the game did auto adjust its res after launching the assistant I will try to redo the screenshots later today thanks for the the quick response <3


Add new destination: Highlight.io

Destination name: Highlight.io
Support OpenTelemetry format: yes, see: https://www.highlight.io/docs/getting-started/backend-logging/file
Supported signals: logs

@edeNFed I will work on this

Hello @NewtonFernandis  If you need any help is needed let me know.


Instance placeholder clarification

Clarify that instance placeholder will not replace a node in the editor. Closes https://github.com/godotengine/godot-docs/issues/5504.

Thank you!


Validator should handle HTTPS scheme

When running the validator locally, I noticed that it does not seem to take into account the --scheme parameter:
iiif-validate.py -s example.org --scheme=https -p iiif -i 67352ccc-d1b0-11e1-89ae-279075081939.jp2 --version=2.0 --level=1 -v
The verbose output shows that image requests are being sent to "http://example.org" instead of "https://example.org".
Moreover, test n°14 fails erroneously because the validator expects an HTTP url in the info.json id field.
[14] test info_json FAIL
  url: ['http://example.org/iiif/67352ccc-d1b0-11e1-89ae-279075081939.jp2/info.json']
  got: False
  expected: True
  type: @id is correct URI
  message: Found: https://example.org/iiif/67352ccc-d1b0-11e1-89ae-279075081939.jp2 Expected: http://example.org/iiif/67352ccc-d1b0-11e1-89ae-279075081939.jp2
  Is Warning?: False

This is a different issue as #43.

This is works OK now on the deployed live version:
https://iiif.io/api/image/validator/results/?server=https%3A%2F%2Fccj-iiif.huma-num.fr&prefix=iiif%2Fimage&identifier=JP2%2F67352ccc-d1b0-11e1-89ae-279075081939.jp2&version=2.0&level=1&id_basic=on&id_squares=on&info_json=on&id_error_escapedslash=on&id_error_random=on&id_error_unescaped=on&id_escaped=on&region_error_random=on&region_pixels=on&size_ch=on&size_error_random=on&size_percent=on&size_region=on&size_wc=on&rot_error_random=on&quality_error_random=on&format_jpg=on&format_error_random=on&baseurl_redirect=on&cors=on&jsonld=on
but running from the command line it does show this error... Using the latest version from github master.

Testing with the following command line:
iiif-validate.py -s ccj-iiif.huma-num.fr —-scheme=https -p iiif/image -i JP2/67352ccc-d1b0-11e1-89ae-279075081939.jp2 --version=2.0 --level=1 -q

which is showing the error.

Looks to be an invalid - -- worked OK.


Server-side rendering: Create an API for async data fetching

Our goals on server are:

fetch all data required for current React tree
save data to store
do initial render to string with data resolved (ReactDOM.renderToString())
send DOM string along with the serialized store state to a client

The main problem here is that, if we have several connected components in a tree, we have to use some sort of waterfall fetching - child component cannot fetch its data until all its parents fetch their queries because there might be different components rendered depending on the props received from the queries. That means, we cannot statically analyze the entire tree in advance and fetch all data in one run, which could negatively affect performance.
Need to investigate how relay addresses the same issue and maybe come up with our own solution here.

@wizardzloy I'm thinking this will be my focus late this week / next week. I've got a ton of thoughts on it + react-router integration.
Just curious, what does your stack look like? React / React Router / Meteor?

It's react + react-router + react-apollo. So far the code looks like this:
const express = require('express');
const React = require('react');
const ReactDomServer = require('react-dom/server');
const { createMemoryHistory, match, RouterContext } = require('react-router');
const ApolloClient = require('apollo-client').default;
const { ApolloProvider } = require('react-apollo');

const App = require('./components/App').default;
const { getRoutes } = require('./routes');

const app = express();
const mockGraphQLNetworkInterface = {
  query: () => Promise.resolve({ data: { list: [ 'apple', 'orange' ] }, errors: null })
};
const apolloClient = new ApolloClient({
  networkInterface: mockGraphQLNetworkInterface
});

// Server-Side-Rendering
app.use((req, res) => {

  const history = createMemoryHistory(req.path);
  const routes = getRoutes();

  // Find the correct route
  match({ history, routes, location: req.url }, (err, redirectLocation, renderProps) => {
    if (err) {
      return res.status(500).send(err.message);
    }
    if (redirectLocation) {
      return res.redirect(302, redirectLocation.pathname + redirectLocation.search);
    }
    if (!renderProps) {
      return res.status(404).send('Not found');
    }

    const app = (
        <ApolloProvider client={apolloClient} >
          <RouterContext {...renderProps}/>
        </ApolloProvider>
    );

    const html = ReactDomServer.renderToString(app);

    res.send(html);
  });
});

app.listen(8484, 'localhost', (err) => {
  if (err) {
    console.log(err);
    return;
  }
  console.log('listening on http://<IP_ADDRESS>:8484')
});

@jbaxleyiii Could you, please, share your ideas regarding this topic?

Okay this is going to be a brain dump:
Possible SSR / rehydration methods
Static fetchData on router level component (how we are currently doing it)
// component
import { Component } from 'react';
import { connect } from 'react-apollo';

class Category extends Component {
  static fetchData = (props, location) => {
     return props.query({
        query: gql`
          query getCategory($categoryId: Int!) {
            category(id: $categoryId) {
              name
              color
            }
          }
        `,
        variables: {
          categoryId: 5,
        },
     });
  }

  render() {
    // markup
  }
}

function mapQueriesToProps({ ownProps, state }) {
  return {
    category: {
      query: gql`
        query getCategory($categoryId: Int!) {
          category(id: $categoryId) {
            name
            color
          }
        }
      `,
      variables: {
        categoryId: 5,
      },
      forceFetch: false,
      returnPartialData: true,
    },
  };
};

const CategoryWithData = connect({
  mapQueriesToProps,
})(Category);

// from router tree
<Route path="categories" component={CategoryWithData}/>

// our router addon which populates the store with data
// this is called during render, but before rendering the app to a string
function fetchComponentData(renderProps, reduxStore) {
  const componentsWithFetch = renderProps.components
    // Weed out 'undefined' routes.
    .filter(component => !!component)
    // Only look at components with a static fetchData() method
    .filter(component => component.fetchData);

  if (!componentsWithFetch.length) {
    return;
  }

  // Call the fetchData() methods, which lets the component dispatch possibly
  // asynchronous actions, and collect the promises.
  const promises = componentsWithFetch
    .map(component => component.fetchData(reduxStore.getState, reduxStore.dispatch, renderProps));

  // Wait until all promises have been resolved.
  Promise.awaitAll(promises);
}

Issues with above:

[ ] only hits router level components
[ ] duplicated code between static method and connect function

Router based queries (from apollostack/react-router-apollo draft)
import React from 'react';
import { render } from 'react-dom';
import { Link, browserHistory } from 'react-router';
import { Router, Route, applyRouterMiddleware } from 'react-router';
import apolloMiddleware from 'react-router-apollo';
import ApolloClient from 'apollo-client';

const client = new ApolloClient();

const App = React.createClass({/*...*/})
const About = React.createClass({/*...*/})
// etc.

const Users = React.createClass({
  render() {
    return (

Users

            {/* use Link to route around the app */}
            {this.state.users.map(user => (

<Link to={`/user/${user.id}`}>{user.name}</Link>

            ))}

          {this.props.children}

    )
  }
})

const User = React.createClass({
  render() {
    return (

{this.props.currentUser.user.name}

        {/* etc. */}

    )
  }
})

const userQueries = ({ location, params }) => ({
  currentUser: {
    query: `
      query getUserData ($id: ID!) {
        user(id: $id) {
          emails {
            address
            verified
          }
          name
        }
      }
    `,
    variables: {
      id: params.userId,
    },
  }
})

const userMutations = ({ location, params }) => ({
  addProfileView: (date) => {
    mutation: `
      mutation addProfileView($route: String!, $id: ID!, date: $String!) {
        addProfileView(route: $route, id: $id, date: $date)
      }
    `,
    variables: {
      route: location.pathname,
      id: params.userId,
      date,
    },
  },
});

// Declarative route configuration (could also load this config lazily
// instead, all you really need is a single root route, you don't need to
// colocate the entire config).
render((
  <Router
    history={browserHistory}
    client={client}
    render={applyRouterMiddleware(apolloMiddleware)}
  >
    <Route path="/" component={App}>
      <Route path="about" component={About}/>
      <Route path="users" component={Users}>
        <Route
          path="/user/:userId"
          component={User}
          queries={userQueries}
          mutations={userMutations}
          onEnter={function(nextState, replace, callback){
            const now = new Date();
            this.mutations.addProfileView(now);
          }}
        />
      </Route>
      <Route path="*" component={NoMatch}/>
    </Route>
  </Router>
), document.body)

Issues with above:

[ ] removes colocation of queries to components
[ ] still only gets router level data

Tree analyzation + react-router integration
import { Component } from 'react';
import { connect } from 'react-apollo';

class Category extends Component {
  render() {
    // markup
  }
}

function mapQueriesToProps({ ownProps, state }) {
  return {
    category: {
      query: gql`
        query getCategory($categoryId: Int!) {
          category(id: $categoryId) {
            name
            color
          }
        }
      `,
      variables: {
        categoryId: 5,
      },
      forceFetch: false,
      returnPartialData: true,
      ssr: true // tell the client to block during SSR
    },
  };
};

const CategoryWithData = connect({
  mapQueriesToProps,
})(Category);

// router

import { apolloSSRMiddleware } from "react-router-apollo";

render((
  <Router
    history={browserHistory}
    client={client}
    render={applyRouterMiddleware(apolloSSRMiddleware)}
  >
    <Route path="/" component={App}>
      <Route path="about" component={About}/>
      <Route path="users" component={Users}>
        <Route path="/user/:userId"  component={User} />
      </Route>
      <Route path="*" component={NoMatch}/>
    </Route>
  </Router>
), document.body)

Issues with above:

[ ] possibly none!

Best of all worlds could be combining tree analyzation with the react-router middleware
Other thoughts
Being able to combine queries into one big request would be awesome. Some data in the tree may require props from parent data from queries. If this is the case, we would need to expose a way to tell the tree to get all of the data from this query before working your way down the tree further. Something along the lines of blockRender: true or something like that applied to connect would be helpful.
We will also need to ship a way to add the data as a string (we base64 encode it currently) to a script tag, then parse it on the client side before starting the client. This ships all of the redux store over to the client. I've already added a way to pass initialState to the apollo-client before it starts up.
Regardless of how we do this, it will have to be a client and server supported system. Since the apollo-client is passed into the react tree, we either have to provide a non-react tree based way of doing it, OR do something like this:
// application code
import { ApolloProvider, getData } from "react-apollo"
import ApolloClient from "apollo-client"

const app = (
<ApolloProvider
  createClient={(initialState) => {
    return new ApolloClient({
      initialState,
    })
  }}
>
  <App />
</ApolloProvider>
)

// server code
html = ReactDOMServer.renderToString(getData(app));

// alternatively, if a user just wants SSH (server side hydration)
const data = getData(app);

// add to initial markup somehow

// Ideally `getData` would take an argument that would allow you to specify the serialization of your data
// then within ApolloProvider on the client you could de-serialization how you want

If we did the above, on the server the initialState would be empty (you could do a sync request to pull an initial state from cache too) and the client would be generated and the store executed before the render. Then renderToString would be called on a tree that can sync get all of the data because it has already been requested. It would inject a  into the html that the ApolloProvider would read when it is running createClient on the client side.

alternatively, createClient could take a promise so async cache lookup would be easier

SO, there are quite a few ways we can do it. I'm sure there are more / better ways than even what I have listed.
My overall goal though is this:

[ ] colocate data (its the GraphQL and React way)
[ ] allow for cascading tree queries which can (but don't have to) block
[ ] auto add data to static html
[ ] auto read data from html on DOM startup
[ ] not change the API of react-apollo so transitioning to SSR would be easy
[ ] allow for people who want SSH (server side hydration) but not SSR
[ ] have the surface area of your app be minimally affected (see the last code block)
[ ] make caching trivial to integrate

Thoughts?
cc @wizardzloy @stubailo @johnthepink @helfer @gauravtiwari

regarding serialization of data, why not to simply use:
// server
window.__APOLLO_STATE__ = JSON.serialize(store.getState())

// client
const client = new ApolloClient({
  initialState: window.__APOLLO_STATE__
})

I believe everybody uses this way of serialization when it comes to passing data from server to a client in a markup.

We can probably make that the default. We obfuscate our data for SEO reasons so having that option is nice

@jbaxleyiii, I guess colocation of data is very important, because that would make the client pluggable with almost all front-end frameworks or libraries and it will also help in caching. One of thing that's quite unique with apollo client is that it can work with any framework or library, which is very important and USP.
@jbaxleyiii  you already mentioned all points that are necessary to make SSR painless. If we make the data store fully interoperable and independent then it would be easy to transact with store from any framework or library, in the end it's all Javascript.
How about we just set the result object straightaway with props? Because, props are already available during runtime, on server. Instead of passing JSON blobs, how about we share the instance of apollo client on server and client and then set the store accordingly.
For ex: on server or client if, data is already provided through some kinda of prop.

and we have access to this prop on client or server.
// somewhere on server to be globally available or on client
const PostClient = new ApolloClient({ initialState: props }); //just set the data to result object
or
PostClient.setInitialState(props)

window.PostComponent = PostComponent; // some react component
window.PostClient = PostClient; // globally available
window.serverRenderComponent({ component: PostComponent, props: props, client: PostClient });

and then during rendering:
import ReactDOMServer from 'react-dom/server';
import createReactElement from './createReactElement';

export default function serverRenderComponent(options) {
  const { component, props, client } = options;
  const reactElement = createReactElement(component, props);

 htmlResult = ReactDOMServer.renderToStaticMarkup(
    <ApolloProvider client={PostClient} children={reactElement} />
  );
  return htmlResult;
}

And then we can access same PostClient on client as it's globally set and use it on client side mounting of the component. Props could be accessed, for example on rails:  https://github.com/reactjs/react-rails/blob/master/lib/react/rails/component_mount.rb#L25
or in express:
https://github.com/mjackson/react-stdio/blob/master/server.js#L33

@jbaxleyiii Another example, here a redux store is exposed to window or global object as available, https://github.com/shakacode/react_on_rails/blob/master/node_package/src/StoreRegistry.js and then used on both client and server. Same could be done with instantiated client object.
https://github.com/shakacode/react_on_rails/blob/master/spec/dummy/client/app/startup/serverRegistration.jsx#L40 (registration to window object)

Okay so it sounds like we can tackle this in multiple steps:

[ ] allow per component data prefillling (typically useful for non js backends)
[ ] allow registering a query to be SSR and react-apollo doing everything needed to render

Per Component Prefilling
This should be pretty simple overall because it is primarily a client side action. Given a prop (detailed below), react-apollo's connect should dispatch that data to the store on mount. It can pass the data through to the child component as well so both the client and the store have the correct data when the app is instansiated.
// given query object
const mapQueriesToProps = () => ({
  category: {
    query: gql`
      query getCategory($categoryId: Int!) {
         category(id: $categoryId) {
           name
           color
         }
       }
    `,
    variables: {
      categoryId: 5,
    },
    ssr: true // tell the client to block during SSR
  },
})

// passed props
const data = {
  category: {
     category: {
       name: "sample",
       color: "blue"
     }
  }
}

Props as stored in the DOM

Minimial SSR API
....still in development / thought

https://github.com/iamdustan/tiny-react-renderer

First round of this is shipped in #83. If anyone can try this in an app and file bugs that would be great!


Update egg-satisfactory.json

Removed depreciated startup comands and server variables which broke connecting to the server.
Server only requires a single port (default 7777) to be forwarded since 1.0 release.
There is also TLS support now which i havent added into this egg
Description

Checklist for all submissions

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
[x] Have you tested and reviewed your changes with confidence that everything works?
[x] Did you branch your changes and PR from that branch and not from your master branch?

If not, why?:

[x] You verify that the start command applied does not use a shell script

[x] If some script is needed then it is part of a current yolk or a PR to add one

[x] The egg was exported from the panel

New egg Submissions

[ ] Does your submission pass tests (server is connectable)?
[ ] Does your egg use a custom docker image?

[ ] Have you tried to use a generic image?
[ ] Did you PR the necessary changes to make it work?

[ ] Have you added the egg to the main README.md and any other README files in subdirectories of the egg (e.g /game_eggs) according to the alphabetical order?
[ ] Have you added a unique README.md for the egg you are adding according to the alphabetical order?
[ ] You verify that the start command applied does not use a shell script

[ ] If some script is needed then it is part of a current yolk or a PR to add one

[ ] The egg was exported from the panel

simple command changes made

duplicate: https://github.com/pelican-eggs/games-steamcmd/pull/74

Duplicate of #74. Please do not ignore the checklist for all submissions.


DT-2245 Added new latestLocationId

to complement locationDescription so for OUT records it set the last prison (or current prison for IN).
This allows service to  reliably find the prison code for either current prison or last prison before movement

CC: @petergphillips
RE: DT-2245 Added new latestLocationId
Thank you @andymarke
—
TL;DR 1
YJAF's integration with prison-api and prisoner-offender-search will proceed on the assumption that lastLocationId := prisonId.
Assumptions
In a Slack direct message with @Mjwillis, Michael advised that of the eight request properties defined for /api/offenders/{offenderNo}/booking, only the following four are mandatory...

offenderNo
imprisonmentStatus
movementReasonCode
prisonId

I'm clear on the sources of numbers 1, 2 and 3. Regarding number 4 though (prisonId). Please confirm the following for my YJAF team mates and I:
If a consuming service has access to either...

An InmateDetails.lastLocationId (sourced from /api/offenders) OR
A Prisoner.prisonId (sourced from /match-prisoners)

Then, since both of those are AgencyLocation.id values (MDI, LEI, OUT, BMI, etc.) they both are suitable for the RequestForNewBooking.prisonId request body property required by /api/offenders/{offenderNo}/booking.
Thank you in advance, Andy.
—
 1 Posting this here instead of in DPS' Slack channel, to loop my team mate @VasilDimitrov22 in. Vas needs to know the details first-hand; but does not have an account in your channel.

@boydingham please don't raise requests for assistance on PRs.  If some of your team doesn't have access to the correct resources in order to do their work then please raise a request to gain access.


don't use a media Fallback for static assets ( #1461 )

1. Why is this change necessary?
See  #1461
This removes the fallback handling for static assets in location where no php handling is expected.
With this, the load on servers can be reduces.
2. What does this change do, exactly?
Apache will no longer run the index php in the folders theme,media,thumbnail,bundles|css,fonts,js,recovery and sitemap
3. Describe each step to reproduce the issue or behaviour.
Open a non existing File on a shopware installation.
Without the patch, you will get a Shopware 404.
With this patch, the webserver will generate the 404.
4. Please link to the relevant issues (if any).
#1461
5. Checklist

[ ] I have rebased my changes to remove merge conflicts
[ ] I have written tests and verified that they fail without my change
[x] I have created a changelog file with all necessary information about my changes
[ ] I have written or adjusted the documentation according to my changes
[ ] This change has comments for package types, values, functions, and non-obvious lines of code
[ ] I have read the contribution requirements and fulfil them.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Hey @jonashrem thanks for your contribution! 🎉
I guess overall your change makes a lot of sense, as it is unneccessary to start up the whole php stack for every missing image.
However this is not the correct place to change it, as we use the symfony flex component to manage the setup of the project without needing manual adjustments.
Therefore please propose your changes in the recipe repo: https://github.com/shopware/recipes/blob/main/shopware/core/6.6/public/.htaccess.dist
However we consider this a breaking change, as some applications may rely on the fact that php is used as fallback in those cases, therfore please start with creating a 6.7 folder for the recipe and copy over the 6.6 files as a starting point. There we can then make that change for 6.7 and it should be automatically applied on the update.
Please use this MR to add a changelog in the main repo, so that we have that change properly documented.

@keulinho here you are: https://github.com/shopware/recipes/pull/123

@jonashrem as the change is now merged in the recipes repo, is this PR still needed? it only contains a changelog :thinking:

Hey @jonashrem
I will close this PR for now. If still something is missing, please re-open or create a new PR.
Thanks :wave:


Updates to v2.9.1 of FullCalendar.

Seems very nice 😄 Just wondering about the meta-definitions.

I'd rather leave all the original FullCalendar files untouched as this gem is only a repackaging.

@gr8bit this is the original file from Arshaw, I do just not understand how it works!

I do not have the bandwidth to maintain this gem right now, but I don't want to see it die either.  Would any of the commenters on this thread or other users like to take on maintenance and publishing to RubyGems?

I merged the PR for version 3.0.0 lately - is there still any need for this version (2.9.1) @ytrrty ?
@bokmann I got you covered, but if @davidwessman wants to join the team of maintainers, I'd gladly welcome him! :)

I would love to join as a maintainer 😄
And I do think we can close this PR.

@bokmann Thanks for adding me as a collaborator, happy to help :)
@gr8bit When v3.0.0 was merged v2.9.1 is no longer needed
I'll close this PR.


Update go version to 1.8

This change is

@nicksardo is ok to update go version to 1.8 in travis?

Yes, I think updating the version is fine.

Coverage increased (+0.02%) to 46.247% when pulling e70b50b4c814d4fe62b6d16e774b0172e766169a on aledbf:update-go into 201a109bb5f1363b1a0b85aff2b807b67d5d9d3b on kubernetes:master.

Coverage remained the same at 46.232% when pulling 4af97467d1efa0e07f957a76d9c6c1c7d2da1157 on aledbf:update-go into 201a109bb5f1363b1a0b85aff2b807b67d5d9d3b on kubernetes:master.


[PE-D][Tester A] Put a limit on the length of characters for rooms

Not really a bug but a suggestion. I guess this is just a user being dumb but you can consider doing this.

Labels: severity.VeryLow type.FeatureFlaw
original: KeithPJX/ped#5

Limit room to 100 characters


Update create_ticket.html

this line showing the error because  some bootstrap4from is not support on the current version of django

As you can see from the checks, your change does not pass the checks.
django-helpdesk is not ready to work with the "current version of django" (5.x at the time of writing).
While I run a django 5.0 adapted django-helpdesk installation, I only use a very restricted set of features and have some compatibility code in a private repository.
A complete update is not trivial to do and might require a separate development branch.
If you are determined to tackle a Django 5.x update of django-helpdesk I'll happily share my current findings.


feat(mixin): add mixin support in descriptor utils

Add mixin support in descriptor utils.
Next step: use HttpRule to replace MixinMethodOverride as discussed.

This change is

Convert this to draft for now. I will merge #14723 first then work on this one.


Error while installing

Describe the bug
When trying to install the module i get the error
npm ERR! Unexpected end of JSON input while parsing near '..."fs-extra":"7.0.0","g'
To Reproduce
Steps to reproduce the behavior:

Create new node project using npm init -y
run the installation command npm install --save @primer/components

Expected behavior
The expected behavior is that it gets installed
Desktop (please complete the following information):

OS: Windows 10

Node: 11..13.0

Npm: 6.14.8

Version: 20.3.0

Additional context
The complete error log is
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\miche\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   '@primer/components' ]
2 info using<EMAIL_ADDRESS>3 info using<EMAIL_ADDRESS>4 verbose npm-session 2fb4e79bf6697e14
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://registry.npmjs.org/@primer%2fcomponents 1031ms (from cache)
8 silly fetchPackageMetaData error for @primer/components@latest Unexpected end of JSON input while parsing near '..."fs-extra":"7.0.0","g'
9 timing stage:rollbackFailedOptional Completed in 0ms
10 timing stage:runTopLevelLifecycles Completed in 1075ms
11 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '..."fs-extra":"7.0.0","g'
11 verbose stack     at JSON.parse (<anonymous>)
11 verbose stack     at parseJson (C:\Users\miche\AppData\Roaming\npm\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)
11 verbose stack     at consumeBody.call.then.buffer (C:\Users\miche\AppData\Roaming\npm\node_modules\npm\node_modules\node-fetch-npm\src\body.js:96:50)
11 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:86:5)
12 verbose cwd C:\Users\miche\test
13 verbose Windows_NT 10.0.19041
14 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\miche\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "@primer/components"
15 verbose node v11.13.0
16 verbose npm  v6.14.8
17 error Unexpected end of JSON input while parsing near '..."fs-extra":"7.0.0","g'
18 verbose exit [ 1, true ]

and the terminal output is
npm ERR! Unexpected end of JSON input while parsing near '..."fs-extra":"7.0.0","g'

npm ERR!      C:\Users\miche\AppData\Roaming\npm-cache\_logs\2020-11-01T08_32_47_301Z-debug.log

@MichelGerding Sorry for the delay. Is this still an issue?

this is no longer an issue. it installs just fine even with the version I was using at the time


switch between 8/4-bit channel depth in color selection

I come from Amiga world, where palette colors are described in 12-bit format (#RGB, not #RRGGBB). Currently, color picker allows typing in colors in this syntax, but using sliders to change color causes switching it to 24-bit format. It would be very cool if color mixer had "12-bit lock" checkbox so that it would stay in 12-bit mode even if slided with HSV/RGB sliders.

hi


feature: Remove ability to accept terrain-sourced filth

Actually tested my fix - it was found wanting. Closed this request explicitly.


Less modules not working

When using the snippet provided in the docs, I cannot make less modules work.
Here is my setup:
"next-plugin-antd-less": "^0.0.6"
"next": "9.5.3"
/// next.config.js
const withAntdLess = require('next-plugin-antd-less');
const config = withAntdLess({
	lessVarsFilePath: './src/styles/theme.less',
	cssLoaderOptionsModules: {
		localIdentName: '[local]___[hash:base64:5]',
	},
});

module.exports = config;

/// .babelrc
{
	"presets": [
		"next/babel"
	],
	"plugins": [
		[
			"import",
			{
				"libraryName": "antd",
				"style": true
			}
		]
	]
}

Edit: I just read the docs again. Is this plugin even supposed to enable less modules? If not, please feel free to close this issue.

https://github.com/SolidZORO/next-plugin-antd-less/blob/757f8df159242a5b772eba0ada225a0dd2260899/index.js#L83


Option to de-activate jest-nock

Add an option to disable jest-nock and do real network request, but without update the fixtures. This would allow to have the same tests both for aceptation and integration.

You can always use the nock feature setting env NOCK_OFF=true to do that. It's marked experimental for some years now, hasn't changed though. I would prefer a command line parameter which jest hands over to jest-nock though


Updates to the Security Graph models

Description
Updated the Security Graph models to reflect recent changes in the API

Unit tests have been removed until a new testing framework can be developed. This will prevent failing tests from blocking these small updates


add the default revision for operator chart

Please provide a description of this PR:
The REVISION env of operator deployment may should have a default value of default as elsewhere, like: https://github.com/istio/istio/blob/master/manifests/charts/istio-control/istio-discovery/templates/deployment.yaml#L124

@my-git9: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

gencheck_istio
c4766bbe822b9a32b05bb0250886ea0333c74547
link
true
/test gencheck

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@my-git9: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

gencheck_istio
7f77d01a8faab1d4846f795d63c3400a8ccc0189
link
true
/test gencheck

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@my-git9: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

gencheck_istio
7f77d01a8faab1d4846f795d63c3400a8ccc0189
link
true
/test gencheck

unit-tests-arm64_istio
871ea9561effacbdafaeb7692facff476ebaa545
link
true
/test unit-tests-arm64

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


_fuzzy_eq?

Hi! Do you know what the function _fuzzy_eq() used once in the notebooks was supposed to do? The function is not defined.
Thanks!

Hi Jordi
Yes, the function was used to remove "soft duplicates" from the token list, by edit distance or something of this sort.
I think I deleted the cell by mistake and the need wasn't strong enough to warrant writing it again

Got it, thanks!


Impact panel aggregates data from producing and outbound areas

Changes:

Total population is the sum of the population of producing and outbound areas
Other indicators are weighted by population of producing and outbound areas
Updated label to Number of people in the flow areas

@oliverroick this is ready for review.

@oliverroick good suggestion, I moved the query to the parallel execution. I used the relation mapping from the schema to avoid a raw query, which helps us avoid type casting and allows us to benefit from Prisma's type safety. This is ready for another review.


parse deal message

This is not tested!
The intention of this PR is to parse the deal status Message, which is a json-encoded string and include those keys in our structured output. The intention is that these keys would be indexed in elasticsearch for easy search.
Rather than this:
{
  "cid": "cid123",
  ...
  "message": "{ \"key\": 37, \"key2\": 38 }"
}

We would instead output this:
{
  "cid": "cid123",
  ...
  "deal_key": 37,
  "deal_key2": 38
}

Looks like I am wrong, the message does not need to be parsed. Closing.


hub ignore

Add a command for initializing a .gitignore file. Using data in https://github.com/github/gitignore it should accept options for type of project.
Something like
hub ignore nodejs

It's an interesting feature idea. Not sure if it fits on our roadmap, but I'll keep it open until we figure that out.

What should happen when there's already a .gitignore?

Refuse to continue

$ hub init-ignore nodejs
`.gitignore` already exits in this git repository. Remove it before
running `hub init-ignore nodejs` # <- shameless copy of `vagrant init` error

No problem as the command just prints Node.gitignore content on stdout

$ hub ignore nodejs >> .gitignore

Maybe this will be useful?
https://developer.github.com/v3/gitignore/


fix: simplify snappy frame encoding

Motivation
During upgrade to node 20, I noticed that our snappy dependency was out of date.
But worse, this dependency was hidden in our snappy frame compression library, which is a poorly maintained, untyped fork at https://github.com/chainsafe/node-snappy-stream
Description
This is a minimal implementation of snappy frame compression that doesn't rely on node streams, stream-to-it, and half-a-dozen other libraries in node-snappy-stream. Instead it uses an async generator to add the framing.
The snappy dependency has also been updated to v7.x.x

We already have those tests :) reqresp/test/unit/encoders/encodingStrategies/sszSnappy/{encode,decode}.ts

@ChainSafe/lodestar ready for rereview

:tada: This PR is included in v1.10.0 :tada:


Is there any details for how to train a model?

hi @bfortuner ,
Is there any details for how to train a model?
I tried but there is following error ,
python train_densenet_pytorch.py
Traceback (most recent call last):
  File "train_densenet_pytorch.py", line 25, in <module>
    import utils.training as train_utils
  File "/pytorch_tiramisu-master/utils/training.py", line 47, in <module>
    def train(epoch, net, trainLoader, optimizer, trainF, sessionName=get_rand_str(5)):
  File "/pytorch_tiramisu-master/utils/training.py", line 21, in get_rand_str
    return ''.join(random.choices(string.ascii_uppercase + string.digits, k=n))
AttributeError: 'module' object has no attribute 'choices'

Hope for your help.
Thanks a ton!

hi @wlwsea  please checkout the other open issues! this issue has already been created.

hi @raghavab1992 ,
Thanks a lot! It really works.
I want to train and test this network on camvid dataset, but i don't know how to use it.
So , can you give me some advice or some details about my target?
Thx again!

@wlwsea  im not really sure wht u mean by 'how to use it' but im gonna take a shot at it anyway.
Please try to run the tiramisu-pytorch.ipynb notebook. Need to download camvid dataset and place it in the data folder(please look at the various folders present in github implementation and try to get an intuitive understanding of wht each folder might be for). It should be pretty straight forward from there.

@raghavab1992
OK, i will try it.
Thanks a lot !

Updated the train.ipynb file with simpler interface. Hopefully that helps.


Fix wrong access to Number

Fix wrong access to Number
Description
$this->getRawData()[$this->getType()]; gets direct access to number, which is wrong as it can be !isset
Motivation and context
I was not able to get the number value
How has this been tested?
Simple test in my environnement
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

PR checklist

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING.md document.
[ ] I have added tests to cover my changes.

Hi @MisterDuval!
Thanks for taking the time to fix this issue 🙂


toast: speed up toast wire from ~70s to ~32s

Hello @nicks,
Please review the following commits I made in branch nicks/toast:
61ee1b2fc92b15fb1fbc154774d6be15d3c6f9b1 (2019-10-30 18:24:39 -0400)
toast: speed up toast wire from ~70s to ~32s

Nice!


Podman containers updates

This PR is created from #1556 to run Circle CI tests. Original changes were made by Chris Haris.
Checklist

[x] Code review by me (chris)
[x] Hand tested by me (chris)
[x] I'm proud of my work (chris)
[x] Code review by reviewer
[x] Hand tested by reviewer
[x] CircleCi tests are passing
[x] Ready to merge

@Didayolo tested this using podman. I can build podman containers using the updated container files from Chris. You can merge this PR


Add individual test reports and errors

This adds individual test and reporting functionality similar to the
given output of pytest-html. As there is no support for collapsing
columns together in Markdown implementations we drop down to bare HTML
so we can use colspan=3 and make the inline table output for test
results a lot cleaner at the expense of .md readability.
Issue: https://github.com/hackebrot/pytest-md/issues/7

Hi @seanson! 👋
Thank you for submitting this PR. It is much appreciated! I just added a CONTRIBUTORS.md file and put down your name and also updated the community section on the README. 🙇
I feel bad for saying this, but let's take a step back and discuss how we can present individual test results in the Markdown report. We don't necessarily have to adopt the format of pytest-html and use tables for that. We could use headings for test files and sub headings for individual test failures for example? 🤔
What do you think?

Thanks for the credit! It's definitely a good consideration.
I've played around with the formatting to go for just Markdown in the way suggested. Is this the format you were aiming for?
Test Report
Report generated on 13-Mar-2019 at 23:49:44 by pytest-md
Summary
3 tests ran in 0.09 seconds

2 failed
1 passed

Results
tests/test_1.py
test_exception: Failed (0.00s)
def test_exception():
>       raise Exception("Failure\nmulti\nline")
E       Exception: Failure
E       multi
E       line

tests/test_1.py:6: Exception

test_pass: Passed (0.00s)
tests/test_2.py
test_second_fail: Failed (0.00s)
def test_second_fail():
>       assert "foo" == "bar"
E       AssertionError: assert 'foo' == 'bar'
E         - foo
E         + bar

tests/test_2.py:2: AssertionError

I suggest grouping the individual results by outcome. The pytest CLI report shows errors first, then failures and after that I think we can use the ordering from before. We can also change the order in the summary accordingly, so it's more consistent:

error
failed
passed
skipped
xfail
xpass

Here's an example report (taken from the README)

Test Report
Report generated on 13-Mar-2019 at 15:16:17 by pytest-md 📝
Summary
12 tests ran in 0.10 seconds ⏱

2 error 😡
1 failed 😰
3 passed 😃
2 skipped 🙄
2 xfail 😞
2 xpass 😲

2 error 😡
test_example1.py
0.02 s ⏱ ERROR at setup of test_error
    @pytest.fixture
    def number():
>       return 1234 / 0
E       ZeroDivisionError: division by zero

test_example1.py:34: ZeroDivisionError

test_example2.py
0.02 s ⏱ ERROR at setup of test_nope
    @pytest.fixture
    def number():
>       return 1234 / 0
E       ZeroDivisionError: division by zero

test_example2.py:23: ZeroDivisionError

1 failed 😰
0.22 s ⏱ test_failed
    def test_failed():
>       assert "emoji" == "hello world"
E       AssertionError: assert 'emoji' == 'hello world'
E         - emoji
E         + hello world

test_example1.py:6: AssertionError

3 passed 😃
test_example1.py
0.08 s ⏱ test_passed[Sara-Hello Sara!]
0.07 s ⏱ test_passed[Mat-Hello Mat!]
0.08 s ⏱ test_passed[Annie-Hello Annie!]
2 skipped 🙄
test_example1.py
0.00 s ⏱ test_skipped
test_example2.py
0.00 s ⏱ test_skipped
2 xfail 😞
test_example1.py
0.40 s ⏱ test_xfail
test_example2.py
0.20 s ⏱ test_xfail
xpass 😲
test_example1.py
0.42 s ⏱ test_xpass
test_example2.py
0.22 s ⏱ test_xpass

Sounds good! I've got this format almost up and running.
Did we want the report details to show up or change in any way based on verbosity levels?

That's a great question. So I would add emojis to the report following the same logic as for the summary. And then with regards to the verbosity level, we could only print the individual results for -v and above and only print the summary by default.
What do you think @seanson?

Sounds good! I've pushed the changes to reflect the same emoji style and added the verbosity toggle. Tests are fixed up as well. Let me know if this is up to standard @hackebrot

Awesome, great work @seanson! I'll have a look later today. 🚀


Add Configuration Subsystem

Thoughts on adding a sample Builderator file?

Can you add a quich why and how to the README?

@athompson-r7 @dgreene-r7 I'm adding to README and /docs before each PR. There's still plenty to come.


Pass config by pointer

Description
Pass config by pointer
Type of change

Refactor (refactoring code, removing useless files)

Testing steps
N/A
Checklist

[ ] make before_commit passes
[ ] updated documentation wherever necessary
[ ] added or modified tests if necessary
[ ] updated schemas and validators in insights-data-schemas in case of input/output change

Codecov Report
Patch coverage: 100.00% and no project coverage change.

Comparison is base (4ad40ab) 89.43% compared to head (39f7b3d) 89.43%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #175   +/-   ##
=======================================
  Coverage   89.43%   89.43%
=======================================
  Files          14       14
  Lines         388      388
=======================================
  Hits          347      347
  Misses         31       31
  Partials       10       10

Impacted Files
Coverage Δ

internal/cli/cli.go
62.50% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


MaxListenersExceededWarning: Possible EventEmitter memory leak detected.

I have this error in logs.
(node:15853) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit

Do I need to worry or to do something with it?

You shouldn't need to worry about it;
However, it would be useful to see what else is happening when this occurs;
If this is a common occurrence for your set, please let run with node --trace-warnings and copy the entire error callstack so we can check if its a plugin or core squadjs thats causing the warning.

This is not a core bug. I believe, I need to take a glance on my code.
│Jan 25 08:46:42 squad-vsrv taskset[44197]: (node:44197) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [Socket]. Use emitter.setMaxListeners() to increas┤
│Jan 25 08:46:42 squad-vsrv taskset[44197]:     at _addListener (events.js:475:17)                                                                                ┤
│Jan 25 08:46:42 squad-vsrv taskset[44197]:     at Socket.addListener (events.js:497:10)                                                                                ┤
│Jan 25 08:46:42 squad-vsrv taskset[44197]:     at Socket.Readable.on (internal/streams/readable.js:852:35)                                                                                ┤
│Jan 25 08:46:42 squad-vsrv taskset[44197]:     at Socket.once (events.js:541:8)                                                                                ┤
│Jan 25 08:46:42 squad-vsrv taskset[44197]:     at file:///home/squad/SquadJS/main_server/core/rcon.js:318:19                                                                                │
│Jan 25 08:46:42 squad-vsrv taskset[44197]:     at new Promise (<anonymous>)                                                                                │
│Jan 25 08:46:42 squad-vsrv taskset[44197]:     at SquadRcon.write (file:///home/squad/SquadJS/main_server/core/rcon.js:259:12)                                                                                ┤
│Jan 25 08:46:42 squad-vsrv taskset[44197]:     at SquadRcon.execute (file:///home/squad/SquadJS/main_server/core/rcon.js:255:17)                                                                               ┤
│Jan 25 08:46:42 squad-vsrv taskset[44197]:     at SquadRcon.warn (file:///home/squad/SquadJS/main_server/squad-server/rcon.js:201:16)                                                                          ┤
│Jan 25 08:46:42 squad-vsrv taskset[44197]:     at Timeout._onTimeout (file:///home/squad/SquadJS/main_server/squad-server/plugins/auto-kick-unassigned-custom.js:212:24)

    // continuously warn player at rate set in options
    tracker.warnTimerID = setInterval(async () => {
      const msLeft = this.kickTimeout - this.warningInterval * (tracker.warnings + 1);

      // clear on last warning
      if (msLeft < this.warningInterval + 1) clearInterval(tracker.warnTimerID);

      const timeLeft = this.msFormat(msLeft);
      this.server.rcon.warn(tracker.player.steamID, `${this.options.warningMessage} - ${timeLeft}`);  // This is the string 212, I don't get it
      this.verbose(2, `Warning: ${tracker.player.name} (${timeLeft})`);
      tracker.warnings++;
    }, this.warningInterval);

Thanks for the explanation.


Mobile First Landing Page

Description
Code the mobile version with Mobile First approach.

Issue Checklist

[x] Write the needed tests.
[x] Create the markup for the component.
[x] Add the correct styles.
[x] Use the lint to clean CSS code.
[x] Document all things.

Assignees

[x] Final assign @yairodriguez

I’m working on my way! 😉

Review was done successfully.

I’m closing this issue, see 0.1.0/FirstVersionOfWebsite Pull Request.


No Result Found to Publish : SLA Reporting via JUnit

Hello,
We have a problem for publishing the SLA Reporting via JUnit.
The pipeline used :

task: Bash@3
displayName: Get the junit SLA report
continueOnError: true
inputs:
targetType: 'inline'
script: |
neoload test-results --junit-file $(Common.TestResultsDirectory)/neoload-slas.xml junitsla

task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: $(Common.TestResultsDirectory)/neoload-slas.xml
failTaskOnFailedTests: true

The "Get the junit SLA report" step work well :

But we have this error message for the publish step:

An ls command show the xml file at the "Get the junit SLA report" step :

So the file is present in the folder. It seems to be a problem with the junit publish step .. Do you have the same problem ?

The publish step ended with success because the report is empty, there is no success nor failures.
I guess your Neoload test does not contains any SLA. According to the Help page, the junitsla option "Output SLA results to a file with junit format"

Our test has an SLA, we can see it in the SLA tab on the neoload web page :

Indeed, only "Per interval" and "Per test" SLA are output to the Junit report.
The team planned to add Global SLA to the Junit report. This should be available soon.

Fixed in version 1.1.5. Published on pypi.


SuggestedActions that are accidentally sent to the bot are being rendered for the user

The v4 Emulator which uses 0.13.1-master.6da7b6c will show the user SuggestedActions that were sent to the bot. Testing this using the iFrame also renders the same result, SuggestedActions that should be only "seen" by the bot are showing for the user.
On other channels like Skype, if the suggestedAction to field is populated with the bot's id, the SuggestedActions do not render for the user.
Example code from BB-Py #100:
activity = Activity(
    type=ActivityTypes.message,
    channel_id=activity.channel_id,
    conversation=activity.conversation,
    from_property=activity.recipient,
    recipient=activity.from_property,
    service_url=activity.service_url
)

replies = [
    {
        "title": "Test1",
        "type": ActionTypes.im_back,
        "value": "Test1",
    },
    {
        "title": "Test2",
        "type": ActionTypes.im_back,
        "value": "Test2",
    }
]

activity.text = "My text"
# The following line is where the problem code in the bot exists: `to` uses
# `activity.from_property.id` instead of `activity.recipient.id`
activity.suggested_actions = SuggestedActions(actions=replies, to=[activity.from_property.id])

The activity's SuggestedActions show up for the user in WebChat and in the v4 Emulator, whereas this code sent to another channel would not work. Sending this activity to Skype results in the text, "My text" appearing, but not the SuggestedActions.

For activities with "receipient = bot" and contains suggested actions, Web Chat should not show suggested actions. Is that right?
Notes to fixer

[ ] Modify activityWithSuggestedActions.ts:10 to filter out activities not targeting the current user

The "from me" check can be found at History.tsx
We need a "to me" check, and we may need to re-architect that code

[ ] Add tests

@tonyanziano hey are you working on this atm? Could you let us know your status? :)

Note from Tony: this is already in codebase and test needs to be written. Leaving as 4.2


amd hdp flush regs are on seg2

Ahh, is this the cause of the page faults?!

Hard to say if this fixes 100% of all page faults, will test for a longer time.


[Bug] Cannot play anything other than Fortnite

Platform

Device: Desktop
OS: Windows 8
Browser: Microsoft edge
Browser Version: 109.0.1518.140
Better xCloud Version: 2.0.2

My GamePass subscription is not detected by the server when using Better Xcloud and I can only play Fortnite when Better Xcloud is active, but when I disable Better XCLOUD, my GamePass subscription is detected by the server and I can play other games besides Fortnite. I tried disabling and enabling several times to make sure this was a bug, as a result every time I enable Better XCloud, I can't play any other game besides Fortnite.
Without Better XCloud

With Better XCloud

As you can see there is no gamepass logo on With Better XCloud screenshot

Same as this? https://old.reddit.com/r/xcloud/comments/18bqki4/incapable_of_playing_any_game_other_than_fortnite/

yeah, just like that

That's not an issue with the "Better xCloud" script. I also had this yesterday for a while, even when disabling the script in Tampermonkey. The mobile Game Pass Android app was not affected, so I used that for a while. In the meantime the issue has resolved again.

I try to logging out and back in yesterday, and it work for me. I thought that Better XCloud was what made me unable to play other games besides Fortnite and it turned out that the problem came from the server, @KingNothing81 btw, thanks for the info


[xstate/svelte] bundling of @xstate/svelte/lib/fsm with sveltekit & vite is broken

Description
If I create a new sveltekit-app:

npm init svelte@next xstate-sveltekit-repro
install its dependencies via npm i && npm add @xstate/svelte @xstate/fsm
add the example for the usage of @xstate/svelte/lib/fsm from the docs @ https://xstate.js.org/docs/packages/xstate-svelte/#usemachine-machine-with-xstate-fsm
build the app via npm run build
start it via npm preview

I get the following error:
> svelte-kit preview

> Cannot find module '[...]/xstate-sveltekit-repro/node_modules/@xstate/svelte/lib/fsm' imported from [...]/xstate-sveltekit-repro/.svelte-kit/output/server/app.js
Did you mean to import @xstate/svelte/lib/fsm.js?
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '[...]/xstate-sveltekit-repro/node_modules/@xstate/svelte/lib/fsm' imported from [...]/xstate-sveltekit-repro/.svelte-kit/output/server/app.js
Did you mean to import @xstate/svelte/lib/fsm.js?
    at finalizeResolution (internal/modules/esm/resolve.js:271:11)
    at moduleResolve (internal/modules/esm/resolve.js:694:10)
    at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:805:11)
    at Loader.resolve (internal/modules/esm/loader.js:88:40)
    at Loader.getModuleJob (internal/modules/esm/loader.js:241:28)
    at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:72:40)
    at link (internal/modules/esm/module_job.js:71:36)

Expected Result
The app should run with the production build.
Actual Result
@xstate/svelte/lib/fsm can't be imported
Reproduction
see above.
Additional context

The app works in dev-mode. The problem seems to be rooted in the vite-build.
Reproduced with NPM & PNPM
Strangely the @xstate/svelte package doesn't seem to use rollup for bundling like the rest of the packages in this repo. Any reason for that?

I just made it work with the description from:
https://xstate.js.org/docs/recipes/svelte.html
But contrary to the description the @rollup/plugin-replace breaks the build. Without this step everything seems to work.

@floratmin svelte@next is sveltekit, which uses vite as its bundler. Additionally I did no extra steps - as stated above. So I don't think both problems are related.

No that's right I use it with SvelteKit.

@floratmin It works in a production-bundle with the fsm-packages? If yes, did you do anything special?

No I use it with the full xstate package, I tried it also with @sveltejs/adapter-static where it also worked.

As I said. Different context. This is a problem with the bundling of the /lib/fsm-subpackage.

I just replaced xstate with @xstate/fsm and it does not work. I get the error :
'default' is not exported by<EMAIL_ADDRESS>imported by src/lib/state/login.ts

@floratmin try the example here: https://xstate.js.org/docs/packages/xstate-svelte/#usemachine-machine-with-xstate-fsm. And let's try to stop cluttering this bug-report ;)

@benbender This could related https://github.com/sveltejs/kit/issues/928

Not quite sure on what side this got resolved, but the issue is gone \o/
~/xstate-sveltekit-repro is 📦 v0.0.1 via  v14.17.3
❯ npm run build

><EMAIL_ADDRESS>build
> svelte-kit build

vite v2.4.4 building for production...
✓ 41 modules transformed.
.svelte-kit/output/client/_app/assets/svelte-logo.87df40b8.svg                           1.85kb
.svelte-kit/output/client/_app/assets/fira-mono-greek-400-normal.1f8b3a07.woff2          10.48kb
.svelte-kit/output/client/_app/assets/fira-mono-greek-ext-400-normal.8659ae46.woff2      7.85kb
.svelte-kit/output/client/_app/assets/fira-mono-cyrillic-ext-400-normal.b3140dd3.woff2   16.11kb
.svelte-kit/output/client/_app/assets/fira-mono-latin-ext-400-normal.b6331a25.woff2      11.84kb
.svelte-kit/output/client/_app/assets/fira-mono-cyrillic-400-normal.046b609f.woff2       9.08kb
.svelte-kit/output/client/_app/assets/fira-mono-latin-400-normal.a2f9dbe8.woff2          16.44kb
.svelte-kit/output/client/_app/assets/fira-mono-all-400-normal.0d19eb5d.woff             75.54kb
.svelte-kit/output/client/_app/manifest.json                                             2.68kb
.svelte-kit/output/client/_app/error.svelte-1d6e44ca.js                                  1.56kb / brotli: 0.64kb
.svelte-kit/output/client/_app/pages/index.svelte-8e2651ef.js                            4.07kb / brotli: 1.45kb
.svelte-kit/output/client/_app/pages/xstate.svelte-d6f84ed4.js                           1.73kb / brotli: 0.76kb
.svelte-kit/output/client/_app/pages/__layout.svelte-c0b481c5.js                         4.66kb / brotli: 1.53kb
.svelte-kit/output/client/_app/pages/todos/index.svelte-e7b4e6ee.js                      5.44kb / brotli: 1.96kb
.svelte-kit/output/client/_app/pages/about.svelte-520b8026.js                            2.39kb / brotli: 0.90kb
.svelte-kit/output/client/_app/assets/start-a8cd1609.css                                 0.16kb / brotli: 0.10kb
.svelte-kit/output/client/_app/assets/pages/index.svelte-078f1a0b.css                    1.35kb / brotli: 0.36kb
.svelte-kit/output/client/_app/assets/pages/about.svelte-4db5be0d.css                    0.11kb / brotli: 0.07kb
.svelte-kit/output/client/_app/assets/pages/__layout.svelte-ded7473c.css                 5.06kb / brotli: 1.36kb
.svelte-kit/output/client/_app/assets/pages/todos/index.svelte-05e41044.css              3.72kb / brotli: 0.86kb
.svelte-kit/output/client/_app/start-98a34a08.js                                         18.19kb / brotli: 5.71kb
.svelte-kit/output/client/_app/chunks/vendor-4ad73005.js                                 18.89kb / brotli: 7.13kb
vite v2.4.4 building SSR bundle for production...
✓ 35 modules transformed.
.svelte-kit/output/server/app.js   70.80kb

Run npm run preview to preview your production build locally.

No adapter specified
See https://kit.svelte.dev/docs#adapters to learn how to configure your app to run on the platform of your choosing

4. build the app via npm run build
5. start it via npm preview
I get the following error:

@benbender What happens when you run npm run preview?

Oh sh*t. You're right... Its still broken - my memory betrayed me as I thought that it broke when building. sorry for the noise!
Btw, my old workaround:
    import { useMachine } from<EMAIL_ADDRESS>    import * as pkg from '@xstate/fsm';

    const { createMachine, assign } = pkg.default;

Works for now even if its not pretty...

No problem :) Thanks for confirming!
With your workaround we have two possible solutions now! Good.

It's best to used named imports instead of default imports for this reason. Then it will work the same with both ESM and CJS


[tcgc] don't add constant value to generated name

fixes #900

All changed packages have been documented.

:white_check_mark: @azure-tools/typespec-client-generator-core

Show changes
@azure-tools/typespec-client-generator-core - fix ✏

don't add constant value to generated name

You can try these changes at https://cadlplayground.z22.web.core.windows.net/typespec-azure/prs/904/
Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/typespec-azure/prs/904/


expose references

it'd be soooo convenient if this service was exposed! https://github.com/nymag/amphora/blob/master/lib/services/references.js

Addressed by https://github.com/nymag/amphora/pull/189


[MB-7667] Add GBLOC to creation of new devlocal office users

Description
In devlocal creating new PPM/TOO/TOO users were creating transportation offices with no GBLOC value supplied.  This meant even though you could create a new office user that they would never see any moves or payment requests without a matching GBLOC.
This PR adds the "LKNQ" GBLOC to all new office users, which is the default used in most other places and includes the Scott AFB duty station.
The devlocal tests weren't very thorough and are testing some cross domain things that don't seem to be possible anymore.  I'm adding new tests to make sure the role and gbloc data are present for all users.
Reviewer Notes
Is there anything you would like reviewers to give additional scrutiny?
Setup
Add any steps or code to run in this section to help others prepare to run your code:
make db_dev_e2e_populate
make server_test
make client_test

From the homepage officelocal:3000 click on the local sign-in button in the top right nav menu
Create a new office user using one of the buttons in the right column.
The user should be created and you will be logged in.
The transportation office GBLOC should be indicated in the top menu and moves/payment requests from the seed data should show in the non-empty queue matching "LKNQ".

Code Review Verification Steps

[ ] If the change is risky, it has been tested in experimental before merging.
[ ] Code follows the guidelines for Logging
[ ] The requirements listed in Querying the Database Safely have been satisfied.
Any new migrations/schema changes:

[ ] Follow our guidelines for zero-downtime deploys (see Zero-Downtime Deploys)
[ ] Have been communicated to #g-database
[ ] Secure migrations have been tested following the instructions in our docs

[ ] There are no aXe warnings for UI.
[ ] This works in Supported Browsers and their phone views (Chrome, Firefox, IE, Edge).
[ ] Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
[ ] User facing changes have been reviewed by design.
[ ] Request review from a member of a different team.
[ ] Have the Jira acceptance criteria been met for this change?

References

Jira story for this change

Screenshots
If this PR makes visible UI changes, an image of the finished UI can help reviewers and casual
observers understand the context of the changes. A before image is optional and
can be included at the submitter's discretion.
Consider using an animated image to show an entire workflow instead of using multiple images. You may want to use GIPHY CAPTURE for this! 📸
Please frame screenshots to show enough useful context but also highlight the affected regions.

Messages

:book:
:link: MB-7667

  Generated by :no_entry_sign: dangerJS against 39b094d396805d0c6c37d4c3862cfd12207836b8


CI: track changes to jenkinsfile

Track changes to jenkinsfile file in case we want to run the
full pipeline when something changes tot est that all steps are
correct

will wait until https://github.com/SUSE-Cloud/socok8s/pull/535 is merged to rework this as we might be able to reuse parts of those to set the full run

will wait until #535 is merged to rework this as we might be able to reuse parts of those to set the full run

do we? These are two different things IMO.

do we? These are two different things IMO.

If we have a FullDeploymentNeeded var that sets all steps to run, then we can probably leverage that to set it if the jenkinsfile is changed, so we dont have to add much

See also:  https://github.com/SUSE-Cloud/socok8s/pull/559

This needs a rebase now 559 is merged.

I think it can even be abandonned.

abandoned in favour of #559 !


Feature request: Text input control

It's probably much more involved than the other controls, but a text-control that provides a std::string would allow this framework to cover all of the important basic data types.

Thank you for the suggestion. I think it is not that hard to implement a basic text input component. I will start playing with this idea after I finish the Python port.

I too would like to request. It's a good thing the input control.
thank you for sharing your work

My idea is: it is not possible to use the OS's Native Text input control.
To implement(simulate) this feature, you have to capture the keyboard input, and print the character in the "Text input control" (This should be done by the OpenCV's Text output functions), when user press the del key, the character before the "caret" need to be deleted, and the string should be refreshed.

Thanks for the contributions, guys! I intend to implement this feature exactly as @asmwarrior described. There are hidden challenges ahead though, like how to keep track of a text input in focus. I already have some ideas about how to do it. Hopefully, they'll work 😃

I was wondering what's the status of development of this feature.  I have a rough implementation of something similar that works for my purposes, but it would need some clean up and refactoring to make it play nice with cvui.

I haven't started on this feature, so if you having something already, that would be awesome! Feel invited to issue a pull request with your current implementation (don't mind if it is rough or not working great with cvui, that's ok).
I can then use your code and, as you said, clean and refactor things up until we have a polished feature. We followed a similar process during the implementation of sliders.

As a temporary workaround to an official component, I can see an avenue using subprocesses and raw_input in python with a button that spawns a shell waiting for input. Can't think of the C++ equivalent of that, but I'm sure it would be similar. Just in case anyone needs string parsing functionality before an official component.

I played around with some ideas and implemented a VERY simple version of this feature. Hope anyone would feel interested in it .
Demo file can be found in My Fork, tested only on Ubuntu. It demonstrate:

Very simple and basic implementation of a single line of input entry.
When clicked on any of the input entries, it is selected and you can use the keyboard to type words into it.
Backspace is implemented to delete the rightmost character.
Click outside of any input entry will give the control back to other functionality depend on cv::waitKey()
No cursor control is considered, only editable from the end of string.
No bleeding is considered, if the text is too long, it will exceed the border.

If i understand this post correctly, I've made an attempt at the idea of this post, only thing is 25% of the time what you input doesn't input.
https://github.com/Vadenez/cvui/blob/master/inputText.h


Route for custom back-halves

Set up backend logic for custom back-halve which generates both back-halve URL and short URL.

Set up backend logic for custom back-halve which generates both back-halve URL and short URL.

pls try to generate short URL for this:
{
    "url": "https://github.com/DhananjayThomble/URL-Shortener-App/pull/89/files"
}

I'm getting this response:
{
    "shortUrl": "https://dturl.live/u/xyzMau_2lO",
    "customUrl": "http://localhost:4001/com.com/u/game"
}

here 'shortUrl' is perfect but 'customUrl' doesn't look good to me (com.com)

Also we need to make sure that The custom back-halve should be unique for the entire system so that any user can create and use a short URL for any URL, regardless of the user who created the short URL.

@DhananjayThomble let me fix this.

@DhananjayThomble Can you see if you want any changes for my plan for assigning custom-back-halves:

Preventing user from using same back-halve for the same domain if they have already registered that but allowing the same user to use it for different domains.
For ex:   youtube.com/example and github.com/example
Unique back-halve for everyone.

Let me know if this needs any change.

@DhananjayThomble Can you see if you want any changes for my plan for assigning custom-back-halves:

Preventing user from using same back-halve for the same domain if they have already registered that but allowing the same user to use it for different domains.
For ex:   youtube.com/user_1 and github.com/user_1
Unique back-halve for everyone.

Let me know if this needs any change.

Currently, our system primarily focuses on a single domain, which is 'dturl.live.' In this context, the standard URL shortening process generates a short URL like 'https://dturl.live/u/_9znCj5h6r' for an original link like 'https://www.freecodecamp.org/news/project-based-learning/'
Desired Flow:
Request Body:
You provide a custom back-halve, let's say 'dev-tips' Along with it, you specify the original URL.
Expected Response: In return, you receive a short URL: 'https://dturl.live/u/dev-tips'
Feel free to reach out to me if you have any doubts or need assistance


Update ryantanlien.md

Draft ppp
https://ryantanlien.github.io/tp/team/ryantanlien.html

Codecov Report

Merging #236 (e4ef3d1) into master (350c93c) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #236   +/-   ##
=========================================
  Coverage     72.10%   72.10%
  Complexity      552      552
=========================================
  Files            89       89
  Lines          1660     1660
  Branches        189      189
=========================================
  Hits           1197     1197
  Misses          401      401
  Partials         62       62

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 350c93c...e4ef3d1. Read the comment docs.


Gaussian Mixture Model example bug

Related to the example:
https://probflow.readthedocs.io/en/latest/example_gmm.html
The model is defined as follows:
class GaussianMixtureModel(pf.Model):
    def __init__(self, k, d, *args):
        super().__init__(*args)
        self.mu = pf.Parameter([k, d])
        self.sigma = pf.ScaleParameter([k, d])
        self.theta = pf.DirichletParameter(k)

    def __call__(self):
        dists = tfd.MultivariateNormalDiag(self.mu(), self.sigma())
        return pf.Mixture(dists, probs=self.theta())

And then evaluated as:
Np = 100  # number of grid points
xx = np.linspace(-6, 6, Np)
Xp, Yp = np.meshgrid(xx, xx)
Pp = np.column_stack([Xp.ravel(), Yp.ravel()])
probs = model.prob(Pp.astype('float32'))

This produces following error, because there is no X -> Y mapping in this example. This is pure generative model:
TypeError: __call__() takes 1 positional argument but 2 were given

model.prob calls the above implemenation of __call__ which doesn't accept any x.
It can be easily fixed by passing the values as y:
probs = model.prob(x=None, y=Pp.astype('float32'))

I'm not sure whether it's documentation or implementation error. It would seem more natural to just provide the X-value if the Y is not present in the model.

Hi!
Thanks for pointing out the issue!  Looks like there was a bug with the older version on PyPi (so, the docs are correct and it's an implementation error which had been fixed since, but I hadn't updated the packaged version).  Released the newest version on PyPi, which should work with that example. You should be able to install the updated version with either
pip install --upgrade probflow

or, directly from the source on github:
pip install git+https://github.com/brendanhasz/probflow.git

Thanks again and let me know if that solves the problem.
Cheers,
Brendan

Thanks, it works now. I'll use the git version from now on.


Python 3.10 compatiblity

  File "/app/src/gateway/graphql/project.py", line 118, in <module>
    from aiodataloader import DataLoader
  File "/venv/lib/python3.10/site-packages/aiodataloader.py", line 2, in <module>
    from collections import Iterable, namedtuple
ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)

See (for example) https://github.com/Kozea/pygal/commit/7796f14c80fe82b9435cdc33b7d2939c8331d649 for potential fix

Resolved as of release 0.2.1.


Allow side effects in link.update( )

When you update the link to object or array, you still have to return the value.
link.update( obj => { delete obj[ key ]; return obj; } )

Which is not good.  It should look (and still work) like this:
link.update( obj => delete obj[ key ]  )

Then it will be perfect. In the next minor version.

Looks like it's impossible (or very hard) to do. Implemented proxy array and object methods instead in 1.3


Oligocene release II (Asia)

Activity
Show details
Write a comment…
indre.zliobaite Nov 20, 2023 8:43 AM
ongoing, one by one locality