Provider API breaks strict typing

The Provider API magically provides props for a component that requires those props. For example if we have a regular React code before provider is used like this:
const todos = [];
render(<App todos={todos} />, document.body)

After using Provider we change it to following:
render(<Provider store={store}><App /></Provider>, document.body)

this is not a problem in regular JS or JSX, but when I use TypeScript, the compiler complains that App requires required prop todos. Of course I can make it an optional property but that's not optimal.

<Provider> itself has no effect on what props a component receives.
You probably confuse it with connect(). This is what injects those props into your component.
It is explicit:
import { connect } from 'react-redux'

class App extends Component { }

export default connect(
  mapStateToProps
)(App)

I don’t know enough about TypeScript but I imagine you could write bindings for connect() which would tell TypeScript how it works. Unfortunately I don’t think we can do anything on our side to better support this. If you look at connect() source, you will see that it passes those props explicitly to the component you wrap with connect() so there is no magic here.

Thanks for clarification. I use TypeScript type definitions from TSD repository. It works great with JSX.
Consider following example:
export default class App extends Component<AppProps, AppState> { render(){/*...*/} }

which AppProps and AppState are simply interfaces. If AppProps is this interface:
interface AppProps {
  todo: Array<{}>
}

This TSX code will complain that App needs required property todo:
import {render} from 'react';
import App from './app';

render(<App />, document.body);

Now if I use redux connect method in app.tsx like following:
import {connect} from 'react-redux';

class App extends Component<AppProps, AppState> { render(){/*...*/} }

export default connect(state=> {todos: state.todos})(App)

The TSX compiler will not understand the connect made a new component that does not have the same props.
This is most likely due to type definition or TSX capabilities. I just wanted to leave this write up for future references.
I'll post here if I could figure it out although I'm pretty new to React, Redux and TypeScript!

The problem is likely that those typings don’t tell TypeScript that parent props are going to be merged with what you return from mapStateToProps and mapDispatchToProps. We don’t maintain those typings officially so I can’t vouch for their quality.
Related: https://github.com/reactjs/redux/issues/1401.
cc @aikoven @ulfryk

@mohsen1 I'm using custom typings for connect:
  export interface ClassDecorator<P, O> {
    (component: StatelessComponent<P>): ComponentClass<O>;
  }

  export function connect<O, S, D>(
    mapStateToProps?: MapStateToProps<O, S>,
    mapDispatchToProps?: MapDispatchToPropsFunction<O, D>|D
  ): ClassDecorator<O & S & D, O>;

  export function connect<O, S, D, P>(
    mapStateToProps: MapStateToProps<O, S>,
    mapDispatchToProps: MapDispatchToPropsFunction<D, O>|D,
    mergeProps: MergeProps<S, D, O, P>,
    options?: Options): ClassDecorator<P, O>;

  export interface MapStateToProps<O, S> {
    (state: any, ownProps?: O): S;
  }

  export interface MapDispatchToPropsFunction<O, D> {
    (dispatch: Dispatch, ownProps?: O): D;
  }

  export interface MergeProps<S, D, O, P> {
    (stateProps: S, dispatchProps: D, ownProps: O): P;
  }

They only work with stateless functional components and don't cover all cases, but types are inferred correctly:
const App = connect(
  selector,
  {
    actionCreator,
  }
)(props => {
    // `props` type is inferred from return type of `selector`
    // and shape of action creators object
})

The major drawback that kept me from submitting these to DefinitelyTyped is that TypeScript doesn't understand decorators that change type.
Before that I had to explicitly specify props type and make every prop optional.

@aikoven how is Angular2 solving it with their decorators?

@mikekidder I'm not aware of it, could you please point to some examples?

@aikoven can you share your full react-redux.d.ts file so I can try it out?

@mohsen1 https://gist.github.com/aikoven/be8a430ab2a38baaf29f

@gaearon - I also had this problem, but did not found any good solution. It's actually problem of how .tsx understands component class.
@mikekidder - Angular2 decorators are not useful here. Their way is binding a property of a class to input attr. If something similar was made for react it would look like this:
@connect
class App extends Component<{},{}> {

    @connectProp('title')
    appTitle: string;

    render() {
        return <h1>{this.appTitle}</h2>
    }

}

and now render(…, <App/>) would compile, because binding of title="…" property to component attribute appTitle is done under the hood and .tsx compiler thinks that App does not have any props. And this of course will work well if we omit using of regular props…

Don't suppose this has been resolved nicely yet for decorating React components defined as classes?

@codeandcats Nope, but there are some issues in TS repo to track, e.g.: https://github.com/Microsoft/TypeScript/issues/4881

I tried out https://github.com/reactjs/react-redux/pull/433 and those typings work as expected for me. The return type of connect is
interface ComponentDecorator<TOriginalProps, TOwnProps> {
	(component: ComponentClass<TOriginalProps>|StatelessComponent<TOriginalProps>): ComponentClass<TOwnProps>;
}

which is exactly what we want!

@Zalastax it looks like that PR has been closed. 😢  I don't suppose you feel like forking and re-requesting it? 🌹


Fix dashboard token being written on publish

Fixes https://github.com/dotnet/aspire/issues/3387
Microsoft Reviewers: Open in CodeFlow

/backport to release/8.0


Offline deduplication mechanism

https://github.com/treeverse/lakeFS/issues/1762 introduced the following use-case:

We have a pipeline runs weekly and generates a large number files for thousands GB data. Most of the data would not be exactly same, with few new files and some updates to old files.
We expect to create a new branch and aws sync the data, then compare the diff and merge.

We would expect the data storage would not double every week, but increase with only new data.

To support that we thought of adding an offline deduplication mechanism that will clean up objects uploaded to multiple branches.

@treeverse/product : dedupe was an explicit goal, but we're moving away from it.  This had some customer demand and is often surprising to customers.  I would rather we could add an explicit note here than let the bot close it in silence.


[Question] Decouple controller, write model component

Supersedes PR #34, closes #37.
Also closes #35. Works towards #36.

Breaking changes:

When attempting to POST a question with a duplicate title, the JSON returned is now the duplicate question instead of an error message. The status code remains 409 (Conflict).
When attempting to GET a question that does not exist, a general error message is no longer included (404 suffices).

Manually rebased to hopefully make reviewing less messy.

Tbh the controller is now so straightforward that I really think there is no benefit to mocking the entire model just to unit test it. And it is the model involving Firestore that is very troublesome to test. Please weigh in.


Detect trailing bare carriage return in comment

The non-conforming TOML snippet
The following snippet isn't exactly accurate since I'm showing a carriage return control character as an escape sequence.
#\r

More explicitly as a hexdump:
$ echo -n "#\r" | hexdump -C
00000000  23 0d                                             |#.|
00000002

What you expected
I expected this to be an invalid TOML document.
What you got
It's parsed a valid input.
$ echo -n "#\r" | tt_decoder
{}

Environment
toml++ version and/or commit hash:
v3 7d3770df92ceeee7c9fe4c2b15d50b23a620ab28
Any other useful information
A bare carriage return (0x0d) is not a valid whitespace or newline character within a comment.  It must be followed by a line feed (0x0a).  This issue only exists when it's followed by the EOF.  If any other character follows the carriage return, it's properly detected as invalid input.
I plan to submit a test case for this to toml-test.
Found while doing differential fuzzing against go-toml.

Oh, this one's easy; I explicitly check for EOF after an \r and permissively accept it:
https://github.com/marzer/tomlplusplus/blob/7d3770df92ceeee7c9fe4c2b15d50b23a620ab28/include/toml%2B%2B/impl/parser.inl#L1160-L1161
I guess it's not so 'fine' after all :D

Fixed in v3, thanks!


One-Shot mode not working?

I have the MCP3561 ADC but i only got i working with MCP3561_CONFIG3_CONV_MODE_CONTINUOUS command. When i try MCP3561_CONFIG3_CONV_MODE_ONE_SHOT_STANDBY i got 1 value but i can not get another one. Probably have the wrong settings but i have no idea wat i did wrong.
My config
`
cmd[0]  = MCP3561_CONFIG0_WRITE;
cmd[1]  = MCP3561_CONFIG0_CLK_SEL_EXT;   // clock selection
cmd[1] |= MCP3561_CONFIG0_ADC_MODE_CONV; // standby or converting
cmd[1] |= MCP3561_CONFIG0_CS_SEL_NONE;   // input current
_MCP3561_write(hspi, cmd, 2);
cmd[0]  = MCP3561_CONFIG1_WRITE;
cmd[1]  = MCP3561_CONFIG1_OSR_20480;      // over sampling rate MCP3561_CONFIG1_OSR_20480
cmd[1] |= MCP3561_CONFIG1_AMCLK_DIV8;    // sampling clock prescaler
_MCP3561_write(hspi, cmd, 2);

cmd[0]  = MCP3561_CONFIG2_WRITE;
cmd[1]  = MCP3561_CONFIG2_BOOST_x1;   // Boost
cmd[1] |= MCP3561_CONFIG2_GAIN_x1;    // Gain
cmd[1] |= MCP3561_CONFIG2_AZ_MUX_ON; // offset cancellation algorithm
cmd[1] += 3; // last two bytes must always be 11
_MCP3561_write(hspi, cmd, 2);

cmd[0]  = MCP3561_CONFIG3_WRITE;
cmd[1]  = MCP3561_CONFIG3_CONV_MODE_ONE_SHOT_STANDBY; // conversion mode
//cmd[1]  = MCP3561_CONFIG3_CONV_MODE_CONTINUOUS; // conversion mode
cmd[1] |= MCP3561_CONFIG3_DATA_FORMAT_32BIT_CHID_SGN;    // SPI output data format, (32 and 24 bit available)
cmd[1] |= MCP3561_CONFIG3_CRCCOM_OFF;           // CRC
cmd[1] |= MCP3561_CONFIG3_GAINCAL_OFF;          // gain calibration
cmd[1] |= MCP3561_CONFIG3_OFFCAL_ON;           // offset calibration
_MCP3561_write(hspi, cmd, 2);

cmd[0]  = MCP3561_IRQ_WRITE;
cmd[1]  = MCP3561_IRQ_MODE_IRQ_HIGH;  // IRQ default pin state
cmd[1] |= MCP3561_IRQ_FASTCMD_ON;     // fast commands
cmd[1] |= MCP3561_IRQ_STP_ON;         // start of conversion IRQ
_MCP3561_write(hspi, cmd, 2);

cmd[0]  = MCP3561_MUX_WRITE;
cmd[1]  = (MCP3561_MUX_CH_AGND << 4) | MCP3561_MUX_CH0;

_MCP3561_write(hspi, cmd, 2);

`

Hi, it's been a while since I last used the lib. And I only ever used the continuous mode (read: the one-shot mode is untested).
Right now I don't have the time or the hardware to debug this. If you manage to get it working and it is a flaw of the lib, feel free to send a pull request.
My only idea currently:

Do you need to trigger a new conversion from standby mode?

Hi, it's been a while since I last used the lib. And I only ever used the continuous mode (read: the one-shot mode is untested). Right now I don't have the time or the hardware to debug this. If you manage to get it working and it is a flaw of the lib, feel free to send a pull request.
My only idea currently:

Do you need to trigger a new conversion from standby mode?

Thanks for your reply. I trigger the conversion with a button of something else. So i dont know where the issue is.
I will look into the following solutions:

Triggering with button and ISR

Reading IRQ? I dont see an interrupt. I do see it with the continuous mode. I do see the SPI command for ADC conversion

Getting the ADC out of a possible standby?

I will keep you updated


Params input

Fixes #145 and adds unit tests for Params methods

One small thing, otherwise looks good!

LGTM! Thanks @jwittenbach


Fix RWC tests with errors in tsconfig

RWC tests currently fail because one of the tests includes tsconfig in the input file set, so the harness double-reports errors. This is brand new after our new deprecations, but we didn't seem to notice as the RWC tests were still reporting baseline differences.
This sort of thing appears to already be worked around for lib.d.ts files, so, do something similar to tsconfig to get RWC passing again.

@typescript-bot test this

The above passes, but now exposes the fact that RWC (unlike our other tests) doesn't reply with "everything looks good".


BUG: optimize: add a missing attribute of OptimizeResult in basinhopping

Reference issue

Fix #4630
(Other issues reported in #4630 has been fixed in #14884)
What does this implement/fix?

https://github.com/scipy/scipy/issues/4630#issuecomment-570905172 reported that OptimizeResults of basinhopping is missing the success attribute.
So, I fixed it and added a test for it.

I added test suites for all global optimization solvers except brute. (I realized brutebrute does not return OptimizationResult.)


[.NET Native] The ilc folder is not automatically recreated if the bin and obj folders are deleted

This results in this error which can be avoided if the ilc folder is created manually.
Could not write lines to file "<path-to-UWP-project>\bin\x86\Release\ilc\\DotNetNative.debugger-services-def.json". Could not find a part of the path '<path-to-UWP-project>\bin\x86\Release\ilc\DotNetNative.debugger-services-def.json'.

Thanks for reporting the issue to us. This issue was moved to Project N bug tracker (ID: 659568). For future issues with .NET Native for Universal Windows Apps, please follow the process described here. The CoreRT repo is not tracked by people working on .NET Native for UWP apps.


InvalidArgumentError (see above for traceback): indices[104] = 3541 is not in [0, 3541)

I'm trying to run 'example_run.py' with Anaconda python 3.6,  tensorflow 1.4.0
InvalidArgumentError (see above for traceback): indices[104] = 3541 is not in [0, 3541)
[[Node: nce_loss/negative_sampling/nce_loss/embedding_lookup_1 = Gather[Tindices=DT_INT64, Tparams=DT_FLOAT, _class=["loc:@nce_biases"], validate_indices=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](nce_biases/read, nce_loss/negative_sampling/nce_loss/concat)]]

---------------------------------------------------------------------------
InvalidArgumentError                      Traceback (most recent call last)
~/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/client/session.py in _do_call(self, fn, *args)
   1322     try:
-> 1323       return fn(*args)
   1324     except errors.OpError as e:

~/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/client/session.py in _run_fn(session, feed_dict, fetch_list, target_list, options, run_metadata)
   1301                                    feed_dict, fetch_list, target_list,
-> 1302                                    status, run_metadata)
   1303

~/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py in __exit__(self, type_arg, value_arg, traceback_arg)
    472             compat.as_text(c_api.TF_Message(self.status.status)),
--> 473             c_api.TF_GetCode(self.status.status))
    474     # Delete the underlying status object from memory otherwise it stays alive

InvalidArgumentError: indices[104] = 3541 is not in [0, 3541)
	 [[Node: nce_loss/negative_sampling/nce_loss/embedding_lookup_1 = Gather[Tindices=DT_INT64, Tparams=DT_FLOAT, _class=["loc:@nce_biases"], validate_indices=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](nce_biases/read, nce_loss/negative_sampling/nce_loss/concat)]]

During handling of the above exception, another exception occurred:

InvalidArgumentError                      Traceback (most recent call last)
<ipython-input-1-50d21ae7928f> in <module>()
     35
     36 # Train the model
---> 37 model.train(pivot_words,target_words,doc_ids, len(pivot_words), 2)
     38
     39 # Analyze Document Proportions - shape [num_documents, num_topics]

~/Lda2vec-Tensorflow/lda2vec.py in train(self, pivot_words, target_words, doc_ids, data_size, num_epochs)
    176                 doc_batch = doc_ids[i * self.batch_size:i * self.batch_size + self.batch_size]
    177                 summary, _, l, lw2v, llda, step = self.sesh.run([self.merged, self.optimizer, self.loss, self.loss_word2vec, self.loss_lda, self.step],
--> 178                                                                 feed_dict={self.x: x_batch, self.y: y_batch, self.docs: doc_batch})
    179
    180                 if step > 0 and step % 100 == 0:

~/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/client/session.py in run(self, fetches, feed_dict, options, run_metadata)
    887     try:
    888       result = self._run(None, fetches, feed_dict, options_ptr,
--> 889                          run_metadata_ptr)
    890       if run_metadata:
    891         proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)

~/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/client/session.py in _run(self, handle, fetches, feed_dict, options, run_metadata)
   1118     if final_fetches or final_targets or (handle and feed_dict_tensor):
   1119       results = self._do_run(handle, final_targets, final_fetches,
-> 1120                              feed_dict_tensor, options, run_metadata)
   1121     else:
   1122       results = []

~/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/client/session.py in _do_run(self, handle, target_list, fetch_list, feed_dict, options, run_metadata)
   1315     if handle is None:
   1316       return self._do_call(_run_fn, self._session, feeds, fetches, targets,
-> 1317                            options, run_metadata)
   1318     else:
   1319       return self._do_call(_prun_fn, self._session, handle, feeds, fetches)

~/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/client/session.py in _do_call(self, fn, *args)
   1334         except KeyError:
   1335           pass
-> 1336       raise type(e)(node_def, op, message)
   1337
   1338   def _extend_graph(self):

InvalidArgumentError: indices[104] = 3541 is not in [0, 3541)
	 [[Node: nce_loss/negative_sampling/nce_loss/embedding_lookup_1 = Gather[Tindices=DT_INT64, Tparams=DT_FLOAT, _class=["loc:@nce_biases"], validate_indices=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](nce_biases/read, nce_loss/negative_sampling/nce_loss/concat)]]

Caused by op 'nce_loss/negative_sampling/nce_loss/embedding_lookup_1', defined at:
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/ipykernel_launcher.py", line 16, in <module>
    app.launch_new_instance()
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 477, in start
    ioloop.IOLoop.instance().start()
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/zmq/eventloop/ioloop.py", line 177, in start
    super(ZMQIOLoop, self).start()
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/tornado/ioloop.py", line 888, in start
    handler_func(fd_obj, events)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/tornado/stack_context.py", line 277, in null_wrapper
    return fn(*args, **kwargs)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 440, in _handle_events
    self._handle_recv()
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 472, in _handle_recv
    self._run_callback(callback, msg)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 414, in _run_callback
    callback(*args, **kwargs)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/tornado/stack_context.py", line 277, in null_wrapper
    return fn(*args, **kwargs)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 283, in dispatcher
    return self.dispatch_shell(stream, msg)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 235, in dispatch_shell
    handler(stream, idents, msg)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 399, in execute_request
    user_expressions, allow_stdin)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/ipykernel/ipkernel.py", line 196, in do_execute
    res = shell.run_cell(code, store_history=store_history, silent=silent)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/ipykernel/zmqshell.py", line 533, in run_cell
    return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2698, in run_cell
    interactivity=interactivity, compiler=compiler, result=result)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2802, in run_ast_nodes
    if self.run_code(code, result):
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2862, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-1-50d21ae7928f>", line 34, in <module>
    restore=False)
  File "/Users/davidlaxer/Lda2vec-Tensorflow/lda2vec.py", line 54, in __init__
    handles = self._build_graph()
  File "/Users/davidlaxer/Lda2vec-Tensorflow/lda2vec.py", line 121, in _build_graph
    loss_word2vec = self.w_embed(context, y)
  File "/Users/davidlaxer/Lda2vec-Tensorflow/word_embedding.py", line 52, in __call__
    sampled_values=sampler))
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/ops/nn_impl.py", line 1160, in nce_loss
    name=name)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/ops/nn_impl.py", line 995, in _compute_sampled_logits
    biases, all_ids, partition_strategy=partition_strategy)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/ops/embedding_ops.py", line 328, in embedding_lookup
    transform_fn=None)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/ops/embedding_ops.py", line 150, in _embedding_lookup_and_transform
    result = _clip(_gather(params[0], ids, name=name), ids, max_norm)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/ops/embedding_ops.py", line 54, in _gather
    return array_ops.gather(params, ids, name=name)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 2486, in gather
    params, indices, validate_indices=validate_indices, name=name)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 1834, in gather
    validate_indices=validate_indices, name=name)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2956, in create_op
    op_def=op_def)
  File "/Users/davidlaxer/anaconda/envs/spacy/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1470, in __init__
    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): indices[104] = 3541 is not in [0, 3541)
	 [[Node: nce_loss/negative_sampling/nce_loss/embedding_lookup_1 = Gather[Tindices=DT_INT64, Tparams=DT_FLOAT, _class=["loc:@nce_biases"], validate_indices=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](nce_biases/read, nce_loss/negative_sampling/nce_loss/concat)]]

On line #82 in "run_20newsgroups.py":
num_docs      = max(doc_ids)+1


Fixed a link to an LF topic

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

dynamics-nav-app/ui-extensions.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Bring canonical documentation target information into the search view

Needed for #2405 and #2413
We should store a DocumentationTarget as a JSON field in the search view.

No longer needed.


Expiration time

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Why for 7 days expiration I should specify period as seconds, for example 604800, and for 1 hour period - as \DateTimeInterface, for example 'new DateTime("1 hour")'?

The PHP Cloud Storage client uses absolute expiration dates, not intervals. You can specify the expiration as an int or as a DateTimeInterface, but if you used an int, for seven days it would be time() + 604800. If you're seeing documentation using ints and DateTimeInterface interchangeably, that's because they are interchangeable -- you may use whichever you find convenient.

I'm going to close this issue out. If you're still having trouble, please feel free to re-open!


hilt android tutorial

Preliminary Checks - Formatting and Structure

[x] Does your article follow any of the suggested structure formats? - see example formats
[x] Is your article properly formatted in Markdown? - see Github Markdown guide
[x] Have you used the correct folder and file structure? - see Contribution Guidelines
[x] Is your article over 750 words? - Tool: Wordcounter.net
[x] Have you used our preferred heading structure? - H3 (###) and up
[x] Does your article provide enough value and detail about your topic? - Articles should be clear, accurate, and fully explained.
[x] Can your article be understood by beginners? - Assume the audience is smart but has no prior exposure to the common terminology in your article.
[x] Have you included a hero image that is 600x400 pixels and have the copyright to use it? - Tools: Pixlr Image Editor for resizing and Unsplash for Creative Commons images
[x] In your PR - add a comment that states "This fixes #(enter your Idea Content Form #)" to link and close your Idea Content (issue) when the PR is merged.

Grammar & plagiarism checks

[x] Have you spellchecked and grammar checked your article? - Tools: Write&Improve - ProWritingAid -  Grammarly
[x] Please place your article through a 3rd party plagiarism checker? We suggest using Quetext, this tool is free and has a daily limit. We typically accept articles with 10% or less.
[x] Have you checked your article for readability? - Tool: Hemmingway
[x] Have you added sources for quotes and images that aren't yours?

Technical checks

[x] Are your code snippets properly formatted for syntax highlighting - see Syntax guide

Contribution guidelines
For first-time contributors and for more details, see Contributing Guidelines

This fixes #2050

@WanjaMIKE  I made the changes you requested

As you know, we were working on a new structure for our EngEd Repo, which has led to a slight slow down of article publishing. Everything is almost ready now.
In order to publish your article as soon as possible, please do the following:
Download the most recent files off this PR (Make sure to pick the latest one with my revisions and edits).
Delete your article directory from the articles folders.
Do a git pull (take a look at the new structure of the repo after a git pull).
Upload your article files to the new articles folder inside content.
Ping me via Slack if you have any problems.```

Thank you v much for your patience as we worked through our Repo re-structuring process.
The purpose behind this restructure - was to better allow us to handle more volume and allow students to publish more articles and get more involved with the community (with open-source contribution and suggestions).
With most of the changes coming to completion - we will be sure to get your article published asap.
Thank you again - and we are looking forward to more amazing articles.

plagiarism check done

@hectorkambow @WanjaMIKE did I perform the task correctly?

@RaphaelNdonga It seems to be in the correct structure I'll know for sure when I check it out 👍
Thank you

great work gents 👍  Awesome tutorial - real informative and easy to follow along - keep up the great work 🚀


No reset member function

When I tried to use propagate_const in my project, I noticed that propagate_const doesn't have a reset member function.
I prefer reset() over = nullptr to clear a unique_ptr.
Could a reset member function be added to the proposal?

I'm interested to hear how you are using propagate_const and what you are using it for.
Raw pointer does not have reset hence propagate_const does not have reset. There's no fundamental reason it could not be added. Why do you prefer 'reset'?

I'm interested to hear how you are using propagate_const and what you are using it for.
Raw pointer does not have reset hence propagate_const does not have reset. There's no fundamental reason it could not be added. Why do you prefer 'reset'?

I looked at propagate_const because SonarQube was reporting that some member functions should be const and I didn't agree.
I'm using propagate_const<unique_ptr<T>> as a class member for pimpl types, recursive types, types using composition of an optional value, and as a value type in maps - absl::flat_hash_map<U, propagate_const<unique_ptr<T>>>.
I'm using propagate_const<T*> as a class member for a pointer to the object's parent or siblings.
I'm using propagate_const<unique_ptr<T[]>> as a class member for a fixed size array with bounds only known at runtime.
I tried using libstdc++'s std::experimental::propagate_const, but it didn't work for array types.
For some of these uses, a value_ptr, https://hackernoon.com/value-ptr-the-missing-c-smart-pointer-1f515664153e, might be preferable if the class is intended to be copyable.
For std::string, I prefer clear() over = "" to avoid strlen("").
For std::vector, I would only consider clear().
So for consistency, for std::unique_ptr I prefer reset() over = nullptr.
For types with a private constructor, std::make_unique cannot be used, so I prefer reset(new T()) over = unique_ptr<T>(new T()) because it doesn't repeat the type, but maybe I should consider using = absl::WrapUnique(new T())
I'm having issues trying to replace boost::indirected_range<const vector<unique_ptr<T>>> with boost::indirected_range<const vector<propagate_const<unique_ptr<T>>>>

I looked at propagate_const because SonarQube was reporting that some member functions should be const and I didn't agree.
I'm using propagate_const<unique_ptr<T>> as a class member for pimpl types, recursive types, types using composition of an optional value, and as a value type in maps - absl::flat_hash_map<U, propagate_const<unique_ptr<T>>>.
I'm using propagate_const<T*> as a class member for a pointer to the object's parent or siblings.
I'm using propagate_const<unique_ptr<T[]>> as a class member for a fixed size array with bounds only known at runtime.
I tried using libstdc++'s std::experimental::propagate_const, but it didn't work for array types.
For some of these uses, a value_ptr, https://hackernoon.com/value-ptr-the-missing-c-smart-pointer-1f515664153e, might be preferable if the class is intended to be copyable.
For std::string, I prefer clear() over = "" to avoid strlen("").
For std::vector, I would only consider clear().
So for consistency, for std::unique_ptr I prefer reset() over = nullptr.
For types with a private constructor, std::make_unique cannot be used, so I prefer reset(new T()) over = unique_ptr<T>(new T()) because it doesn't repeat the type, but maybe I should consider using = absl::WrapUnique(new T())
I'm having issues trying to replace boost::indirected_range<const vector<unique_ptr<T>>> with boost::indirected_range<const vector<propagate_const<unique_ptr<T>>>>

You could look at indirect_value
It's newer than propagate_const, less general-purpose but probably more suited for what you need.
Do let me know how it works either way!

You could look at indirect_value
It's newer than propagate_const, less general-purpose but probably more suited for what you need.
Do let me know how it works either way!

Yeah, indirect_value looks similar to value_ptr.

Yeah, indirect_value looks similar to value_ptr.


Hide Key store password in output

SUMMARY
Hide key store password from output. The output contains of an Ansible run contains the keystore password in plain text both in the start broker section and in the acceptors section. Would it be possible to hide this with a no log option?
ISSUE TYPE

Feature Idea

Definitely a bug not to hide passwords


Increment version for face releases

Increment package version after release of azure-ai-vision-face

API change check
API changes are not detected in this pull request.


[Fix bug]: remote style and image unload in Chrome.

Coverage decreased (-0.1%) to 10.112% when pulling edefa028ccf281739c56726a3088531adbc8b2ee on iineva:master into 1e109aa310958dd86c51b8abc93c1eb8d4c2defe on hanzhangyu:master.

Coverage decreased (-0.2%) to 10.0% when pulling 9adeb9db09185538c64a195b6d3439d25e5ad74a on iineva:master into 1e109aa310958dd86c51b8abc93c1eb8d4c2defe on hanzhangyu:master.


"No Internet Connection Found" overlay is transparent and interferes with other elements

Disconnect from internet
Open app
Import wallet
"No Internet Connection Found" overlay is transparent so text is unreadable over other elements.  Cannot access '?' description for mnemonic seed

Showing an "offline" banner was the intended functionality (ala Slack) – because, at least at the moment, much of the functionality and info in the app is not usable or kept updated without an internet connection – but it was not the intended user experience. Thanks for reporting. I'll make the overlay opaque instead and pick a more suitable font color.

Closed by https://github.com/mymonero/mymonero-app-js/commit/b87291d47db6272fb24ad20771626288062d5519


Alert email sent to support team when service fails

Alert email sent out to support team when service fails
https://companieshouse.atlassian.net/browse/BI-5890
Coding Standards
Code Style Guide: https://github.com/companieshouse/dissolution-web/wiki/Code-Style-Guide
Checklist

[ ] 3 Amigos
[x] Acceptance Criteria met
[x] Branch named {feature|hotfix|task}/{S4-*}
[x] Commit messages are meaningful
[x] Manually tested
[ ] All unit tests passing
[ ] API (Karate) tests passing
[x] Pulled latest master into feature branch
[x] Code reviewed
[ ] New Docker environment variables have also been added to the revel1 environment and cidev environment
[ ] If your pull request depends on any other, please link them in the description

hard coding value for due to test limitations will be reverted in later commit


Bad separation of AI and UI

Because AI is started by UI client, the AI has to be implemented in JS even though WebSockets would provide API accessible from nearly any language *.
Client could be a separate app requesting the state of game from server.
                  +----+
+--------+        | AI |
|        +--------+----+
| Server |  WS
|        +--------+----+
+---+----+        | AI |
    |             +----+
    |
    |WS
    |
    |
+---+----+
|        |
| Client |
|        |
+--------+

Also the server URL is hard coded to client so this makes it harder to test AI's against other teams. If AI could be told to connect to specific server it would be possible to organize competitions by telling people to connect to specific server and thus teams wouldn't have to send files over email/usb stick/git.
*) Socket.io is in practice JS only but JSON over plain WS should work for this app.

Yeah, exactly :) This is a known issue but schedule was tight.
We'll separate the UI at some point if we use this game again internally.

Yep. Valid points and as Kimmo already mentioned will be fixed in next iteration.

I'm closing this as I don't want to have this hanging around on my list of open issues.

:+1:


Autocomplete broken again

No errors in vscode output but autocomplete broken again.
C# exntetion v2.0.320 for vscode 1.80.2. Using dotnet 7.0.306.
Doesnt matter if you press Tab, Click it in the list, or press enter or space, notthing happens:

Hi @shmellyorc, I see you using the new C# extension which defaults to the Roslyn LSP. Did you update your settings to Use OmniSharp? Also, do you have the C# DevKit extension installed?


Revise log_file handling in setup_logging

This PR revises (again) the log_file handling in setup_logging(). After @shagunsodhani's feedback and giving it more thought, I decided to roll back the last commit that used the log file only for rank 0. In this revision, log_file is expected to include a "rank" replacement field (e.g. /path/to/train_{rank}.log) which will then create an individual log file per rank (like before). Note that for most real-world use cases where a launcher is used (e.g. torchrun, submitit), log_file is not really needed since that functionality is already provided by the launchers. It is mostly meant to be used for jobs that are manually launched (e.g. for local debugs).

Thank you for incorporating the feedback!


Live Messaging: Registered pass thread control event

Sorry for taking a while to get to this @rahul-bluebash! I added specs and documentation and merged it.


Remove Environment reading from Service Bus

[ ] Remove reading of environment variable for properties which can be set on builder by user. Do not read them from env variables.
We found this is one of the property
As of now user can specify connection in environment variable  AZURE_SERVICE_BUS_CONNECTION_STRING and builder will read this
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusClientBuilder.java#L338

[ ] Check for other properties which is read from env variable and remove them.

Since other languages do not have this feature reading from env variable , we should not offer as of now for feature parity.

Will remove reading from environment variable AZURE_SERVICE_BUS_CONNECTION_STRING from service bus code. All other languages don't read it. But this will make java service bus SDK different from java event hubs, which reads environment variable.
We'll remove it from SB anyway. If someday a user complains we'll consider adding it to SB SDKs of all languages.
@JonathanGiles double confirm with you if you're good with SB and EH being different.

Do other languages read the EH env var, or is it Java only? I am ok with removing as we never discussed enabling this env var, as far as I recall.

Other languages don't read EH env var. Will remove it from SB then.


Callback when pin has been chosen?

Maybe im missing something obvious but I cant seem to work out how I am supposed to get an event / callback when the user has chosen a pin (status is "choose").
The "finishProcess" callback seems to only be triggered after the user has entered the pin when the status is "enter".

You can use storePin={pin => storePin(pin)}, but then you need to provide your storage mechanism.

Hey!
Thanks @Panda-ref :). That's how it's suppose to work indeed.
If you were thinking of something different @mikecann, please tell me :).
Cheers

@Haskkor Well no I was hoping that that I could use the internal storage mechanism and still have a way to navigate to the next screen once the user has chosen their pin code.
As far as I can tell there is no way of navigating to the next screen?
Ill do a PR to add this in, maybe it will make more sense.

It makes sense. I'm keen on doing it if you don't have time to do this. Tell me :)

@Haskkor I just did it on my fork, but running into some issues while trying to test it locally (React-Native) caching issues, so either you can take a look at the PR and edit it (and test it) or do it yourself I dont mind :)

Nice :). I'm closing this issue and testing the PR later today. Thanks again.


My custom rules cannot be skipped using tag "skip_ansible_lint"

Issue Type

Bug report

Ansible and Ansible Lint details
ansible <IP_ADDRESS>
ansible-lint 3.4.17

ansible installation method: pip
ansible-lint installation method: pip

Desired Behaviour
Being able to use the tag skip_ansible_lint for my custom rules
Actual Behaviour (Bug report only)
I have this custom rule which I use doing ansible-lint -r
from ansiblelint import AnsibleLintRule
import re

class NoKeyValueFormat(AnsibleLintRule):
    id = 'ANSIBLE0003'
    shortdesc = 'Dont use key=value format for tasks'
    description = 'You should use native YAML syntax instead of key=value format'
    tags = ['formatting']

    def match(self, file, line):
        pattern_name = re.compile('^[\s|-].*name:')
        pattern_when = re.compile('^[\s].*when:')
        pattern_key_value = re.compile('[a-zA-Z0-9_.-]=["{a-zA-Z0-9_.-]')
        if pattern_name.findall(line):
            return False  # if this is the name of the task skip check
        if pattern_when.findall(line):
            return False  # if this is a conditional skip check
        if pattern_key_value.findall(line):
            return True  # search for key=value format in any other lines

I have a false positive in one of my tasks and I would like to use skip_ansible_lint for this task but it doesn't work.  The custom rule is always applied no matter which tags I apply to the task.
Is this an error in my custom rule or is it a bug in ansible-lint?

you're matching against lines, and skip_ansible_lint works at the task level.
ansible-review has a check for this. It would be possible to convert the check to be used by ansible-lint, I believe, and handle skip_ansible_lint, but I've made no effort to do so
https://github.com/willthames/ansible-review/blob/master/lib/ansiblereview/tasks.py

thanks for the clarification @willthames . I understand now.
Is there any easy way to apply my rule at the task level so I can use skip_ansible_lint. Something like this pseudococe?
for task in playbook:
    applyMyrule()

I think this way I would keep the same functionality and I would be able to use skip_ansible_lint but I am not sure if this is easy to do with ansible-lint

There are three match functions, one of which matches at the task level.
Have a look at the built-in rules, such as UseBecomeInsteadOfSudo (not at a
computer right now to check)
On 7 Dec 2017 18:27, "Pablo Escobar Lopez"<EMAIL_ADDRESS>wrote:

thanks for the clarification @willthames https://github.com/willthames
. I understand now.
Is there any easy way to apply my rule at the task level so I can use
skip_ansible_lint. Something like this pseudococe?
for task in playbook:
applyMyrule()
I think this way I would keep the same functionality and I would be able
to use skip_ansible_lint but I am not sure if this is easy to do with
ansible-lint
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/willthames/ansible-lint/issues/307#issuecomment-349896940,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAX6f1hfTFHD04zC1nXjGvVEswZnbaUZks5s96FSgaJpZM4Q4fPO
.

I did indeed look into using matchtask, however my obstacle there was that the task at that point has already been parsed and so rules you wish to apply against the syntax in the playbook can't go there, if I understand correctly?
In my particular case it's a rule to look for any tasks using the older style key=value, but inside the matchtask() method, task is already parsed into a dictionary and so you cannot see what the original form was at that point?

@rylon ah, I understand that use case very well - that's #297, which is hard for the reasons that you state.
It's definitely possible, but would require exposing a different kind of rule. I do usually just say "ansible-review does this by design, use that" but I can see the appeal of getting the same check into ansible-lint.
Those are my thoughts, I'll let others decide where it should go on the roadmap.

Thanks :) I'll also take a look at porting over to Ansible Review, do you have any recommendations for approaching that? We're using the built in rules from ansible-lint and around 10 or so of our own custom ones, so not a massive amount. If we could match the rules that would be fine I think.

@Rylon ansible-review is more of a pick and mix - have a look at the examples - they were heavily based on the rules I used at the time, it should show how to set up your own rules.

Cool, thanks @willthames I'll see if I can take a look this week to migrate over 👍


The SSH command responded with a non-zero exit status.

Just got this error and the process exited.
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

I'm also receiving this error with any new vagrant machines.

Bump. I get this as well.

I got it also, at the end of provisioning process, but whole VM seems to be doing fine anyway,

I've been getting this for the last month or so.
Also, in addition to this error, sometimes I have to destroy and rebuild the machine multiple times before it works. After the initial setup hurdle the box seems to work just fine, however.
I've tried halting and then running vagrant up to save time, but then it just gets stuck in a remote disconnect loop.

I've been having this problem too — here's my fix, in the hopes that it helps someone else.
When I inspected the verbose output from vagrant up, I noticed that errors during installation were always preceded by this message:

The following exception is caused by a lack of memory and not having swap configured
Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details

The note at that URL indicates that Composer (which Vagrant appears to be using to pull in extra PHP libraries for Wordpress) fails in this manner when it's out of RAM. So I modified the project's Vagrantfile like so:
config.vm.provider :virtualbox do |vb|
    # Add the following line if Composer is running out of RAM
    vb.memory = 2048
    vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
    vb.customize ['modifyvm', :id, '--natdnsproxy1', 'on']
end

Worked on the first try. You may be able to adjust this line to reduce the amount of memory you're allocating to Vagrant, if your system isn't long on available RAM.
(Fair warning that I know absolutely nothing about Vagrantpress, Composer, or Vagrant other than what I've learned trying to set up this project, so I don't have any further insight other than what I've noted here!)

@rap your comment is a good candidate for the wiki, maybe under "Troubleshooting Tips" or similar

@battlemidget That's a good idea — adding it now.

Thanks!
https://github.com/chad-thompson/vagrantpress/wiki/Troubleshooting-tips

So I guess the question here is do we set a default minimum memory or just direct those to the wiki page if this problem occurs?

Can we add a link to the troubleshooting tips from the main README as well? I had no idea that it existed (many open source wiki's are blank).


dev: Upgrade Python from 3.7 → 3.10

Accounts for the same change being made to nextstrain/base¹, soon to be released.
Upgrades Python deps too since that it was necessary to let Pipenv re-resolve and lock the dep tree given the Python major version change. There may be fallout from this, e.g. from breaking changes in newer package versions that we were insulated from by previous locking.
¹ https://github.com/nextstrain/docker-base/pull/102
Testing

[x] Checks pass
[x] docker build -t nextstrain/ncov-ingest:latest . works locally

Done. Will merge once CI passes again.


Runaway mono processes

Three times so far, I've had Unity hang up on compiling scripts (only with your compiler). Trying to remove the compiler folder (in order to go back to default compiler) yielded a message that it is in use. Looking through the processes in Task Manager reveals anywhere from 2 to 5(!) copies of mono.exe*32 running.

I've experienced same thing long time ago and it's been several months since last happen so i guessed it's gone but it seems not. Could you give me a log file when hang problem happened?


Align RegExp.prototype and instance properties with ES6

[x] RegExp.prototype is no longer a RegExp instance
[x] .source, .global, .ignoreCase, .multiline are inherited getters instead of own properties
[x] .sticky, .unicode are new in ES6 (return false for now)
[x] .flags is new in ES6, implement
[x] RegExp constructor looks up .flags rather than .global, .ignoreCase, .multiline when argument is a RegExp instance
[x] RegExp constructor allows a RegExp instance and an (overriding) flags argument
[x] RegExp constructor non-constructor call handling (maybe future work) #1179
[x] RegExp .flags implementation future work (should do explicit property accesses which matters if getters are replaced) #1179
[x] Testcase coverage
[x] 2.0 migration notes
[x] Releases entry

What I don't understand is why both Firefox and V8 accept this:
> RegExp.prototype.source
'(?:)'

The .source getter should TypeError if the target isn't an object (not triggered here) or doesn't have RegExp internal slots (should trigger here because RegExp is a plain object and is explicitly described not to have internal slots).
Specifically:

http://www.ecma-international.org/ecma-262/7.0/#sec-properties-of-the-regexp-prototype-object: "The RegExp prototype object is an ordinary object. It is not a RegExp instance and does not have a [[RegExpMatcher]] internal slot or any of the other internal slots of RegExp instance objects."
http://www.ecma-international.org/ecma-262/7.0/#sec-get-regexp.prototype.source: "If R does not have an [[OriginalSource]] internal slot, throw a TypeError exception."

This is noted in #1179 for figuring out as future work.

To clarify, the code in this pull will TypeError for RegExp.prototype.source etc.

As a related issue, RegExp.prototype.toString() is generic and allows any object argument. However, it constructs the result by reading .source and .flags, and when applied to RegExp.prototype itself .source should cause a TypeError as far as I can see.
As a result, String(RegExp.prototype) is TypeError at least for now.

Weird... Clicking on task items no longer causes the item to become checked (but I can edit the text manually). Oh well :)

I'm not able to check the boxes on mobile, but it still seems to work on the full desktop site.  Huh.

Some of the ES6 changes seem a bit odd (or maybe I'm misinterpreting them) but overall the changes are for the better. I actually had a low memory note that .source etc should be getters to reduce property count on instance objects. Also the flags handling in constructor is now simplified. So overall both code footprint and RAM footprint are reduced (slightly).

Regarding RegExp.prototype.toString(), I found this:
https://bugs.chromium.org/p/v8/issues/detail?id=4617
Apparently the ES6 behavior broke the Web so they patched V8 to return (some of) the ES5 behavior.  I guess SpiderMonkey followed suit.

Thanks, that's a good find. So, it's "real world" behavior that Duktape may need to imitate for similar reasons.

I also do find it quite annoying that String(RegExp.prototype) is a TypeError.

ES8 will change the RegExp accessors to return undefined when called on RegExp.prototype instead of throwing, see this TC39 pull:
https://github.com/tc39/ecma262/pull/263
The spec change that was ultimately done:
https://github.com/tc39/ecma262/commit/1a2ca97c1949ce0d0ee64dbc40da01574f0b1cd2
Note that calling them as methods of anything other than RegExp.prototype that's not a regexp is still a TypeError.

Just to check, that undefined clause is still present in the latest ES8 draft:
https://tc39.github.io/ecma262/#sec-get-regexp.prototype.sticky

That behavior sounds best for now I think. It may still change in finalization (so technically Duktape won't be tracking the latest released specification... :) but that's not a big deal.
Also the current behavior in this branch to return false for .sticky interferes with the feature detection described in the links you provided. So both .sticky and .unicode should be absent until implemented.

Thanks for the detective work BTW :)

No problem, always happy to help. :)
Re: Implementing ES-draft features: That's actually how the specification process is meant to work IIRC - engines implement proposals to see what works, and only if enough engines implement a feature (and keep it), it makes it into the final version.
To be clear I'm not implying that Duktape should do that - we don't even implement all of ES6 yet.  Just pointing out that I don't think anyone will mind if we take the occasional bit from a draft specification. :)

Yeah I agree. Though I think it mostly really makes sense when the draft is fixing something that has actual meaning in the current specification version. In other words, I'd like to avoid switching trivia back and forth as drafts change behavior. Sometimes that's not possible I agree.

Now this pull adopts the draft ES2017 behavior for .source, .global, etc. Also .sticky and .unicode were removed so that their presence won't interfere with any application feature detection.


Wrong warning about get_node() + @onready annotation

Godot version
f7397a5ac
System information
Linux archlinux 6.1.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 24 Jan 2023 21:07:04 +0000 x86_64 GNU/Linux
Issue description
I'm getting:

Warning:  The default value is using "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this. (Warning treated as error.)

However, the code is using @onready:
@onready var _health_bar: HealthBar = get_node(_path_health_bar)

Steps to reproduce
Having code like...
@onready var _child: Node2D = get_node("Child")

... produces this warning:

SCRIPT ERROR: Parse Error: The default value is using "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this. (Warning treated as error.)

Minimal reproduction project
gdscript_get_node_onready.zip

I guess this is a duplicate of #72501.


🍒 Cherry pick PR #20291 to staging 🍒

🍒 Cherry pick https://github.com/Expensify/App/pull/20291 to staging 🍒

This pull request has merge conflicts and can not be automatically merged. :disappointed:
Please manually resolve the conflicts, push your changes, and then request another reviewer to review and merge.
Important: There may be conflicts that GitHub is not able to detect, so please carefully review this pull request before approving.

🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 1.3.25-3 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.25-8 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 1.3.28-2 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.28-5 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Limit outgoing requests

Tackled some TODOs I found in msg-socket

added an error if endpoint invalid
added semaphore to limit the amount of active outgoing requests. Given this info, we can now pre-allocate the necessary memory to egress_queue and pending_requests

Had to change spawn_listener to continuously accept connections

@solidoracle thanks for taking this on! Before reviewing individual lines of code, architecturally we want "control logic" like this to be in the socket drivers. The driver is a single task that's not clone-able, which means that instead of a semaphore we can use simple integer counters. The socket front-end (ReqSocket) does not need to be aware of any of this logic and should be as simple as possible.


Component option type

Theoretically, it’d be possible to nest components:
const config = {
  components: {
   "Primitives / Modal": {
      render: ({ options }) => (
        <Modal>
          {options.content}
        </Modal>
      ),
      options: [
        {
          label: "Content",
          key: "content",
          type: "component”
        }
      ]
    }
  }
};

The UI for this would be… something recursive.

This is a bad idea. Rendering components will be complicated and it’ll lead to developers writing their components in a very specific way to be compatible with Sketchbook. Don’t want that. Better to make recursive options (or just a JSON option type).


wasmtime: fix lib on darwin

Description of changes

Before:
otool -D result-dev/lib/libwasmtime.dylib
result-dev/lib/libwasmtime.dylib:
/private/tmp/nix-build-wasmtime-9.0.2.drv-0/source/target/aarch64-apple-darwin/release/deps/libwasmtime.dylib

After:
otool -D result-dev/lib/libwasmtime.dylib
result-dev/lib/libwasmtime.dylib:
/nix/store/bz6l7dr60izrq6vga83df9y2p1mgh5hw-wasmtime-9.0.2-dev/lib/libwasmtime.dylib

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 234873 run on x86_64-darwin 1

2 packages built:

wasmtime
wasmtime.dev


[DS-3006] Add explicit data support

Describe the big picture - why are we doing this?
Closes https://github.com/ShopRunner/collie_recs/issues/10.
Any additional details to clarify code in the PR?
My hope was to introduce explicit data support with 1) no breaking changes to existing pipelines, 2) a minimal amount of API changes from the implicit counterpart, and 3) lots of data quality checks to reduce mistakes. If you see any improvements in here that I should add, please let me know!
How is this tested?
Pull Request Checklist

[x] Pull request includes a description of why we are doing this
[x] CHANGELOG has been updated
[x] Version in _version.py has been updated
[x] All tests in the tests folder pass with a local build
[x] README has been updated (if applicable)
[x] Documentation in docs has been updated (if applicable)
[x] requirements.txt and requirements-dev.txt have been recompiled (if applicable)

Screenshots or GIFs?

Thanks for all your comments, Nate! I'm understanding this better. I continued our discussion on how to handle implicit mashup modelds. And did you decide to add a warning when I e.g.  pass in hinge instead of adaptive_hinge in the base pipeline (see comment above)?

Thanks for all your comments, Nate! I'm understanding this better. I continued our discussion on how to handle implicit mashup modelds. And did you decide to add a warning when I e.g. pass in hinge instead of adaptive_hinge in the base pipeline (see comment above)?

Yes I did, see here for that warning: https://github.com/ShopRunner/collie_recs/blob/eba517872438d3b33d96fc46b54be92e8949ad9f/collie_recs/model/base/base_pipeline.py#L283-L290

https://media.giphy.com/media/jmS6YojdAaYw5z1LHi/giphy.gif


Remove GetRoot from ConsensusState interface

Summary
It is unused by core IBC

For Admin Use

[ ] Not duplicate issue
[ ] Appropriate labels applied
[ ] Appropriate contributors tagged/assigned

Closed by #1186


timestamps are not converted to the client time zone

I get data from an influxdb. The time field of the result is a date object. The detail popup on the map now shows the UTC time, but it should show the local time. A manual time.toString() shows the time in the correct time zone.

you can replace the property in the message however you like so feel free to do that before sending to the map.


Ignore unused textures

Ignore textures not used by shader and not included into asset bundles

Are they not included in the build though ?
Cause i asked someone knowledgeable & to their knowledge it is included.
Do you have any more info / documentation backing this up?

I tested this in editor. Made a simple cube avatar, added material and set it to UTC shader then assigned main texture and shade map texture then made a build and examined build log. Shade map indeed exists in asset list.
Then I switched shader to Poiyomi (it does not support shade map material property) and made another build then examined log again - shade map texture now missing from the list.
Shade map texture: Assets/Avatars/KissMa/_CommonFolder/Textures/hair1_mask4.png
Log output:
UTC Shader with shade map texture hair1_mask4.png
-------------------------------------------------------------------------------
Bundle Name: prefab-id-v1_avtr_3d2543ce-8dd9-48bf-a227-561e6e25b8d2_0592254213.prefab.unity3d
Compressed Size:243.1 kb
Uncompressed usage by category (Percentages based on user generated assets only):
Textures               1.5 mb	 66.9%
Meshes                 0.0 kb	 0.0%
Animations             0.0 kb	 0.0%
Sounds                 0.0 kb	 0.0%
Shaders                635.6 kb	 27.7%
Other Assets           43.2 kb	 1.9%
Levels                 0.0 kb	 0.0%
Scripts                0.2 kb	 0.0%
Included DLLs          0.0 kb	 0.0%
File headers           80.6 kb	 3.5%
Total User Assets      2.2 mb	 100.0%
Complete build size    2.2 mb
Used Assets and files from the Resources folder, sorted by uncompressed size:
 1.0 mb	 44.6% Assets/Avatars/KissMa/UltimateSporty/Textures/faceparts.png
 635.6 kb	 27.7% Assets/Toon/Shader/Toon_DoubleShadeWithFeather.shader
 512.2 kb	 22.3% Assets/Avatars/KissMa/_CommonFolder/Textures/hair1_mask4.png
 40.2 kb	 1.8% Assets/TestMaterial.mat
 2.4 kb	 0.1% Assets/prefab-id-v1_avtr_3d2543ce-8dd9-48bf-a227-561e6e25b8d2_0592254213.prefab
 0.5 kb	 0.0% AssetBundle Object
 0.1 kb	 0.0% Assets/VRCSDK/Plugins/VRCSDK3A.dll
 0.1 kb	 0.0% Assets/VRCSDK/Plugins/VRCCore-Editor.dll
-------------------------------------------------------------------------------

Poiyomi shader, shade map texture hair1_mask4.png referenced in material but missing from the build
-------------------------------------------------------------------------------
Bundle Name: prefab-id-v1_avtr_3d2543ce-8dd9-48bf-a227-561e6e25b8d2_4587256752.prefab.unity3d
Compressed Size:265.0 kb
Uncompressed usage by category (Percentages based on user generated assets only):
Textures               1.1 mb	 70.2%
Meshes                 0.0 kb	 0.0%
Animations             0.0 kb	 0.0%
Sounds                 0.0 kb	 0.0%
Shaders                359.3 kb	 21.9%
Other Assets           47.5 kb	 2.9%
Levels                 0.0 kb	 0.0%
Scripts                0.2 kb	 0.0%
Included DLLs          0.0 kb	 0.0%
File headers           82.4 kb	 5.0%
Total User Assets      1.6 mb	 100.0%
Complete build size    1.6 mb
Used Assets and files from the Resources folder, sorted by uncompressed size:
 1.0 mb	 62.3% Assets/Avatars/KissMa/UltimateSporty/Textures/faceparts.png
 359.3 kb	 21.9% Assets/OptimizedShaders/TestMaterial/S_Poiyomi_Pro.shader
 128.4 kb	 7.8% Assets/_PoiyomiShaders/Textures/Defaults/T_Default_CM.exr
 44.6 kb	 2.7% Assets/TestMaterial.mat
 2.4 kb	 0.1% Assets/prefab-id-v1_avtr_3d2543ce-8dd9-48bf-a227-561e6e25b8d2_4587256752.prefab
 0.9 kb	 0.1% Assets/_PoiyomiShaders/Textures/Defaults/T_Default_SR.png
 0.5 kb	 0.0% AssetBundle Object
 0.1 kb	 0.0% Assets/VRCSDK/Plugins/VRCSDK3A.dll
 0.1 kb	 0.0% Assets/VRCSDK/Plugins/VRCCore-Editor.dll
-------------------------------------------------------------------------------

This is probably correct. It seems like non-referenced textures are most likely not added to the build.
However, I am not 100% sure on this, as some other sources point to this not being the case. In that case it still shouldn't affect the VRAM, but is something I would like to keep my eyes open for.


Pasting too many lines into Terminal results in disconnect. Also ssh -L disconnects if I send too many lines of text to server. This does not happen on Putty.

Microsoft Windows [Version 10.0.19041.572]
Windows terminal version 1.3.2651
Any other software?
Chrome, but not necessary to reproduce
Steps to reproduce
in windows terminal open Ubuntu Focal
ssh to remote server
open vim
:set paste
paste ~100 lines of text
observe the remote host disconnecting
OR
connect to remote host and then
just paste any larger (like more than 20 lines of text) code into terminal and try to run it
OR
ssh -L (local port forwarding) from port localhost:1234 on local computer to external host port 5000. Then run an app (I use python Flask development server) on port 5000
then when you access localhost:1234 on local machine, try submitting a lot of text (more than 20 lines) through html form - the local port forwarding will disconnect
Expected behavior
Accept pasting / submitting of multi-line input
Actual behavior
Remote host disconnects (but doesn't from Putty) - wrong Message Authentication Code
When I run port forwarding through putty, or paste multi-line text into putty or do any of the steps in Putty, nothing happens, everything is fine.

Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #7601 for more discussion.
/dup #7601


undefined reference to `clock_gettime' when build CentOS 6.7

Dear,
My system is : CentOS 6.7 x86_64
uname -r       : 2.6.32-573.7.1.el6.x86_64
When build the library/examples/testsuite, I get:
[ 79%] Built target nats_static
Scanning dependencies of target nats-publisher
[ 81%] Building C object examples/CMakeFiles/nats-publisher.dir/publisher.c.o
[ 82%] Linking C executable nats-publisher
../src/libnats.so: undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
make[2]: *** [examples/nats-publisher] Error 1
make[1]: *** [examples/CMakeFiles/nats-publisher.dir/all] Error 2
make: *** [all] Error 2

I not experience in cmake, but manually in link.txt files, I add at end :
                    -Wl,--no-as-needed -lrt

My build problem solved
   ../examples/CMakeFiles/nats-publisher.dir/link.txt
   ../examples/CMakeFiles/nats-queuegroup.dir/link.txt
  ../examples/CMakeFiles/nats-replier.dir/link.txt
  ../examples/CMakeFiles/nats-requestor.dir/link.txt
  ../test/CMakeFiles/testsuite.dir/link.txt

JM

JM,
Thanks for the report. I had the same issue when building on Travis (using on older libc that I have on my Ubuntu image). I had disable the use of clock_gettime when building on Travis as a work-around until I found how to fix that with CMake. I think I did. The build now passes on Travis. Could you do me a favor and checkout the 'fix_clock_gettime' branch, build and see if it works for you? If it does, I will merge it to master.

Ivan,
In my system is solved the problem.
I add to end:
-Wl,--no-as-needed -lrt

in link.txt file.
The cnats-lib, examples, suite build & run ok.
Thanks,
JM
Enviado desde mi BlackBerry de Movistar
-----Original Message-----
From: Ivan Kozlovic<EMAIL_ADDRESS>Date: Sun, 29 Nov 2015 10:27:04
To<EMAIL_ADDRESS>Reply-To: nats-io/cnats<EMAIL_ADDRESS>Cc<EMAIL_ADDRESS>Subject: Re: [cnats]  undefined reference to `clock_gettime' when build CentOS
6.7 (#9)
JM,
Thanks for the report. I had the same issue when building on Travis (using on older libc that I have on my Ubuntu image). I had disable the use of clock_gettime when building on Travis as a work-around until I found how to fix that with CMake. I think I did. The build now passes on Travis. Could you do me a favor and checkout the 'fix_clock_gettime' branch, build and see if it works for you? If it does, I will merge it to master.

Reply to this email directly or view it on GitHub:
https://github.com/nats-io/cnats/issues/9#issuecomment-160442429

JM,
I understand that if you manually modify the link command line, then it will work. But I want the change to be made in the CMake files so that you don't have to manually modify anything. So I am not sure if you mean that you have tried the branch and it now works for you without any manual modification, or it does not work and you still have to modify manually the link command. Could you please clarify?

Ivan,
OK, I will test this.
JM
Enviado desde mi BlackBerry de Movistar
-----Original Message-----
From: Ivan Kozlovic<EMAIL_ADDRESS>Date: Sun, 29 Nov 2015 12:56:46
To<EMAIL_ADDRESS>Reply-To: nats-io/cnats<EMAIL_ADDRESS>Cc<EMAIL_ADDRESS>Subject: Re: [cnats]  undefined reference to `clock_gettime' when build CentOS
6.7 (#9)
JM,
I understand that if you manually modify the link command line, then it will work. But I want the change to be made in the CMake files so that you don't have to manually modify anything. So I am not sure if you mean that you have tried the branch and it now works for you without any manual modification, or it does not work and you still have to modify manually the link command. Could you please clarify?

Reply to this email directly or view it on GitHub:
https://github.com/nats-io/cnats/issues/9#issuecomment-160470696

JM,
Have you had a chance to test the branch?
Thanks!

JM, I have merged the changes into master. Hopefully, this solves the problem in your environment. If not let me know! I will close the issue for now, do not hesitate to re-open if needed.
Thanks!

Ivan;
Yes! Please closed it!
Thanks,
JM
Enviado desde mi BlackBerry de Movistar
-----Original Message-----
From: Ivan Kozlovic<EMAIL_ADDRESS>Date: Thu, 03 Dec 2015 08:52:26
To<EMAIL_ADDRESS>Reply-To: nats-io/cnats<EMAIL_ADDRESS>Cc<EMAIL_ADDRESS>Subject: Re: [cnats]  undefined reference to `clock_gettime' when build CentOS
6.7 (#9)
JM, I have merged the changes into master. Hopefully, this solves the problem in your environment. If not let me know! I will close the issue for now, do not hesitate to re-open if needed.
Thanks!

Reply to this email directly or view it on GitHub:
https://github.com/nats-io/cnats/issues/9#issuecomment-161712864


Admob not showing ad with real id

I get no errors trying with the test one, just with my Admob IDs:
PlatformException(load_failed_ad, cannot reload a failed ad, id=862739698, null)
Banner and interstitial are failing on emulator and on real device (Xiaomi Redmi Note 8T). Just tried on Android.
All my IDs and setup is correct.
Doctor:
[√] Android toolchain - develop for Android devices (Android SDK    version 28.0.3)
    • Android SDK at D:\Programas\Android\sdk
    • Android NDK location not configured (optional; useful for
      native profiling support)
    • Platform android-29, build-tools 28.0.3
    • ANDROID_HOME = D:\Programas\Android\sdk
    • Java binary at: D:\Programas\Android\Android
      Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Android Studio (version 3.5)
    • Android Studio at D:\Programas\Android\Android Studio
    • Flutter plugin version 43.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build
      1.8.0_202-release-1483-b03)

[√] VS Code (version 1.42.1)
    • VS Code at C:\Users\d15_1\AppData\Local\Programs\Microsoft      VS Code
    • Flutter extension version 3.8.1

[√] Connected device (1 available)
    • AOSP on IA Emulator • emulator-5554 • android-x86 •
      Android 9 (API 28) (emulator)

Hi @erperejildo
if you are using firebase_admob
please open the issue in the dedicated github.
Otherwise
can you please provide your full flutter doctor -v ,
your flutter run --verbose
and your pubspec.yaml
or if possible a reproducible minimal code sample.
Thank you

I was creating the issue there and when I ran flutter run --verbose (I didn't run this project for a couple of days) I saw no errors this time.
So I tested the banner and the interstitial and both are working fine.
I've read on some places that when you create the app in Admob it can take until 1 week to have these ads ready. For my previous app this was straight away and with this one I wasn't getting a proper error log, just load_failed_ad.
So I guess this is resolved now.
If I see anything weird from now on I'll create the issue on the other side.


fix: Correct path in href for contrib fn dropdown

Contrib functions are under the /contrib path, so this corrects
the path used in the href for contrib function version dropdowns.

@sdowell This PR needs rebase


Large gap between section number and section title

The horizontal space between number and title is too long in PDF output.
PDF:

DOC:

Thanks!

Fixed.

Thanks @Intelligent2013. Closing.

Thanks @Intelligent2013. Closing.


Simplify CI by avoiding use of RDP

RDP was used to create a user session. We can do that with an automatic logon instead, and adding the GitHub runner as a startup program.

Presumably https://github.com/ubuntu/GoWSL/pull/61 will fi the issue

Aaaand it worked 😄


Fix SpinningProgress issue with API 25+

This PR contains two changes:

removes the 'thickness' from the public properties of SpinningProgress
replaces SpinningProgress ART-based implementation, with one based on static images

React Native's ART library is important and we probably will use
it more in the future. It is the only good option when we want to
achieve some visual elements / styles that we would use CSS or
SVG on the web instead.
Unfortunately, there is a serious bug on Android, that have existed
for a while. It becomes 'active' from API level 25 forward.
Visually, the issue manifests as black spinning square instead of
the usual progress spinner.
Bug reported to React Native here:
facebook/react-native#17565
A possible solution looks something like:
macdoum1/react-native@5878481
Possible alternatives evaluated:

Styles (ala CSS) - previous implementation used that, but was not
reliable between versions (due to RN issues)
use third-party component - a bit too complicated, and they suffer
from the same issues. For example:
bartgryszko/react-native-circular-progress#105
use static images - that is the chosen workaround

The exact look was recreated in Sketch and exported as PNG. We use
two versions - one with 'brand' color and one 'black'.
Once the bug in ART is fixed upstream, we will revert this change.

Merged -- thanks @borisyankov !


docker-opengl:stable does not terminate

Hello everybody!
I'm trying to use this image as a base for a custom docker container on Gitlab-CI. I noticed builds don't terminate and executing a simple command locally does not terminate aswell.
I'm guessing the issue is somewhere in entrypoint.sh, but I haven't found anything more specific yet.
Any ideas would be greatly appreciated.
Best,
Jonathan

Ah, it seems to simply be the wait command missing a process id parameter.


T&Cs for access to the API?

Do we need T&Cs for the API (c.f. SmmartCambridge's insistence on them for the Smartpanels)?
If so:

[x] We need some text
[x] We need logic that prevents you accessing the API's until you have accepted them

Agreed 06 August 18 that T&Cs are required.

Closed by #226


Add support for Docker secrets

Is it possible to use docker secrets for the env variables?
https://docs.docker.com/engine/swarm/secrets/
Thanks.

I'm not familiar with swarm but from reading those docs it looks like secrets can be exposed to the container as environment variables - in which case yes, this would work fine with this project.


⭐ 39 - Customer Support Bot (Hacktoberfest Demo)

🤩 Thank you for participating in the CopilotKit Hacktoberfest event.
Follow This Link to Get Started!🎉
NOTE: CopilotKit will allow multi-assign issues
💡 Please show your support and give a ⭐ to the CopilotKit repository.
Documentation to:

CopilotKit
CopilotKit CoAgents (Advanced)

Demo:
Customer Support Bot
Description of app functionality:
Develop a customer support platform where AI agents handle frequently asked questions and escalate complex issues to human agents.
Technology Requirements
Using CopilotKit

Required: Your project must utilize CopilotKit as a core component.
Installation: Include CopilotKit by following the installation guide at CopilotKit Quickstart.
Documentation: Familiarize yourself with CopilotKit's features through the Official Documentation.

Styling with Shadcn-UI

Required: All UI components in your project should be styled using Shadcn-UI.
Installation: Install Shadcn-UI documentation

@quest-bot embark

I want to work on this issue, please assign it to me @NathanTarbert .

@quest-bot embark

/assign

@NathanTarbert sir can you please assign this to me?


pythonPackages.cryptography_2_9: Allow to use version 2.9 with Python3

Motivation for this change
Allow cryptography to be used as a dependency by python modules with the version requirements:

cryptography<3
python>3

Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

Signed-off-by: Pamplemousse<EMAIL_ADDRESS>

No, we do not allow multiple versions to be used within the package set.


Dgad 422 - Review - Do not merge!

@boutell Take a look at this if you have a chance.
I need to refactor tests.

@boutell I merged your previous work - let me know if this looks legit to you. I need to refactor tests (don't work now with non-gzipped formats)


python312Packages.aioopenexchangerates: 0.6.10 -> 0.6.13

Diff: https://github.com/MartinHjelmare/aioopenexchangerates/compare/refs/tags/v0.6.10...v0.6.13
Changelog: https://github.com/MartinHjelmare/aioopenexchangerates/blob/v0.6.13/CHANGELOG.md

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 357616

x86_64-linux

:white_check_mark: 5 packages built:

home-assistant-component-tests.openexchangerates
python311Packages.aioopenexchangerates
python311Packages.aioopenexchangerates.dist
python312Packages.aioopenexchangerates
python312Packages.aioopenexchangerates.dist


Implement model-oriented format function in OpenAI and Post API chat wrapper

Background
Considering the PostAIChatWrapper will be used for many different models (e.g. gpt-4, gemini, glm-4, and so on), and OpenAI API can be used for different model services, we should choose prompt strategies in both OpenAIChatWrapper and PostAPIChatWrapper according to the model name.
Description

Modified format fucntion in previous model wrappers into static method so that we can call them without initializing an object.
Add a static function named format_for_common_chat_models in ModelWrapperBase class;
Implement model-oriented format function in PostAPIChatWrapper and OpenAIChatWrapper;
Fix bugs in previous format function, where the conversation maybe empty as follows:

formatted_prompt = [
    {
        "role": "system",
        "content": "You're a helpful assistant",
    },
    {
        "role": "user",
        "content": "## Conversation History",
    },
]

In this PR, we modified into to
# With other messages
formatted_prompt = [
    {
        "role": "user",
        "content": (
            "You're a helpful assistant\n"
            "\n"
            "## Conversation History\n"
            "Alice: Hi!"
    },
]

# with only system messages at the beginning
formatted_prompt = [
    {
        "role": "user",
        "content": "You're a helpful assistant\n"
    },
]

Modify unit test accordingly.

Checklist
Please check the following items before code is ready to be reviewed.

[x]  Code has passed all tests
[x]  Docstrings have been added/updated in Google Style
[x]  Documentation has been updated
[x]  Code is ready for review

自己定义的模型包装器，发现里面就是启动一个参数传参的功能，里面也没有流式，自己写根本就无法起作用，我在里面判断请求方式，自己加stream,发现他根本就不起作用，而且，即便是删除reque_argwargs后面的所有代码，也不影响，即便是有错误，也不会有什么用，这个自定义的模型包装器，到底怎么定义，我只能非流式传输，流式的安装openai改了判断stream,使用迭代器，发现根本就不起作用，也不报错，始终是非流式输出#!/usr/bin/env python
-- coding:utf-8 --
@Time   : 2024/8/28 9:54
@File   : local_model.py
from abc import ABC
from typing import Any, Union, Sequence, List
from loguru import logger
from agentscope.models import ModelWrapperBase
from agentscope.models import ModelResponse
import requests
from agentscope.constants import _DEFAULT_MESSAGES_KEY,_DEFAULT_MAX_RETRIES,_DEFAULT_RETRY_INTERVAL
from agentscope.message import Msg
import time
import json
class GewuModelWrapper(ModelWrapperBase):
model_type = 'ge_api_chat'

def __init__(
        self,
        config_name="",
        model_name="",
        api_url="",
        headers: dict = None,
        max_length: int = 2048,
        timeout: int = 30,
        # json_args: dict = None,
        # post_args: dict = None,
        max_retries: int = _DEFAULT_MAX_RETRIES,
        messages_key: str = _DEFAULT_MESSAGES_KEY,
        retry_interval: int = _DEFAULT_RETRY_INTERVAL,
        **kwargs: Any,

) ->None:

    super().__init__(config_name=config_name, model_name=model_name)

    self.api_url = api_url
    self.headers = headers
    self.max_length = max_length
    self.timeout = timeout
    self.json_args = {}
    self.post_args = {}
    self.max_retries = max_retries
    self.messages_key = messages_key
    self.retry_interval = retry_interval

def _parse_response(self, response: dict) -> ModelResponse:
    """Parse the response json data into ModelResponse"""
    return ModelResponse(raw=response)

def __call__(self, input_: str, **kwargs: Any) -> ModelResponse:
    """Calling the model with requests.post.

    Args:
        input_ (`str`):
            The input string to the model.

    Returns:
        `dict`: A dictionary that contains the response of the model and
        related
        information (e.g. cost, time, the number of tokens, etc.).

    Note:
        `parse_func`, `fault_handler` and `max_retries` are reserved for
        `_response_parse_decorator` to parse and check the response
        generated by model wrapper. Their usages are listed as follows:
            - `parse_func` is a callable function used to parse and check
            the response generated by the model, which takes the response
            as input.
            - `max_retries` is the maximum number of retries when the
            `parse_func` raise an exception.
            - `fault_handler` is a callable function which is called
            when the response generated by the model is invalid after
            `max_retries` retries.
    """
    # step1: prepare keyword arguments
    print(**kwargs)
    post_args = {**self.post_args, **kwargs}
    self.json_args['model_name'] = 'gewu_14b_v1'
    self.json_args['model'] = 'gewu_14b_v1'

    request_kwargs = {
        "url": self.api_url,
        "json": {self.messages_key: input_, **self.json_args},
        "headers": self.headers or {},
        **post_args,
    }

    # step2: prepare post requests
    for i in range(1, self.max_retries + 1):
        response = requests.post(**request_kwargs)
        if response.status_code == requests.codes.ok:
            break
        if i < self.max_retries:
            logger.warning(
                f"Failed to call the model with "
                f"requests.codes == {response.status_code}, retry "
                f"{i + 1}/{self.max_retries} times",
            )
            time.sleep(i * self.retry_interval)

    # step3: record model invocation
    # record the model api invocation, which will be skipped if
    # `FileManager.save_api_invocation` is `False`
    self._save_model_invocation(
        arguments=request_kwargs,
        response=response.json(),
    )

    # step4: parse the response
    if response.status_code == requests.codes.ok:
        return self._parse_response(response.json())
    else:
        logger.error(json.dumps(request_kwargs, indent=4))
        raise RuntimeError(
            f"Failed to call the model with {response.json()}",
        )

class GewuAPIChatWrapper(GewuModelWrapper):
"""A post api model wrapper compatible with openai chat, e.g., vLLM,
FastChat."""
model_type: str = "ge_api_chat"

def _parse_response(self, response: dict) -> ModelResponse:
    return ModelResponse(
        text=response["choices"][0]["message"][
            "content"
        ],
    )
def format(
        self,
        *args: Union[Msg, Sequence[Msg]],
) -> Union[List[dict]]:
    """Format the input messages into a list of dict, which is
    compatible to OpenAI Chat API.

    Args:
        args (`Union[Msg, Sequence[Msg]]`):
            The input arguments to be formatted, where each argument
            should be a `Msg` object, or a list of `Msg` objects.
            In distribution, placeholder is also allowed.

    Returns:
        `Union[List[dict]]`:
            The formatted messages.
    """
    # Format according to the potential model field in the json_args

    return ModelWrapperBase.format_for_common_chat_models(*args)

if name == 'main':
pass


Correct docs for invoice.exportPdf

Actually, there is also #37. How about updating README for that PR instead? I will try to publish during the weekend.

@robwalkerco #37 was just merged and adds the retrievePdf method, would it make sense to update this PR or would it be more appropriate to close it?

This can be closed now then.

Thanks for finding the issue, bringing this up and PRing the fix :+1:


PP-5707 Increase Jersey client capture timeout

increase HTTP request timeout from 1000ms to 5000ms, add headroom for
gateways to respond with successful capture messages

Alex says do it on Monday first thing

Because he's not here? Of course!

The config updates worldpay not epdq


Error getting type of internal Unity asset "library/unity default resources"

Calling ObjectInfo.type on the "library/unity default resources" asset raises the error below. This asset occurs in Hearthstone's gameobject0 bundle, causing unityextract to fail.
Traceback (most recent call last):
  File ".\bin\unityextract", line 146, in <module>
    main()
  File ".\bin\unityextract", line 143, in main
    exit(app.run())
  File ".\bin\unityextract", line 56, in run
    self.handle_asset(asset)
  File ".\bin\unityextract", line 82, in handle_asset
    if obj.type not in self.handle_formats:
  File "h:\hearthsim\python-unitypack\unitypack\object.py", line 31, in type
    typename = script.resolve()["m_ClassName"]
  File "h:\hearthsim\python-unitypack\unitypack\object.py", line 174, in resolve
    return self.object.read()
  File "h:\hearthsim\python-unitypack\unitypack\object.py", line 167, in object
    return self.asset.objects[self.path_id]
  File "h:\hearthsim\python-unitypack\unitypack\object.py", line 162, in asset
    ret = ret.resolve()
  File "h:\hearthsim\python-unitypack\unitypack\asset.py", line 173, in resolve
    return self.source.get_asset(self.file_path)
  File "h:\hearthsim\python-unitypack\unitypack\asset.py", line 63, in get_asset
    return self.environment.get_asset_by_filename(path)
  File "h:\hearthsim\python-unitypack\unitypack\environment.py", line 46, in get_asset_by_filename
    raise KeyError("No such asset: %r" % (name))
KeyError: "No such asset: 'library/unity default resources'"

Resolve the path via s/^library/Resources/

This needs changed https://github.com/HearthSim/UnityPack/blob/master/unitypack/asset.py#L60
and while we're here, need a better way (i.e. type detection) of loading files than explicitly saying asset/assetbundle -- lots of files that are assets don't end in ".assets".

UnityPack can't load unity default resources as an asset at all right now - tried last night, failed. @andburn I'd love your help to fix it!

Yeah there seems to be a problem loading files as assets, like resources.assets. I'll have a look into it.

@andburn  I have error library/unity default resources. Have you found any fix? I tried everything out.
Traceback (most recent call last):   File "D:\Downloads\UnityPack-master\UnityPack-master\bin\unityextract", line 146, in <module>     main()   File "D:\Downloads\UnityPack-master\UnityPack-master\bin\unityextract", line 143, in main     exit(app.run())   File "D:\Downloads\UnityPack-master\UnityPack-master\bin\unityextract", line 56, in run     self.handle_asset(asset)   File "D:\Downloads\UnityPack-master\UnityPack-master\bin\unityextract", line 82, in handle_asset     if obj.type not in self.handle_formats:   File "C:\Users\Alexander\AppData\Local\Programs\Python\Python35\lib\site-packages\unitypack\object.py", line 31, in type     typename = script.resolve()["m_ClassName"]   File "C:\Users\Alexander\AppData\Local\Programs\Python\Python35\lib\site-packages\unitypack\object.py", line 179, in resolve     return self.object.read()   File "C:\Users\Alexander\AppData\Local\Programs\Python\Python35\lib\site-packages\unitypack\object.py", line 172, in object     return self.asset.objects[self.path_id]   File "C:\Users\Alexander\AppData\Local\Programs\Python\Python35\lib\site-packages\unitypack\object.py", line 167, in asset     ret = ret.resolve()   File "C:\Users\Alexander\AppData\Local\Programs\Python\Python35\lib\site-packages\unitypack\asset.py", line 188, in resolve     return self.source.get_asset(self.file_path)   File "C:\Users\Alexander\AppData\Local\Programs\Python\Python35\lib\site-packages\unitypack\asset.py", line 62, in get_asset     return self.environment.get_asset_by_filename(path)   File "C:\Users\Alexander\AppData\Local\Programs\Python\Python35\lib\site-packages\unitypack\environment.py", line 46, in get_asset_by_filename     raise KeyError("No such asset: %r" % (name)) KeyError: "No such asset: 'library/unity default resources'"

@verng Unfortunately not 😞

We've added e1a840bff7e80d6d21d2f7cc033876eabf97fa82 to skip these for now with a warning, so at least bundles containing these files can be loaded. Obviously it would be nicer if we actually fix them, but for now this prevents crashes if you care about different files in the same bundle.


KML Symbol Alignment/Placement/Size

I believe there is a bug with the anchor point for some symbols when displaying a KML layer.
I'm using the latest examples, specifically this one:
https://openlayers.org/en/latest/examples/drag-and-drop-custom-kmz.html
Dragging the attached kml file into that example, I can see that point symbols seem to be anchored at the center-bottom.
This is mostly visible at the two star symbols that should be at the center point of the two red circles.

I've attached a screen clipping from Google Earth to show how it is supposed to look.

Further, the point symbols seem to be much larger in the example than how they are displayed in Google Earth.
20180910_Sonar-Pool27.zip

The anchor is an old issue #4829 with all Google icons being treated alike which was never resolved.  According to https://stackoverflow.com/a/22569590/10118270 the interpretation of scale is also inconsistent with Google Earth which scales from 32 pixels, not the 64 pixel original image.

See example with fixes at https://deploy-preview-12674--ol-site.netlify.app/examples/drag-and-drop-custom-kmz.html

That's awesome.  Well done.

Actually, the label anchors are no longer correct.  Should that be another bug report?

The text offset now needs to be based on the normalized 32 pixel image and the specified scale, not the original image size.  That should be done as part of this change.

The labels offsets are now correctly scaled.  The precise position relative to the icon will depend on the icon anchor, as it always did.  Icons which are now correctly center anchored have a label top left while the bottom anchored parking icon has a center left label.

Thanks Mike!


Show Order Id as Lookup and Data in Editable grid

Hello,
I want to show Order Id as lookup in my dialog.ts  and on selection of Id grid should get populate in dialog.ts in editable format so that on save I can save the results in my New table not in order details table.
Please help

One way to do it would be to make lookup for Order Ids.
Then in onchange event of that lookup you can do whatever you want to do with it.
I am not sure I understand what exactly. Do you want to load enitity into dialog? that fairly easy, just use dialogs loadEntity function.

Yes i want to load data into grid in dialog for selected order Id from dropdown
Can you please show me how can I do this ?
Can you please show how can I write code for lookup change event and dialogs loadEntity function ?

check this demo:
https://serenity.is/demo/BasicSamples/EntityDialogAsPanel/11077
it deals with loading specific entities


Fix crash from incorrect selector in error modal.

Oof. Thanks so much for this patch!

Tests are failing since your fork can't use my motherduck token. Merging anyway.


Little fixes

This fixes #41 and another couple of little issues I found:

Bower's jquery location is wrong
The registryHost value is never injected in the scopes.

Thank you for your contribution and for fixing these issues.


Right side of the command prompt doesn't go all the way to the end of the window

I'm not sure if I configured something incorrectly in the wizard or why this is happening but the right side of the command prompt doesn't go all the way to the end of the window, it has some empty space.

What terminal program are you using?
Flexprompt intentionally puts 1 space after the prompt to reduce issues when resizing the width of the terminal.
If you're using Windows Terminal, then Windows Terminal, then it adds blank space for a scrollbar, and the scrollbar is drawn only when actively being used.  Plus it adds an extra margin (the margin is configurable in the WT Settings).

I've checked in ConEmu and there the empty space is smaller than in Windows Terminal.
I didn't know Windows terminal always kept that space empty, even if the scrollbar isn't actually visible at the time.


Window height of the editor

When the editor is open after you recorded the GIF - the height (and width) should be remembered by last user adjustment, I think.
Because, look at this one:

I have a screen height maybe twice bigger than the height of STG's window. So it allows STG's editor window be much bigger in sizes. But as you can see - it's height makes scroll bar to appear. And the worst part is - it hides the input field of "file name". So every time you need to adjust the window height or to scroll it, and only after that to type a file name. Annoying.

I fixed this issue. It will be available with the next release (v2.13).

@NickeManarin  thanks!


[WIP][Build] Add windows building configurations

Motivation
Currently, building in windows needs some changes to do.
Modification
Add windows building configurations in binding.gyp.
Add windows building-related doc in README.md.

Could you make the PULSAR_CPP_PATH overridable by environment variable? When building in CI/CD environment it may not always be easy to work in C:\pulsar root for this.

@ryansealy Yes, I'll try to use an environment variable.


Updated 'describe workload' command in documentation

Keptn workload instance 'podtato-head-podtato-head-entry' is not created by the current lifecycle toolkit example.
Replaced the command to use an existing workload instance.

Messed up the fork/commits 😅 will try again.


Adding Roger Chen profile.

I renamed the file as per your suggestion. Thanks!

Can you please rebase against upstream, and squash your commits. This might be helpful: http://code.dblock.org/2015/08/31/getting-out-of-your-first-git-mess.html

Rebased and squashed commits

Very good, thanks!