Initial README

This is going to be the replacement for the current https://github.com/octokit/webhooks.js
It implements some features that are currently built into probot (e.g. accepting eventNames as array for event handlers), it exposes a receiver module so folks can use it in server frameworks that don’t follow the function (request, response, next) {} middleware pattern (like hapi) and it implements asynchronous hooks so servers can respond with errors if anything goes wrong in their handlers.
This is only the README for discussion, I’m working on the implementation and tests but wanted  to get your input as soon as possible :)
Preview 👀
ping @bkeepers, @anglinb, @JasonEtco, @hiimbex, @zeke

Is this going to be published to npm under the octokit scope? Do we own that?
Might also be good to add installation instructions to the README.

This is looking awesome. My only bit of feedback: I wonder if there's a way to organize the Events and Actions in a different way, so that it isn't one tall list. Since actions are all "children" of events, maybe they could be organized like that? For example:

pull_request

.opened
.closed

issues

.opened
.closed

Event
Actions

pull_request
.opened, .closed

issues
.opened, .closed

Is this going to be published to npm under the octokit scope? Do we own that?

Yes, that’s ours :)

Might also be good to add installation instructions to the README.

Good point :)

I wonder if there's a way to organize the Events and Actions in a different way, so that it isn't one tall list

Yes, I’m not happy with it myself yet. I wanted to make clear that both "issues" and "issues.opened" are valid events. I like your idea with the table better, I’ll add a sentence above it to explain that the two can be combined, and that "issues" gets triggered for all actions

One thing that makes me think: should we support usage without setting a secret at all? 🤔 Is there a valid use case where people could not set a secret?
I think for the sake of simplicity and also to nudge people towards doing the right think, I would enforce the usage of a secret.
What do you all think?

ugh accidentally pushed to master and this PR got auto-merged. Is there no way I can re-open it? :(


add backfill migration for new table paid courserun

Pre-Flight checklist

[x] Migrations

[x] Migration is backwards-compatible with current production code

[x] Testing

[x] Code is tested
[x] Changes have been manually tested

What are the relevant tickets?
(https://github.com/mitodl/mitxonline/issues/738)
What's this PR do?
To backfill the new table paid_course_runs for existing orders
How should this be manually tested?

Run docker-compose run --rm  web ./manage.py migrate locally
Go to /admin/courses/paidcourserun/, all the paid courserun orders should be populated there.
Verify the new records with admin/ecommerce/order/

@asadali145 I've addressed your feedback. I had to import Order model to get these state constants as these are not available from get_model call. Please take a look again. Thanks

Codecov Report

Merging #760 (47c5393) into main (49d234b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #760   +/-   ##
=======================================
  Coverage   85.40%   85.40%
=======================================
  Files         128      128
  Lines        5672     5672
  Branches      930      930
=======================================
  Hits         4844     4844
  Misses        684      684
  Partials      144      144

Impacted Files
Coverage Δ

ecommerce/discounts.py
80.70% <0.00%> (-1.76%)
:arrow_down:

ecommerce/views/v0/__init__.py
85.16% <0.00%> (+0.42%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us.

@asadali145 @jkachel I've updated the PR. The only change since the original PR is to add migrations.RunPython.noop to migrations.RunPython per Asad's feedback. If any of you could take a look, that'd be great. Thank you


Apps Installer [Enhancement] - Add README.md viewer

Basic README implementation
Addressed this issue
Shows a Read more... link in the app-store for any app if the app-developer has specified a readme doc in their apps.json entry.. e.g:
{
  "id": "myapp",
  ...
  "readme": "README.md"
  ...
}

The README specified must be in standard markdown.
Images

This looks spot on, thanks!


Add a note stating that modification on array primitives is supported…

… in svelte 3.23.1 onwards
Check #36 for context
https://github.com/svelte-society/recipes-mvp/issues/36

I wonder if instead of the disclaimer in the middle of the each section we should explicitly state at the beginning something like "that from svelte version 3.23.1 onwards the following issue no longer applies" - similar to language used in https://github.com/svelte-society/recipes-mvp/issues/36 title
That way it is 100% clear that the entire section is basically an archived section for older versions of Svelte.
Should we add the old and new REPL examples or link to official Svelte issue as you did in https://github.com/svelte-society/recipes-mvp/issues/36 ?
Thoughts?

oo @babycourageous good call! i like that attention to detail. want to modify it?

Sure thing!

awesome, thank you everyone!!

Yea, agree with it all, it's more clear and it has way more information.
BTW, I'm not planning to alter those repls, but perhaps it might be a good ideain these cases to have the repls from and oficial svelte account, so we make sure they won't be altered


Operational Credentials cluster: AddNOC: Set IPK.

Problem
AddNOC does not install a real IPK

Fixes #15582.

Change overview

AddNOC modified to set the IPK

Testing
GroupDataProvider unit tests executed successfully.

/rebase

/rebase

/rebase

When this lands, will our CASE code actually use the IPK that has been stored from AddNOC?

Based on a quick skim, no.  Need followups to do that...


Select the right Toga platform under Django

When Toga is used under Django, the automatic platform detection is always wrong.
This adds a call to toga.set_platform() in the Django app's ready() -- I can somehow imagine one actually wanting the server platform even when this app is imported, but not if it is initialized by Django.
(baby steps, this is my first contribution to this awesome project)

Ooh - that's a really good idea. I had been using:
import os
os.environ['TOGA_PLATFORM'] = 'django'

at the top of the settings file (I forgot to add that detail in the chat last night - sorry). But using the app registration as a hook is a much better idea.
One problem with the approach you've got here - it will try to install the "local" platform first (so, cocoa on macOS, gtk on linux etc), and if that platform isn't available, "import toga" will fail.
So, the toga platform needs to be set before the first call to import toga. Can you check what happens if you uninstall toga-gtk in your virtualenv?

Yep, if I remove toga-gtk things blow up. There's a sys.exit(-1) there that is not at all to my liking (I'd much rather replace it with a raise or something...)
I'm thinking now about fixing the toga initialization to be more tolerant or more lazy.

Further checks show this is a really hard nut to crack: if you try to select the platform from within the Django app that's defined inside the toga_django, then you lose -- toga_django itself, as parent package, is imported first, and it imports parts of toga (core) because it needs them, and so set_platform already gets called before the Django app has a say about anything.
The idea I had -- a general solution to the problem of selecting an implementation -- was to install a __getattr__ on the module, so that implementation attributes are only fetched when needed. But as far as I can see, this requires the toga module to have a special type (a subclass of ModuleType) and that, again, cannot be done from within.
If you can install a __getattr__, you'd do something like
def __getattr__(module, attr):
      value = getattr(impl, attr)
      setattr(module, attr, value)
      return value

And then, you can start off with impl=None and set it up later. __getattr__ is only called when the attribute does not exist, so this should work quite well.
So, as a PR, this cannot really work. And the ideas are, well, better left for later.


Incorrect instruction

The branch greater equal (bge) instruction is with the '≤' sign instead of '≥'

Fixed. Thanks!


Percent value is null!

The size.total value too

Hello,  can you provide more context? Does the response contains a content-length header?

If the web server does not respond with a content-length header than some props are null. Please read the README. Closing for now.


Scheduled tests

We will need to find out how to do that only on master branch though

Seems that the default is master branch only anyway.
https://stackoverflow.com/questions/58798886/github-actions-schedule-operation-on-branch


_label_placement to match tile property name

Allows for further debugging of D3.js styling once v0.4.0 tiles land.

:+1:

closing with 144121963c73445dfb338ef2749d913de19f2ac4


chore: add dry-run check for release pipeline

What type of PR is this?
/kind improvement

What this PR does / why we need it:
Add dry-run check for release pipeline to support test build.
Which issue(s) this PR fixes:

Fixes #
Requirements:

[x] uses conventional commit messages

[ ] includes documentation
[ ] adds unit tests
[ ] tested upgrade from previous version

Special notes for your reviewer:
Release note:
none

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 79.007%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
2243

Relevant Lines:
2839

💛  - Coveralls


RecurrentPPO: 9x speedup - whole sequence batching

Description

Moving from 2d batches to 3d batches of whole sequences leads to a 5-9 times speedup in terms of fps while keeping results similar. Proof.
Context

[x] I have raised an issue to propose this change (required)

Types of changes

Its currently implemented as an additional feature but would probably be more optimal to replace the original.

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

Checklist:

[x] I've read the CONTRIBUTION guide (required)
[x] The functionality/performance matches that of the source (required for new training algorithms or training-related features).
[ ] I have updated the tests accordingly (required for a bug fix or a new feature).
[ ] I have included an example of using the feature (required for new features).
[ ] I have included baseline results (required for new training algorithms or training-related features).
[ ] I have updated the documentation accordingly.
[ ] I have updated the changelog accordingly (required).
[ ] I have reformatted the code using make format (required)
[ ] I have checked the codestyle using make check-codestyle and make lint (required)
[ ] I have ensured make pytest and make type both pass. (required)

Note: we are using a maximum length of 127 characters per line

@araffin have you been able to take a look at this yet? I am very curious what you think about it.

have you been able to take a look at this yet? I am very curious what you think about it.

no, not yet, still on my stack... and going on holidays soon, so, I'll probably take a look next week or in january.

Cool. Let me know if you need any help running experiments/coding

Hello,
I tried but couldn't test the PR, I got an error (before my changes) both with Pendulum and BipedalWalker:
Traceback (most recent call last):
  File "sb3_contrib/whole_sequence_speed_test.py", line 167, in <module>
    model.learn(2e5, tb_log_name=f"PendulumNoVel-v1_whole_sequences_batch_size{batch_size}")
  File "sb3_contrib/sb3_contrib/ppo_recurrent/ppo_recurrent.py", line 505, in learn
    self.train()
  File "sb3_contrib/sb3_contrib/ppo_recurrent/ppo_recurrent.py", line 361, in train
    values, log_prob, entropy = self.policy.evaluate_actions_whole_sequence(
  File "sb3_contrib/sb3_contrib/common/recurrent/policies.py", line 372, in evaluate_actions_whole_sequence
    latent_pi, _ = self.lstm_actor(features)
  File "mambaforge/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "mambaforge/lib/python3.10/site-packages/torch/nn/modules/rnn.py", line 810, in forward
    self.check_forward_args(input, hx, batch_sizes)
  File "mambaforge/lib/python3.10/site-packages/torch/nn/modules/rnn.py", line 730, in check_forward_args
    self.check_input(input, batch_sizes)
  File "mambaforge/lib/python3.10/site-packages/torch/nn/modules/rnn.py", line 218, in check_input
    raise RuntimeError(
RuntimeError: input.size(-1) must be equal to input_size. Expected 3, got 6

My bad. Bug is fixed now!

I had to set drop_last=False sometimes, otherwise I was getting error due to the fact nothing was sampled:
UnboundLocalError: local variable 'loss' referenced before assignment
To reproduce:
python -m rl_zoo3.train --env PendulumNoVel-v1 -params whole_sequences:True use_sde:False
python -m rl_zoo3.train --algo ppo_lstm --env CartPoleNoVel-v1 -params whole_sequences:True

On CartPole, I have another error:
Traceback (most recent call last):
  File "torchy-zoo/train.py", line 4, in <module>
    train()
  File "torchy-zoo/rl_zoo3/train.py", line 267, in train
    exp_manager.learn(model)
  File "torchy-zoo/rl_zoo3/exp_manager.py", line 236, in learn
    model.learn(self.n_timesteps, **kwargs)
  File "sb3_contrib/sb3_contrib/ppo_recurrent/ppo_recurrent.py", line 521, in learn
    self.train()
  File "sb3_contrib/sb3_contrib/ppo_recurrent/ppo_recurrent.py", line 377, in train
    values, log_prob, entropy = self.policy.evaluate_actions_whole_sequence(
  File "sb3_contrib/sb3_contrib/common/recurrent/policies.py", line 387, in evaluate_actions_whole_sequence
    log_prob = distribution.distribution.log_prob(actions).sum(dim=-1)
  File "mambaforge/lib/python3.10/site-packages/torch/distributions/categorical.py", line 123, in log_prob
    self._validate_sample(value)
  File "mambaforge/lib/python3.10/site-packages/torch/distributions/distribution.py", line 288, in _validate_sample
    raise ValueError('Value is not broadcastable with batch_shape+event_shape: {} vs {}.'.
ValueError: Value is not broadcastable with batch_shape+event_shape: torch.Size([32, 15, 1]) vs torch.Size([32, 15]).

Also, SDE seems not supported (that's ok, but need to be checked at runtime).

Also an error when using CNN:
python train.py --algo ppo_lstm --env CarRacing-v2 -P --n-eval-envs 5 --eval-episodes 20 -params batch_size:8 whole_sequences:True

    self.train()
  File "/home/antonin/Documents/rl/sb3-contrib/sb3_contrib/ppo_recurrent/ppo_recurrent.py", line 377, in train
    values, log_prob, entropy = self.policy.evaluate_actions_whole_sequence(
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/antonin/Documents/rl/sb3-contrib/sb3_contrib/common/recurrent/policies.py", line 371, in evaluate_actions_whole_sequence
    features = self.extract_features(obs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/antonin/Documents/rl/stable-baselines3/stable_baselines3/common/policies.py", line 640, in extract_features
    return super().extract_features(obs, self.features_extractor)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/antonin/Documents/rl/stable-baselines3/stable_baselines3/common/policies.py", line 131, in extract_features
    return features_extractor(preprocessed_obs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/antonin/miniconda3/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1482, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/antonin/Documents/rl/stable-baselines3/stable_baselines3/common/torch_layers.py", line 106, in forward
    return self.linear(self.cnn(observations))
                       ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/antonin/miniconda3/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1482, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/antonin/miniconda3/lib/python3.11/site-packages/torch/nn/modules/container.py", line 204, in forward
    input = module(input)
            ^^^^^^^^^^^^^
  File "/home/antonin/miniconda3/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1482, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/antonin/miniconda3/lib/python3.11/site-packages/torch/nn/modules/conv.py", line 463, in forward
    return self._conv_forward(input, self.weight, self.bias)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/antonin/miniconda3/lib/python3.11/site-packages/torch/nn/modules/conv.py", line 459, in _conv_forward
    return F.conv2d(input, weight, bias, self.stride,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Expected 3D (unbatched) or 4D (batched) input to conv2d, but got input of size: [281, 8, 2, 64, 64]

On CartPole, I have another error:

The error for CartPole seems to be still there...

Yes, it has only been implemented for Box action spaces so that might be it.
I have not much time to work on this anymore. So feel free to do it.


FrogBot: A title for comment is required. When there are too many builds in PR, The comments from xray scan are confusing.

Is your feature request related to a problem? Please describe.
Request 1: I have an azure pipeline with 4 to 5 components building as stages, Im using Frogbot to scan the Pull Requests, The comments are added for each component by the frogbot, The pain point is, the comment just displays the issues, There is no such title like from which build this comment is added. so its hard to find which issue is related which stage/build of the pipeline.
Request 2: When there are no Issues reported on the comment, there is couple lines related to jfrog is dispalyed
"Frogbot also supports Contextual Analysis, Secret Detection, IaC and SAST Vulnerabilities Scanning. This features are included as part of the JFrog Advanced Security  package, which isn't enabled on your system."
This message should be avoided on the comment, The stakeholders are not comfortable with these lines displayed on the comment.
Describe the solution you'd like to see
The name of the build can be included in the comment
eg:
The Issues from BUILD A are:
then the xray scan detials
Describe alternatives you've considered
The Comment can be customizable, Like through pipeline we can add a title to the comment, then the xray scan results can be posted.
Additional context

Can someone look into this ?

Thank you, @vinodhini-devops, for providing these requirements!
Could you please submit this feature request on https://github.com/jfrog/frogbot instead of this repository, which is dedicated to the JFrog CLI project?
We're eager to discuss the requirements with you in more detail. Let's close this current issue and carry on the conversation in the new one.

Thank You, @eyalbe4 , I have raised a feature request https://github.com/jfrog/frogbot/issues/550


Change TTS voice ?

Hey, nice Bible app !
Had a question tho, would it be possible to change the voice of the TTS reader, as in French for example, it reads very wrongly...
Thanks by advance for the help !

I have experimented with other TTS engines. Most of the others cost money. What Bible translation were you using?

I have experimented with other TTS engines. Most of the others cost money. What Bible translation were you using?

hello !
I'm Using the Louis Segond Bible translation (a.k.a lsg translation). :sweat_smile:


Query util for clientside metrics gathering

While routers.js does a great job of creating a hierarchical view
of routers, servers, and clients, we're finding an increasing need
to make requests for metrics across these boundaries, which results in
a lot of mapping/filtering that is not always very readable.
This change introduces a module that builds a regex for querying
across a list of metrics. Simplifies request_totals as a result.

:star: :grapes: :dart: cool!

rebased against master

I like this a lot. Just had that one comment about chained calls.

@esbie Thanks for updating! Am surprised that you need the _.isArray check throughout. What if you dropped support for the "*" character, and just reset to empty array in that case?  Then could you assume that metricNames and routerLabels are always arrays and skip the check? This is a big gray area of js for me, so apologies if I'm on the wrong track.

:star: :seedling: Looks good to me -- thanks for updating.


pss: make *_with_salt methods the default

Similar to #290, this renames the following:

Pss::new => Pss::new_unsalted
Pss::new_with_salt => Pss:new
Pss::new_blinded => Pss::new_blinded_unsalted
Pss::new_blinded_with_salt => Pss::new_blinded
SigningKey::new => SigningKey::new_unsalted
SigningKey::new_with_salt_len => SigningKey::new
SigningKey::random => SigningKey::random_unsalted
SigningKey::random_with_salt_len => SigningKey::random

The *_with_salt methods are preserved with a deprecation warning, which should help people migrate to the new versions.
This also removes the From<RsaPrivateKey> impl for SigningKey, since users should consider up front whether or not they need a salt rather than defaulting to unsalted.
cc @lumag

Generic comment: do we need the without salt functions at all? Let me suggest another approach.

I don't actually know if anyone uses unsalted PSS.
Indeed It seems weird to have a separate API for it when someone who really wants it can specify a salt length of 0.
Perhaps we should just get rid of the "unsalted" functions to simplify the API?

Yes, that's my idea. Will post it shortly.

I can just remove the _unsalted methods from this PR?

@tarcieri slightly more than that (especially on the verification side).

@tarcieri done, https://github.com/RustCrypto/RSA/pull/294

I like #294 as an alternative to this, but I'll leave this open for now until people have a chance to discuss

Closed in favor of #294


Lint with flake8

ENHANCEMENT

Describe the enhancement you are requesting. Enhancements include:

Linting with flake8
code refactor

Should-have.

lib/groups.py:14:80: E501 line too long (101 > 79 characters)
lib/groups.py:17:80: E501 line too long (103 > 79 characters)
lib/groups.py:26:80: E501 line too long (100 > 79 characters)
lib/groups.py:29:80: E501 line too long (100 > 79 characters)
lib/groups.py:52:80: E501 line too long (104 > 79 characters)
lib/groups.py:59:80: E501 line too long (112 > 79 characters)
lib/groups.py:63:80: E501 line too long (103 > 79 characters)
lib/groups.py:68:80: E501 line too long (114 > 79 characters)
lib/groups.py:72:80: E501 line too long (104 > 79 characters)
lib/groups.py:78:80: E501 line too long (128 > 79 characters)
lib/groups.py:81:80: E501 line too long (103 > 79 characters)
lib/groups.py:87:80: E501 line too long (130 > 79 characters)
lib/groups.py:90:80: E501 line too long (105 > 79 characters)
lib/groups.py:95:80: E501 line too long (103 > 79 characters)
lib/groups.py:99:80: E501 line too long (103 > 79 characters)
lib/examples.py:29:25: E999 SyntaxError: invalid syntax
lib/channels.py:14:80: E501 line too long (105 > 79 characters)
lib/channels.py:17:80: E501 line too long (105 > 79 characters)
lib/channels.py:26:80: E501 line too long (111 > 79 characters)
lib/channels.py:29:80: E501 line too long (110 > 79 characters)
lib/channels.py:37:80: E501 line too long (100 > 79 characters)
lib/channels.py:40:80: E501 line too long (102 > 79 characters)
lib/channels.py:56:5: E303 too many blank lines (2)
lib/channels.py:64:80: E501 line too long (106 > 79 characters)
lib/channels.py:77:80: E501 line too long (111 > 79 characters)
lib/channels.py:84:80: E501 line too long (118 > 79 characters)
lib/channels.py:88:80: E501 line too long (105 > 79 characters)
lib/channels.py:93:80: E501 line too long (103 > 79 characters)
lib/channels.py:97:80: E501 line too long (105 > 79 characters)
lib/response.py:8:1: E303 too many blank lines (3)
lib/things.py:14:80: E501 line too long (101 > 79 characters)
lib/things.py:17:80: E501 line too long (103 > 79 characters)
lib/things.py:26:80: E501 line too long (107 > 79 characters)
lib/things.py:29:80: E501 line too long (108 > 79 characters)
lib/things.py:37:80: E501 line too long (100 > 79 characters)
lib/things.py:40:80: E501 line too long (100 > 79 characters)
lib/things.py:63:80: E501 line too long (104 > 79 characters)
lib/things.py:76:80: E501 line too long (111 > 79 characters)
lib/things.py:83:80: E501 line too long (112 > 79 characters)
lib/things.py:87:80: E501 line too long (103 > 79 characters)
lib/things.py:92:80: E501 line too long (103 > 79 characters)
lib/things.py:96:80: E501 line too long (103 > 79 characters)
lib/things.py:105:80: E501 line too long (104 > 79 characters)
lib/things.py:109:80: E501 line too long (104 > 79 characters)
lib/things.py:116:80: E501 line too long (133 > 79 characters)
lib/things.py:120:80: E501 line too long (107 > 79 characters)
lib/messages.py:15:80: E501 line too long (82 > 79 characters)
lib/messages.py:18:80: E501 line too long (103 > 79 characters)
lib/messages.py:28:80: E501 line too long (103 > 79 characters)
lib/users.py:18:80: E501 line too long (102 > 79 characters)
lib/users.py:30:80: E501 line too long (101 > 79 characters)
lib/users.py:38:80: E501 line too long (98 > 79 characters)
lib/users.py:41:80: E501 line too long (99 > 79 characters)
lib/users.py:48:80: E501 line too long (87 > 79 characters)
lib/users.py:52:80: E501 line too long (103 > 79 characters)
lib/users.py:59:80: E501 line too long (110 > 79 characters)
lib/users.py:63:80: E501 line too long (102 > 79 characters)
lib/users.py:72:80: E501 line too long (106 > 79 characters)
lib/users.py:76:80: E501 line too long (111 > 79 characters)


fix(css): remove ?used hack (fixes #6421, #8245)

Description
This ?used hack was introduced by https://github.com/vitejs/vite/commit/3e3c20364d6c065026f7362bbcb7094099705cc9.
At that time, esbuild v0.12.25 was used. This version of esbuild had trouble with tree-shaking.
This is the reproduction with esbuild repl. You can see linked variable and imported variable exists in the output.
But now Vite uses esbuild v0.14.38 and tree-shake works. This is the reproduction with esbuild repl. You can see linked is removed from output. imported is still included because of new URL('---', import.meta.url).href.
So here it needs to be marked as pure.
esbuild 0.13.0+ supports /* #__PURE__ */ and it worked if I marked by using it (esbuild repl).
The same code worked successfully with terser too.
This PR removes the ?used hack and changes the css default export to export default /* #__PURE__ */ (() => ${JSON.stringify(content)})() which I showed above.
I also tested with this project (stackblitz).

commit
index.js size
tree-shake
notes

67743a3c4
872B
⭕
the parent commit of this PR

a49bd36b8
13984B
❌
because I removed ?used hack

197253e06
872B
⭕
because I added pure comment

fixes #6421
fixes #8245
Additional context

What is the purpose of this pull request?

[x] Bug fix
[ ] New Feature
[ ] Documentation update
[ ] Other

Before submitting the PR, please make sure you do the following

[x] Read the Contributing Guidelines.
[x] Read the Pull Request Guidelines and follow the Commit Convention.
[x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
[x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
[ ] Ideally, include relevant tests that fail without this PR but pass with it.

This PR makes the output of import content from 'foo.css' to
const content = (() => "body{color:red}")()
console.log(content)

.
But this might hurt runtime perf if import content from 'foo.css' is used many places. https://v8.dev/blog/preparser#pife
const content = (function () { return "body{color:red}"})()
console.log(content)

This might be better for perf though the code is longer.
I'm not making a PR for this as I didn't measure the perf but still leaving a note here.


Inline buttons don't work in edit mode

When in edit mode using (Live edit) inline buttons just show up as the name of the button in a code fence. Where as full button definitions show up as buttons as expected.
In live edit mode:

In Reading Mode:

Expected behavior is the button will appear when the cursor isn't on the line of the button like how other elements behave in live edit mode.

Doesn't work in reading mode too.

Same here - doesn't work in reading mode and in edit mode

For me it does work in reading mode, but not in edit mode

Tip: for me it works in editing mode with Live Preview only if use the inline button inside a Callout.


demos/mask_rcnn_demo: prevent OOB accesses to the colors array

There's no guarantee that the number of unique classes in the image is less than the number of colors, so use a remainder operation to wrap the color index.
Also, change the way that class_color is populated to prevent dependence on evaluation order. Evaluating class_color[class_id] can change the size, so the color indexes could change depending on whether the LHS or the RHS was evaluated first. Use emplace to set the default value instead.

output_images should be completely removed.

(Assuming you mean class_color.)
I could do that. However, with the current approach we are guaranteed that each class will have a distinct color, as long as the total number of classes in the input image is less than or equal to the number of colors in the array. With your proposed approach, that no longer holds. I think for now it's more important to have distinct colors rather than consistent colors, since without labels you can't tell which color is what anyway.

(Assuming you mean class_color.)

Correct

since without labels you can't tell which color is what anyway.

If somebody will use the demo frequently he will learn the mapping from predicted results.
Both solutions have problems, so I don't think it is important which one to choose. At least the number of problems is decreased with the patch.

At least the number of problems is decreased with the patch.

Yep, that's my approach too. :-)


Urllib python 2.7

This library did not work for me in python 2.7: 'module' object has no attribute 'Request'
In ./befh/restful_api_socket.py you try to import urllib as urlrequest but it seems that urllib does not have any Request attribute.
The python3 version worked.

Sorry that currently the project only support python 3.


Add support for EXAONE

Example:
import { pipeline } from "@huggingface/transformers";

// Create a text generation pipeline
const generator = await pipeline(
  "text-generation",
  "onnx-community/EXAONE-3.5-2.4B-Instruct",
  { dtype: "q4f16" },
);

// Define the list of messages
const messages = [
  { role: "system", content: "You are a helpful assistant." },
  { role: "user", content: "Tell me a joke." },
];

// Generate a response
const output = await generator(messages, { max_new_tokens: 128 });
console.log(output[0].generated_text.at(-1).content);

Example output:
Sure! Here's a light joke for you:

Why don't scientists trust atoms?

Because they make up everything!

I hope you found that amusing! If you want another one, feel free to ask!

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


Use s3 as datastore to integrate and use state in running flows

Addressed above comments in this PR for branch-and-join support

@alexlatchford For comments on the code in metaflow_config.py, I've temporarily used (borrowed) code from the aip-kfp-example project to get things to work with s3. I think the final solution to use s3 may involve a slightly different approach. So leaving it as is for now. I can follow-up and take this up separately if that piece of code is not something temporary.

Addressed above comments in this PR for branch-and-join support. Closing this PR


Image preview doesn't exit on clicking back button (physical)

Once you open image preview, it doesn't exit on clicking the back button. Although the there is a button specifically for exiting the preview but the default behaviour of the back button must also serve the same function. Also, clicking the physical back button twice (not in quick succession) exits the app.

mostly  same as #2098

Yes, but my focus is not on pressing it twice, but it is on exiting the app on clicking twice.

ya! got it.
Will take of it 👍
@zulipbot claim


updated thermostat buttons and auto icon color per requirements

Problem
We updated the button style for the “Cool” and “Heat” arrows (see illustrator file)
If time allows, can the icon next to the word "Auto" be the same dark blue color and the down arrow (on the same button)
Solution

updated the svgs
changed color for the auto selection

Screenshot
https://github.com/ACE-IoT-Solutions/connecting-mha-app/assets/42820575/9a00bf1b-d522-473a-baab-295c95462aa9

looks good! From Andrew's latest email though - I think they said we can leave the auto icon color as is since it changes color for cool and heat? or we can show them this on Tuesday and see what they like


[Burning Wheel] Reflexes and Mortalwound

Adding script workers for Reflexes and Mortalwound attributes. Shade math is taken from the Monster Burner pg 367, the chapter on Gray and White Math. Also added a checkbox for the Tough trait, which affect Mortalwound calculations.
These changes disable the dropdown for shade for Reflexes and Mortalwound, since they are automatically calculated from the base stats.

I had to revert the changes because the javascript had errors and there were other errors caused by using the disabled auto-calc field on a select, which isn't valid. If you can fix these issues and create another pull request I can try and merge it tomorrow.

Mm, I just saw the errors and I've made a fix for it. Didn't know the disabled tag would mess with things (it's a regular html tag, that does work on select too, but I guess you are doing some special stuff with it for auto-calc).
Sorry if this stuff is a bit trial-and-error, but without a pro account I can't really test the sheet properly.


bug(datepicker): inconsistent announcement of start date and end

copied from internal bug report: http://b/195600297

Browse the Datepicker demo URL
Navigate to the "Date range selection" section
Activate "Open calendar" button from date range section, say, "Date range selection"
Choose any start date and end dates
Focus again on the start date and end date text boxes

Actual result:

It is not announcing the state date on state date edit box with date using VoiceOver, NVDA and JAWS with linear navigation
It is announcing "Enter a date range, edit text" and then with a long pause of 2-3 seconds & announcing "start date", where as it is announcing "End date, Edit text, Enter a date range" when focus on End Date editbox using ChromeVox

EXPECTED result:
It should announce consistently on both start date and end date edit boxes. Also, there should not be delay in announcing the start date

This was fixed by #25457


AmazonAPIGateway.GetBasePathMappingAsync response not mapped to fields

Description
Response of AmazonAPIGateway.GetBasePathMappingAsync method has all fields set to null.
Reproduction Steps
Provided you have API gateway mapped to basepath following response returns all empty:
var API = new AmazonAPIGatewayClient();
var apiMapping = await API.GetBasePathMappingAsync(new GetBasePathMappingRequest()
                { DomainName = "valid.example.com", BasePath = string.Empty });

All fields of GetBasePathMappingResponse are null except ContentLength, which is 80 for me (probably depends on Stage and Domain name; domain in code above altered).
In case of invalid domain:
var apiMapping = await API.GetBasePathMappingAsync(new GetBasePathMappingRequest()
                { DomainName = "invalid.example.com", BasePath = string.Empty });

Expected result: Not found exception.
Actual result: All fields of GetBasePathMappingResponse are null except ContentLength, which is set to 12.
Logs
AmazonAPIGatewayClient 1|2021-05-24T23:31:25.623Z|DEBUG|Received response (truncated to 1024 bytes): [{"item":[{"basePath":"(none)","restApiId":"x2y2ae142c","stage":"EMDev_stage"}]}

Documentation declares a slightly different model (without "item", not array but single element):
https://docs.aws.amazon.com/apigateway/api-reference/resource/base-path-mapping/
C# generated class matches documentation but doesn't match actual response:
https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Services/APIGateway/Generated/Model/GetBasePathMappingResponse.cs
Environment

SDK Version: netcoreapp3.1
Package Version: <IP_ADDRESS>
OS Info:  Windows 10
Build Environment: dotnet run
Targeted .NET Platform:

Resolution

[ ] :wave: I can/would-like-to implement a fix for this problem myself

It looks like API was changed on server-side without updating API declaration in coral service.
This is a :bug: bug-report

CLI is also affected:
$ aws apigateway get-base-path-mapping --domain-name  valid.domain.net  --base-path ""

$

I have setup a test application using the environment and versions you specified.
For the invalid case I am getting the following exception: "NotFoundException: Invalid domain name identifier specified"
For the valid case, it will require more setup to verify. I would like to figure out why the exception isn't showing up for the invalid case first to ensure you are not getting an unexpected exception for the valid case as well.
Is the example code the actual code you are using or a mocked up example? Do you have anything in your code that could be hiding the exception?

@boblodgett domain name is mocked - just an example (I believe none is allowed to query domain names from my account anyway).
You should add some domain in ec2 console first: https://[region].console.aws.amazon.com/apigateway/main/publish/domain-names
In order to create a domain entity, you should have a matching SSL certificate which can be obtained only when you validate domain ownership.
Provided you have access to API source code compare response model for
https://docs.aws.amazon.com/apigateway/api-reference/resource/base-path-mapping/
and
https://docs.aws.amazon.com/apigateway/api-reference/resource/base-path-mappings/
I believe in code result type is the same but in the service definition (are you using coral service?) they are different. The invalid model leads to errors in generated documentation and client code.


Mem leaks on terminate

So I'm seeing these memory leak errors when I terminate the engine, I think its because you're not deallocing the ECS data?
	ECS_alloc();

	// create rocks
	for (int i = 1; i <= 200; i++) {
		int rock = entity_create();

		component_add(rock, COMPONENT_KINEMATIC_BODY);
		component_add(rock, COMPONENT_TRANSFORM);
		component_add(rock, COMPONENT_MESH);
		component_add(rock, COMPONENT_MATERIAL);
		component_add(rock, COMPONENT_SHADER);

		mesh[rock] = mesh_alloc_rock(5, 1);

There's no explicit dealloc'ing of the entities or their associated data.

Is this still happening? I've updated the project quite a bit since this was opened.

Yes, it is.
❯ make
mkdir -p build/bin
mkdir -p build/obj
clang -c dep/glad.c -g3 -fsanitize=address  -Wall -Wextra -Wpedantic -std=c99 -ferror-limit=15 -Idep -o build/obj/glad.o
clang build/obj/*.o src/*.c  -Isrc -Idep -lglfw -lGL -lm -g3 -fsanitize=address  -Wall -Wextra -Wpedantic -std=c99 -ferror-limit=15 -o build/bin/lite-engine
time ./build/bin/lite-engine
Rev up those fryers!
Attempting to load shaders 'res/shaders/primitive.vs.glsl' and 'res/shaders/primitive.fs.glsl'
Attempting to load shaders 'res/shaders/unlit.vs.glsl' and 'res/shaders/unlit.fs.glsl'
LLVMSymbolizer: error reading file: No such file or directory

=================================================================
==20632==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 537040 byte(s) in 103 object(s) allocated from:
    #0 0x5582f4fe93be in malloc (/home/tauraamui/src/lite-engine/build/bin/lite-engine+0x1813be) (BuildId: b9ea91abfb93364000de338e8203a2e097a0cb84)
    #1 0x7f09368bc8e0  (/usr/lib/x86_64-linux-gnu/dri/virtio_gpu_dri.so+0xbc8e0) (BuildId: c0d9016bc0542e3e94f66cc6a322c19657b54611)

Indirect leak of 1232 byte(s) in 7 object(s) allocated from:
    #0 0x5582f4fe93be in malloc (/home/tauraamui/src/lite-engine/build/bin/lite-engine+0x1813be) (BuildId: b9ea91abfb93364000de338e8203a2e097a0cb84)
    #1 0x7f09368bc8e0  (/usr/lib/x86_64-linux-gnu/dri/virtio_gpu_dri.so+0xbc8e0) (BuildId: c0d9016bc0542e3e94f66cc6a322c19657b54611)
    #2 0x7ffcba632c6f  ([stack]+0x1ec6f)

Indirect leak of 880 byte(s) in 5 object(s) allocated from:
    #0 0x5582f4fe93be in malloc (/home/tauraamui/src/lite-engine/build/bin/lite-engine+0x1813be) (BuildId: b9ea91abfb93364000de338e8203a2e097a0cb84)
    #1 0x7f09368bc8e0  (/usr/lib/x86_64-linux-gnu/dri/virtio_gpu_dri.so+0xbc8e0) (BuildId: c0d9016bc0542e3e94f66cc6a322c19657b54611)
    #2 0x7ffcba632a2f  ([stack]+0x1ea2f)

Indirect leak of 528 byte(s) in 3 object(s) allocated from:
    #0 0x5582f4fe93be in malloc (/home/tauraamui/src/lite-engine/build/bin/lite-engine+0x1813be) (BuildId: b9ea91abfb93364000de338e8203a2e097a0cb84)
    #1 0x7f09368bc8e0  (/usr/lib/x86_64-linux-gnu/dri/virtio_gpu_dri.so+0xbc8e0) (BuildId: c0d9016bc0542e3e94f66cc6a322c19657b54611)
    #2 0x7ffcba632c7f  ([stack]+0x1ec7f)

Indirect leak of 352 byte(s) in 2 object(s) allocated from:
    #0 0x5582f4fe93be in malloc (/home/tauraamui/src/lite-engine/build/bin/lite-engine+0x1813be) (BuildId: b9ea91abfb93364000de338e8203a2e097a0cb84)
    #1 0x7f09368bc8e0  (/usr/lib/x86_64-linux-gnu/dri/virtio_gpu_dri.so+0xbc8e0) (BuildId: c0d9016bc0542e3e94f66cc6a322c19657b54611)
    #2 0x7ffcba632a3f  ([stack]+0x1ea3f)

Indirect leak of 192 byte(s) in 4 object(s) allocated from:
    #0 0x5582f4fe93be in malloc (/home/tauraamui/src/lite-engine/build/bin/lite-engine+0x1813be) (BuildId: b9ea91abfb93364000de338e8203a2e097a0cb84)
    #1 0x7f09368bc9f7  (/usr/lib/x86_64-linux-gnu/dri/virtio_gpu_dri.so+0xbc9f7) (BuildId: c0d9016bc0542e3e94f66cc6a322c19657b54611)

SUMMARY: AddressSanitizer: 540224 byte(s) leaked in 124 allocation(s).
Command exited with non-zero status 1
6.89user 0.57system 0:19.16elapsed 38%CPU (0avgtext+0avgdata 286272maxresident)k
0inputs+0outputs (0major+84654minor)pagefaults 0swaps
make: *** [makefile:32: build_lite_engine] Error 1

I see. I think this might be specific to your graphics drivers. I'll do my best to help track it down though. I was having a similar issue a while back but then I updated my drivers and I haven't seen it since.


[FEATURE_REQUEST] Typing Notification

Hello,
I installed your project on my Mattermost server, and it's awesome, thanks.
Would it be possible to have the typing effect before sending the request to OpenAI ?
Best Regards,
Maxime from Netsyt

'looking at the code it seems we're already doing that. It works for me in the thread view (for the subsequent responses in a thread).
I don't know how to improve the situation for the first reply... Am I using the API wrong?

No it is working fine, but will it be possible to also do it in the main thread and not only on the request thread ?

#70

I created a merge request


Request: Support for RS485

I'm working with multiple Arduini at long distances (>100m) and bumped into RS485 - affordable albeit cable based.
Any chance RS485 (or zigbee/wifi) will be supported in Nanpy?

I will start reading some documentation about it :) let you know

RS485 should work already, it has the same device in Linux as RS232.
The Nanpy communication is half duplex (master/slave), so this should not be a problem.

Thanks @ponty I can close this bug. @lunasilvestre try Nanpy with RS485 and let us know :)


Improve Test Coverage

[ ] closes #xxxx
[ ] tests added / passed
[ ] passes git diff upstream/master -u -- "*.py" | flake8 --diff
[ ] added entry to docs/whatsnew latest version

This was too broad. Going to close.


SIGPROF cause zeromq recv() raise EINTR

I came across a problem, when I ran gperftools with ProfilerStart() and ProfilerStop() in my project, which using  zeromq. It would throw "EINTR" when zmq::recv() receives the SIGPROF signal in it's progress. So I tried to block SIGPROF in every threads except the main thread. It came out that the cpu-profiler would not profile the other threads info. Do I miss something ?
@alk

Any syscall is expected to return EINTR from time to time and user space code is supposed to always deal with it. So in this case there is nothing gperftools can do. Closing as won't fix. zmq thingy should be fixed to deal with EINTR.


Transparently switch to optional parameter values

BEGINRELEASENOTES

Introduce pre-processor checks to transparently switch to the new std::optional return values of podio::Frame::getParameter (introduced with AIDASoft/podio#580)

ENDRELEASENOTES

Tests are currently failing due to incompatible input file: https://github.com/key4hep/k4Clue/actions/runs/9268881385/job/25498496792?pr=59#step:3:344

This becomes obsolete with https://github.com/key4hep/k4FWCore/pull/195


Typescript router "Additional types" are ignored

Describe the Issue
Following the typescript example for "additional types" (https://itty.dev/itty-router/typescript):
Example Router Code
type CF = [context: ExecutionContext];

const router = Router<IRequest, CF>();

router.get("*", (req, ctx) => {
  return new Response("foo");
});

In the code above, the type of ctx is any.
In router.handle, the type is propagated properly
Expected Behavior
The type of the second route handler argument should be of type ExecutionContext.
Actual Behavior
The type of the second route handler argument is any.
Environment (please complete the following information):

Environment: Cloudflare Workers
itty-router Version: 4.0.23

Weird... in our own example testbed, we have a situation that mirrors your own.  We can see it working fine here:

Oh wow... when switching the first param to use/union IRequestStrict (shown above) instead of IRequest (default, and what you used), it works... definitely a bug.  Good catch!

So this stems from the following:

In TS there is no way to detect if a user has passed in a generic (which we want to detect)
so we were checking for equality against IRequest (the default)... if this passes, we assumed the universal route pattern was not being used, otherwise we used it.  This is naive, as:

we should consider both the request-type (first arg), and the second arg
if either args are not empty (default), or the first param is not IRequest, we should use universal, as a change has been made

Solution
I've modified the type definition to explicitly check both the first and second param.  If either have been modified, it uses the universal route.
This will roll out in 4.1x with several other changes - great catch @paulrostorp!

Found some issues, so this created a deep dive...
I've done a pretty heavy rework on the internals, which now allows a MUCH more robust usage.
Changes:

a router-level global generic can now be used, period
route-specific generics can then be used on a per-route basis to override

@kwhitley Are the changes you mentioned on the v4.x branch?

These are being included in the v5.x release that's being finalized this week (with any luck.... I just have to document the CORS changes and migration guide).
Once this is live, I'll backport the types to v4.x as well - but that said, I'd recommend migrating on to v5, as it's adding a lot of power while allowing your own code to shrink further :)

Nice, thanks, v5 is looking great !

Heads up - v5 is out, and we have a guide on the additional args here:
https://itty.dev/itty-router/typescript/additional-arguments
I still have some work to do with animated GIFs and such showing the typing in effect, but it should all be working now, across all 3 routers! :)

Ofc certainly re-open if v5 is still having issues :)
Once this is stable, I'll start working backwards to patch up 4.x as much as possible, start adding deprecation notices to things like router.handle, etc. :)


inserting customBatch

An uncaught Exception was encountered
Type: Error

Message: Call to undefined method Google_Service_ShoppingContent_ProductsCustomBatchRequest::toSimpleObject()

Line Number: 108

Backtrace:

File: vendor/google/apiclient-services/src/Google/Service/ShoppingContent/Resource/Products.php
Line: 40
Function: call

Please share the code you're executing which is raising this error.

As we don't have enough information to assist in resolving this issue, I'm going to close it. If you're still having trouble, please feel free to reopen, providing the information requested, and we'll be happy to continue assisting!

@jdpedrie Thanks for looking into the issue. later I figured it, that it was due to same class name which I was using in my project. The class name was "Google_model".
It is know been resolved and is working great at my end :-)


Regional stats broken

When I enter "> 1%", I see Chrome 72 is at about 15%, which seems about right.
When I enter "> 1% in US", Chrome 72 is only at 1.04%. That doesn't seem right. According to caniuse, it should be 7.36%.
When I enter "> 1% in CN", Chrome 72 is again at 1.04%. In fact, the stats for every browser are the same no matter which country is entered.
It seems something is awry with the regional stats.

The same thing is happening when I reference '> 0.30% in NL' Android 4.3.3 does not show but I use >0.25 it does show and with 3% marketshare :)

Could be because some packages are behind when deployment happens. @jonrohan does Zeit cache the node_modules?
Either way, now it seems it's fine

I think a lot of this is due to my struggles with keeping the dependencies updated. I think I have it working automatically now so shouldn't be a discrepancy going forward.


Support Python 3.9 (Fix #558)

This issue was already raised on https://bugs.python.org/issue36517,
adding a TODO to consider going back to Generic[T] once this is solved.
Tested python -m ciphey -t "aGVsbG8gbXkgbmFtZSBpcyBiZWU=" on Python 3.9, and it works with this fix.

Should I include a change to https://github.com/Ciphey/Ciphey/blob/master/.github/workflows/terminaltest.yml#L10 to include 3.9 as part of this PR?

Hey!
Thanks for this <3
Do you mind editing our tests to include pythobn 3.9?
https://github.com/Ciphey/Ciphey/blob/master/.github/workflows/tests2.yml
^ I think that's what we use for CI, but the name is quite bad haha

Hey!
This fails on Windows, which is okay -- it's not your fault.
We're removing CipheyCore so Windows will work in the future. For now, Linux & Mac OS support on 3.9 is great 🥳
I think we're going to take this & intentionally fail our CI until we can add support for Windows when we remove CipheyCore.
Thanks so much!
@all-contributors please add @JesseEmond for code

@all-contributors please add @JesseEmond for code

Hey we're changing from MIT to GPLv3 because some of our projects are licensed with that, do you approve? If you do not approve we will be forced to delete your code and rewrite it 😢
By approving of this change, you are agreeing to re-license the code you wrote under GPLv3.


Conversions to and from python objects. Refs #167 #202 #185

Motivation and Context
Improve scope of compilation with ability to convert typed-python types to object.
Allow bytes literals.
Allow repr() and str() on typed python Classes.
Approach
This uses the approach of passing a raw type pointer (Type*) to identify the type. (Not the getOrSetTypeResolver as mentioned in #167.)
How Has This Been Tested?
Back and forth conversions produce same value.
Bytes literals are used in compiled functions.
repr() and str() work on typed python Classes with custom repr or str.
Types of changes

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

Checklist:

[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

Thanks, will make this change...
On Thu, Aug 8, 2019 at 10:33 AM Braxton McKee<EMAIL_ADDRESS>wrote:

@braxtonmckee requested changes on this pull request.
In typed_python/_runtime.cpp
https://github.com/APrioriInvestments/nativepython/pull/208#discussion_r312069360
:

@@ -303,20 +340,139 @@ extern "C" {
return floorresult;
}

PyObject* nativepython_runtime_int_to_pyobj(int64_t i) {

// returns layout*
uint8_t np_runtime_pyobj_to_typed(PyObject obj, uint8_t tgt, Type tp) {

   // tgt is a layout pointer

   PyEnsureGilAcquired acquireTheGil;

   PyInstance::copyConstructFromPythonInstance((Type *)tp, (instance_ptr)&tgt, obj, true);

you need to be passing tgt, not &tgt. Imagine Type is
NamedTuple(x=int,y=int). This takes up 16 bytes. As it currently stands,
you will take the NamedTuple out of the python object and jam it into the
16 bytes of stackspace that have been allotted for tgt, which is 8 bytes.
This function ought to read
void np_runtime_pyobj_to_typed(PyObject* ob, instance_ptr tgt, Type* tp) {
PyEnsureGilAcquired acquireTheGil;
PyInstance::copyConstructFromPythonInstance(tp, tgt, obj, true);
}
Then, when you call it, just drop the 'store' operation. Take the
NamedTuple case. You're already passing it 'targetInstance.expr' , which is
in fact a NamedTuple*. You cast it to void* to pass it to this function,
and it comes in as 'tgt'.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/APrioriInvestments/nativepython/pull/208?email_source=notifications&email_token=ALOXRC32UNY67IRAV2I4UALQDQVC5A5CNFSM4IKF3KCKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCA74PAQ#pullrequestreview-272615298,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALOXRC6NRJBF4P3N66RDH5TQDQVC5ANCNFSM4IKF3KCA
.


[DOCS] Update VisibilityEnabler* and TileSet doc

ClassRef cleanups and additions.

Thanks!

Cherry-picked for 3.0.7.


Changed doxygen tool for generating taf docs to sphinx

Signed-off-by: Iryna Barna<EMAIL_ADDRESS>@rbbratta, @seungweonpark, @NazarTkachuk, @esmacgil, @lijenni please review.

This change is

Reviewed 46 of 46 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion.

requirements.txt, line 21 at r1 (raw file):

sphinx_rtd_theme
sphinxcontrib-napoleon
autoapi

It may not matter, but I'd think we should have a newline here.

Comments from Reviewable

Review status: all files reviewed at latest revision, 2 unresolved discussions.

docs/pages/6_4_taf_coding_config_structure.dox, line 96 at r1 (raw file):

\b Vlab:
\code{.json}
{"entry_type": "cross", "instance_type": "vlab", "id": "2", "ip_host": "localhost", "ip_port": "8050", "ifaces": ["vlab0", "vlab1", "vlab2", "vlab3", "vlab4"], "tgmap": [0], "related_id": [1]}

Please use "ports" instead of "ifaces" because option is outdated and is not used.
Replace in all the other similar places.

Comments from Reviewable

Review status: all files reviewed at latest revision, 3 unresolved discussions.

docs/source/test_execution_preconfiguration.rst, line 35 at r1 (raw file):

   {
   "env": [
           {"id": 0, "ifaces": [[1, 1, 6], [1, 1, 7], [1, 1, 8], [1, 1, 9], [1, 1, 10], [1, 1, 11], [1, 1, 12], [1, 1, 13], [1, 1, 14]]},

Please use "ports" instead of "ifaces" because option is outdated and is not used.
Replace in all the other similar places.

Comments from Reviewable

Review status: 38 of 47 files reviewed at latest revision, 3 unresolved discussions.

requirements.txt, line 21 at r1 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
It may not matter, but I'd think we should have a newline here.

Done.

docs/pages/6_4_taf_coding_config_structure.dox, line 96 at r1 (raw file):
Previously, NazarTkachuk (Nazar Tkachuk) wrote…
Please use "ports" instead of "ifaces" because option is outdated and is not used.
Replace in all the other similar places.

Done.

docs/source/test_execution_preconfiguration.rst, line 35 at r1 (raw file):
Previously, NazarTkachuk (Nazar Tkachuk) wrote…
Please use "ports" instead of "ifaces" because option is outdated and is not used.
Replace in all the other similar places.

Done.

Comments from Reviewable

Reviewed 1 of 46 files at r1, 11 of 11 files at r2.
Review status: all files reviewed at latest revision, 2 unresolved discussions.

Comments from Reviewable

Review status: all files reviewed at latest revision, 3 unresolved discussions.

taf/plugins/loggers.py, line 1 at r2 (raw file):

# Copyright (c) 2011 - 2016, Intel Corporation.

Update copyright ending year.

Comments from Reviewable

I didn't read all the doc changes and you probably would want the code changes in another request, but there seems to be a few parts of the code to make better.

Reviewed 28 of 28 files at r3.
Review status: all files reviewed at latest revision, 14 unresolved discussions, some commit checks failed.

reporting/reporting_server.py, line 67 at r3 (raw file):

        """
        self._lock = RLock()

Why don't we use this as a context?
with self._lock:
    # take sensitive actions
# do non-sensitive action

reporting/reporting_server.py, line 87 at r3 (raw file):

        _ok = False
        self._lock.acquire()
        try:

And here I would make it possible to combine with suppress, but the native version wouldn't enable what I want:
with self.class_logger.suppress(message='...', exc_tuple=Exception), self._lock:
    self.queue.append(cmd)
    self.class_logger.info('Command added successfully. CMD keys: %s', list(cmd.keys()))
    return True
return False

reporting/reporting_server.py, line 109 at r3 (raw file):

        self._lock.acquire()
        try:
            if len(self.queue) > 0:

Do we really have to calculate the length?
try:
    return self.queue.pop(0)
except IndexError:
    return None

Must we really force the first value to be popped?  Sure, that can be the default, but must it be the only thing allowed?

reporting/reporting_server.py, line 869 at r3 (raw file):

        """
        self.class_logger.debug("Kwargs: %s" % (str(kwargs), ))

Logging after building a string, please:
self.class_logger.debug('Kwargs: %s', kwargs)

reporting/reporting_server.py, line 870 at r3 (raw file):

        """
        self.class_logger.debug("Kwargs: %s" % (str(kwargs), ))
        try:

Use suppress please and do we really expect the if or assignment to cmd to raise an  exception?
if info is None:
    info = {}

cmd = {...}

with suppress(Exception):
    self.queue.add(cmd)
    return True
return False

reporting/reporting_server.py, line 951 at r3 (raw file):

            return True
        else:
            self.class_logger.info("Queue processing start canceled. Reason - it is disabled.")

Simple paths should come first, especially if they return from the function early:
if not self.watchdog:
    self.class_logger.info(...)
    return False

if self.watchdog_thr is None:
    # first start
    self.class_logger.info(...)
    start_thr()
elif self.watchdog_thr.is_alive():
    self.class_logger.info(...)
else:
    # thread is dead
    ...
return True

reporting/reporting_server.py, line 965 at r3 (raw file):

        """
        # Truncating command for log message
        cmd1 = cmd.copy()

Why not:
cmd1 = {k: v for k, v in cmd.items() if k not in ['report']}
self.class_logger.info('...: %s', cmd1)

reporting/reporting_server.py, line 1017 at r3 (raw file):

        cinprocess = self.clients.inprocess()
        self.class_logger.info("Clients in process: {0}".format(cinprocess))
        if qlen == 0 and len(cinprocess) == 0:

Don't test and return Boolean literals.
return qlen == 0 and cinprocess

reporting/reporting_server.py, line 1078 at r3 (raw file):

    """
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

Please use contextlib.closing and don't manage the garbage collector (del sock):
with contextlib.closing(socket.socket(socket.AF._INET, socket.SOCK_STREAM) as sock:
    sock.bind(('', 0))
    return sock.getsockname()[1]

reporting/reporting_server.py, line 1122 at r3 (raw file):

    _vr = None
    try:
        _vr = open(_vr_path, "w")

open is a context manager:
try:
    with open(_vr_path, 'w') as _vr:
        _vr.write(str(port))
except Exception as err:
    ...
...

reporting/reports/XML.py, line 555 at r3 (raw file):

        """
        self.class_logger.info("Appending XML report with fail.")
        for i in range(len(report['sections'])):

Why not:
report['sections'] = [xml_unescape(section) for section in report['sections']]

Comments from Reviewable

Reviewed 70 of 70 files at r4.
Review status: 144 of 145 files reviewed at latest revision, 14 unresolved discussions, some commit checks failed.

Comments from Reviewable

Reviewed 1 of 46 files at r1.
Review status: all files reviewed at latest revision, 14 unresolved discussions, some commit checks failed.

Comments from Reviewable

I'll update code according to your comments when I finish activities with docstrings. Also I'll fix pylint blocking errors.

Review status: all files reviewed at latest revision, 14 unresolved discussions, some commit checks failed.

Comments from Reviewable

Reviewed 12 of 80 files at r5, 19 of 23 files at r6.
Review status: 183 of 223 files reviewed at latest revision, 20 unresolved discussions.

reporting/reports/XML.py, line 623 at r6 (raw file):

        _path_arr = dump_logfile.split("/")
        if _path_arr and not os.path.exists(dump_logfile[:-len(_path_arr[-1])]):

I'm unaware of how _path_arr could not be True here, splitting the empty string results in a list with the empty string as its only member, which is a True list (bool([''] is True).  Then, if all we want here is the dirname of dump_logfile, then why not use os.path.dirname?

reporting/reports/XML.py, line 638 at r6 (raw file):

        if self.infodict:
            info_nodes = []
            for info_node in list(self.infodict.keys()):

Why do we need the list of keys?  I don't see any updating of self.infodict within the loop.  To me this should be:
if self.infodict:
    self.tests.append(self.Junit.header([self.Junit.info_node(value, key) for key, value in self.infodcit.items()]))
try:
    ...

Though it seems likely to have to go multi-line to get the pylint: disable comments.

reporting/reports/XML.py, line 658 at r6 (raw file):

        except Exception as err:
            self.class_logger.error("Cannot dump XML report to file {0}. ERRTYPE: {1}, ERR: {2}".format(dump_logfile, type(err), err))
            logfile.close()

This seems to be needed in both paths, so it seems better as a statement in a finally clause.  Or better yet, handled by a context manager.

taf/testlib/helpers.py, line 534 at r6 (raw file):

        if row['field'] == field and row['mask'] == mask and row['data'] == data:
            row_count += 1
    if row_count == 1:

Returning literals immediately after a test:
return row_count == 1

Of course, as soon as row_count hits 2 inside the for loop, we could return False and row_count could really become the result tracker:
table = ...
one_match = False
for row in table:
    if row['field'] == field and row['mask'] == mask and row['data'] == data:
        if one_match:
            return False
        one_match = True
return one_match

taf/testlib/helpers.py, line 560 at r6 (raw file):

        if row['action'] == action and row['param'] == param:
            row_count += 1
    if row_count == 1:

See comment to line 534.

taf/testlib/helpers.py, line 594 at r6 (raw file):

           row['enabled'] == enabled and row['priority'] == priority:
            row_count += 1
    if row_count == 1:

See comment to line 534.

Comments from Reviewable

Review status: 130 of 276 files reviewed at latest revision, 20 unresolved discussions, some commit checks failed.

reporting/reporting_server.py, line 67 at r3 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
Why don't we use this as a context?
with self._lock:
    # take sensitive actions
# do non-sensitive action

Updated all similar places.

reporting/reporting_server.py, line 87 at r3 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
And here I would make it possible to combine with suppress, but the native version wouldn't enable what I want:
with self.class_logger.suppress(message='...', exc_tuple=Exception), self._lock:
    self.queue.append(cmd)
    self.class_logger.info('Command added successfully. CMD keys: %s', list(cmd.keys()))
    return True
return False

Please take a look on my approach. I used decorator to log error message.

reporting/reporting_server.py, line 109 at r3 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
Do we really have to calculate the length?
try:
    return self.queue.pop(0)
except IndexError:
    return None

Must we really force the first value to be popped?  Sure, that can be the default, but must it be the only thing allowed?

The first value is needed to force in accordance to processing of reports queue.

reporting/reporting_server.py, line 869 at r3 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
Logging after building a string, please:
self.class_logger.debug('Kwargs: %s', kwargs)

Updated all similar places.

reporting/reporting_server.py, line 870 at r3 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
Use suppress please and do we really expect the if or assignment to cmd to raise an  exception?
if info is None:
    info = {}

cmd = {...}

with suppress(Exception):
    self.queue.add(cmd)
    return True
return False

Done.

reporting/reporting_server.py, line 951 at r3 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
Simple paths should come first, especially if they return from the function early:
if not self.watchdog:
    self.class_logger.info(...)
    return False

if self.watchdog_thr is None:
    # first start
    self.class_logger.info(...)
    start_thr()
elif self.watchdog_thr.is_alive():
    self.class_logger.info(...)
else:
    # thread is dead
    ...
return True

Done.

reporting/reporting_server.py, line 965 at r3 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
Why not:
cmd1 = {k: v for k, v in cmd.items() if k not in ['report']}
self.class_logger.info('...: %s', cmd1)

Done.

reporting/reporting_server.py, line 1017 at r3 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
Don't test and return Boolean literals.
return qlen == 0 and cinprocess

Done.

reporting/reporting_server.py, line 1078 at r3 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
Please use contextlib.closing and don't manage the garbage collector (del sock):
with contextlib.closing(socket.socket(socket.AF._INET, socket.SOCK_STREAM) as sock:
    sock.bind(('', 0))
    return sock.getsockname()[1]

Done.

reporting/reporting_server.py, line 1122 at r3 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
open is a context manager:
try:
    with open(_vr_path, 'w') as _vr:
        _vr.write(str(port))
except Exception as err:
    ...
...

Done.

reporting/reports/XML.py, line 555 at r3 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
Why not:
report['sections'] = [xml_unescape(section) for section in report['sections']]

Done.

reporting/reports/XML.py, line 623 at r6 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
I'm unaware of how _path_arr could not be True here, splitting the empty string results in a list with the empty string as its only member, which is a True list (bool([''] is True).  Then, if all we want here is the dirname of dump_logfile, then why not use os.path.dirname?

Done.

reporting/reports/XML.py, line 638 at r6 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
Why do we need the list of keys?  I don't see any updating of self.infodict within the loop.  To me this should be:
if self.infodict:
    self.tests.append(self.Junit.header([self.Junit.info_node(value, key) for key, value in self.infodcit.items()]))
try:
    ...

Though it seems likely to have to go multi-line to get the pylint: disable comments.

Done.

reporting/reports/XML.py, line 658 at r6 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
This seems to be needed in both paths, so it seems better as a statement in a finally clause.  Or better yet, handled by a context manager.

Done.

taf/plugins/loggers.py, line 1 at r2 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
Update copyright ending year.

Done.

taf/testlib/helpers.py, line 534 at r6 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
Returning literals immediately after a test:
return row_count == 1

Of course, as soon as row_count hits 2 inside the for loop, we could return False and row_count could really become the result tracker:
table = ...
one_match = False
for row in table:
    if row['field'] == field and row['mask'] == mask and row['data'] == data:
        if one_match:
            return False
        one_match = True
return one_match

Done.

taf/testlib/helpers.py, line 560 at r6 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
See comment to line 534.

Done.

taf/testlib/helpers.py, line 594 at r6 (raw file):
Previously, esmacgil (Edward MacGillivray) wrote…
See comment to line 534.

Done.

Comments from Reviewable


[youtube] Error 404: Not Found on googlevideo.com

Checklist

[x] I'm reporting a broken site support
[x] I've verified that I'm running youtube-dl version 2020.03.24
[x] I've checked that all provided URLs are alive and playable in a browser
[x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[x] I've searched the bugtracker for similar issues including closed ones

Verbose log
WARNING: parsing .netrc: No authenticators for youtube (None, line None)
[youtube] mZyvIHYn2zk: Downloading webpage
[youtube] mZyvIHYn2zk: Downloading MPD manifest
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
ERROR: unable to download video data: HTTP Error 404: Not Found
[2:20:53] homura /tmp $ youtube-dl -v "https://www.youtube.com/watch?v=mZyvIHYn2zk"
[debug] System config: []
[debug] User config: ['--netrc']
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.youtube.com/watch?v=mZyvIHYn2zk']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.03.24
[debug] Python version 3.8.2 (CPython) - Linux-5.6.4-arch1-1-x86_64-with-glibc2.2.5
[debug] exe versions: ffmpeg 4.2.2, ffprobe 4.2.2, rtmpdump 2.4
[debug] Proxy map: {}
WARNING: parsing .netrc: No authenticators for youtube (None, line None)
[youtube] mZyvIHYn2zk: Downloading webpage
[youtube] mZyvIHYn2zk: Downloading MPD manifest
[debug] Default format spec: bestvideo+bestaudio/best
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[debug] Invoking downloader on 'https://r3---sn-8xgp1vo-2iae.googlevideo.com/videoplayback?expire=1587330905&ei=-WqcXpWqMcXj8gTRt5_YDw&ip=<IP_ADDRESS>&id=o-AOUR7SwcFxm94rIwS9cg3TqP1RizMRIURILjn7tXRkN0&itag=247&aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278&source=yt_otf&requiressl=yes&mh=mm&mm=31%2C29&mn=sn-8xgp1vo-2iae%2Csn-ab5l6n6l&ms=au%2Crdu&mv=m&mvi=2&pl=16&initcwndbps=873750&vprv=1&mime=video%2Fwebm&otf=1&otfp=1&dur=3755.199&lmt=1520178130015828&mt=1587309221&fvip=3&keepalive=yes&fexp=23882514&c=WEB&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cotf%2Cotfp%2Cdur%2Clmt&sig=AJpPlLswRAIgSR_mYrxGFVg3kKd9XG9oyVVVIeHXmQFKW5kvqc3EZuUCIHSsXEAmpKjfEiKmqGHXuOXpA3ICsblkdTTPx5bBZ3SR&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ALrAebAwRgIhAI9LQLqC2egQQUf701TZ4nxuMRJJQzIHdmYDZcS1kPvhAiEA5ddI8JkUeNhQ0c6sDI_9q7NahXyIEzaQmcEcszMSsuw%3D&ratebypass=yes'
ERROR: unable to download video data: HTTP Error 404: Not Found
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 1920, in process_info
    partial_success = dl(fname, new_info)
  File "/usr/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 1865, in dl
    return fd.download(name, info)
  File "/usr/lib/python3.8/site-packages/youtube_dl/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "/usr/lib/python3.8/site-packages/youtube_dl/downloader/http.py", line 341, in real_download
    establish_connection()
  File "/usr/lib/python3.8/site-packages/youtube_dl/downloader/http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "/usr/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 2238, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

Description

youtube-dl "https://www.youtube.com/watch?v=mZyvIHYn2zk" fails with a 404 error, but is playable in the browser. I updated to the latest git master and was still able to reproduce this problem.

Server side Youtube issue for format 247.

I don't understand - it plays fine on the web.

Same issue here :
$ youtube-dl --version
2020.03.24

$ youtube-dl -F https://www.youtube.com/watch\?v\=02Q9IO7kcH4                                           [youtube] 02Q9IO7kcH4: Downloading webpage
[info] Available formats for 02Q9IO7kcH4:
format code  extension  resolution note
140          m4a        audio only tiny  130k , m4a_dash container, mp4a.40.2@128k (44100Hz), 9.76MiB
251          webm       audio only tiny  141k , opus @160k (48000Hz), 10.02MiB
278          webm       256x144    144p   95k , webm container, vp9, 30fps, video only
160          mp4        256x144    144p  108k , avc1.4d400b, 30fps, video only
242          webm       426x240    240p  220k , vp9, 30fps, video only
133          mp4        426x240    240p  242k , avc1.4d400c, 30fps, video only
134          mp4        640x360    360p  250k , avc1.4d401e, 30fps, video only, 5.83MiB
243          webm       640x360    360p  405k , vp9, 30fps, video only
244          webm       854x480    480p  752k , vp9, 30fps, video only
135          mp4        854x480    480p 1155k , avc1.4d4014, 30fps, video only
247          webm       1280x720   720p 1505k , vp9, 30fps, video only
136          mp4        1280x720   720p 2310k , avc1.4d4016, 30fps, video only
302          webm       1280x720   720p60 2646k , vp9, 60fps, video only
248          webm       1920x1080  1080p 2646k , vp9, 30fps, video only
298          mp4        1280x720   720p60 3465k , avc1.4d4016, 60fps, video only
137          mp4        1920x1080  1080p 4331k , avc1.64001e, 30fps, video only
303          webm       1920x1080  1080p60 4410k , vp9, 60fps, video only
299          mp4        1920x1080  1080p60 4478k , avc1.64002a, 60fps, video only, 49.22MiB
18           mp4        640x360    360p  254k , avc1.42001E, mp4a.40.2@ 96k (44100Hz), 19.14MiB
22           mp4        1280x720   720p  687k , avc1.64001F, mp4a.40.2@192k (44100Hz) (best)

$ youtube-dl -f 137+140 https://www.youtube.com/watch\?v\=02Q9IO7kcH4                                   [youtube] 02Q9IO7kcH4: Downloading webpage
ERROR: unable to download video data: HTTP Error 404: Not Found

Yet, this video is playable on YouTube itself.


add dump_to_spacy script

@danielkingai2 I think this script does the dumping to file in the right way for this version of spacy - I see what you mean about the differences between this version and later, that will be annoying to change
Edit: I tried converting the data and training a parser with spacy train en -N train.json dev.json, this seems to work nicely - 98.6 POS tag acc and 88.8 LAS after 3 epochs of training.

closed in favour of #20


Add capitalization settings support for useSearchField

I've made some updates to allow setting autoCapitalize in useSearchField as well.
This is a follow-up to the following PR

https://github.com/adobe/react-spectrum/pull/5472

✅ Pull Request Checklist:

[ ] Included link to corresponding React Spectrum GitHub Issue.
[x] Added/updated unit tests and storybook for this change (for new code or code which already has tests).
[x] Filled out test instructions.
[ ] Updated documentation (if it already exists for this component).
[ ] Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

A Storybook example has been added, so you can switch the property from the RadioButton.
🧢 Your Project:

@snowystinger
While it may not be a common use case, there seems to be demand for this feature as seen in issues like this one from another OSS project: https://github.com/ionic-team/ionic-framework/issues/12535.
It might not be typical, but providing implementers with the option could still be beneficial.
What do you think?

@ryo-manba It looks like Ionic never merged those changes. So my opinion is unchanged right now. I'll get a few more members of the team to chime in.

I agree with @snowystinger, IMO we should hold off on including this capitalization setting for non-TextFields. Users can already apply this setting directly on the input in a RAC/hooks implementation and we don't have a use case for the React Spectrum SearchField component.

@snowystinger @LFDanLu
You guys are right, as the SearchField component of React Spectrum, there may not be a need to support this use case.
I'm going to close this pull request and send only the comment modification in a separate PR.
Thank you for your opinions.

@ryo-manba no problem and thank you for the PR!


openssl 1.1.0e reports X509_V_ERR_CA_MD_TOO_WEAK for rsassaPss

Our internal corporate SSL CA uses the rsassaPss signature algorithm. openssl 1.0 validates this just fine, as does openssl built from master. However, openssl 1.1.0e rejects it with "CA signature digest algorithm too weak".
I stepped through it and the problem is that check_sig_level calls OBJ_find_sigid_algs with an nid of 912, and it returns mdnid == NID_undef. That leaves secbits set to -1, so the call fails:
return secbits >= minbits_table[level - 1];

(where minbits_table[level - 1] is 80).
What's extra weird is that openssl s_client -connect internal-server:443 complains, but openssl verify -show_chain -untrusted intermediate.pem server.pem decides that everything is fine.

Edit: Still a problem with openssl 1.1.0f.

Is this still an issue? I've not been able to recreate this problem. I created a CA with a PSS cert, and then created a "normal" RSA ee cert from it. s_client was able to verify the chain just fine. I tried with the latest 1.1.0 from git as well as with 1.1.0f with the same results.

Yes.

I have been able to recreate this issue.
The reason this fails is that 1.1.0 introduced stricter checking of any intermediate CA digests according to the set "security level". This checking does not exist at all in 1.0.2, which is why this doesn't fail in 1.0.2. The only work around I can come up with for this is to reduce the security level to 0 (e.g. by adding @SECLEVEL=0 onto the end of your cipher list).
The problem is that OpenSSL's support for PSS certificates has historically always been minimal to say the least. You cannot use them as an end entity cert in 1.1.0 or 1.0.2 (but you can in 1.1.1) at all. It was kind of luck that you could get away with it as a CA cert in 1.0.2 due to the looser checking that goes on in that version.
The way we check the message digest in 1.1.0 is to infer it from the OID for signature. This works for most certificate types but not PSS, where the digest details are stored as parameters in the SignatureAlgorithmIdentifier. In master (1.1.1) we have added full support for PSS certs, including as end entity certs or as intermediate certs.
PR #3301 added the necessary support for this into master. Unfortunately that is far too significant a change to back port to a stable branch. Therefore there is no easy fix for this for 1.1.0. The only options are to either (1) wait for 1.1.1 to come out, or (2) use the security level workaround.

Would it be a reasonable compromise to relax the security check back to 1.0 behavior just for PSS?
I convinced my organization's IT department to switch to SHA-256 + RSA, but there are still a bunch of internal sites using the old CA that don't validate unless I extract all of the intermediate certificates from a Windows machine and install them locally.

Yes, that does seem fairly reasonable.
Fix in #6052.

Fixed by #6052. Closing.


Import code from CLI repo

Seed this repo with the sdg code from the instructlab/instructlab repository. We should do this in a way that retains the history of those files.
To enable the quickest swap to the library to minimize the time the code exists in 2 places, we should avoid changing it as much as possible for the first release. We can evolve it from there after a 0.1.0 release.
The code in question is in the src/instructlab/generator directory. The interface to that code used by the ilab generate handler is a single generate_data() function. We can keep that as-is for the first release and then evolve the code from there.

This code was imported into the src/sdg directory, including the history of those files. No changes have been made to them since the import.
There is also a Makefile target for checking to see if any changes have been made in instructlab/instructlab to these files since we imported them -- make check.
If this approach ends up not working out, we can always erase the contents of this repo and start over, but for now, this issue is completed.


Fix search method of Guild and TextBasedChannel

Please describe the changes this PR makes and why it should be merged:
Searching from both a channel and a guild throws the following error:
target.client.api[(intermediate value)(intermediate value)(intermediate value)] is not a function

This will take care of that.
Semantic versioning classification:

[ ] This PR changes the library's interface (methods or parameters added)

[ ] This PR includes breaking changes (methods removed or renamed, parameters moved or removed)

[ ] This PR only includes non-code changes, like changes to documentation, README, etc.

this pr isn't needed because of #1667

What gus said.


Drop support for PY36

Python dropped support on 2021-12-23. Our policy (#760) is to drop
support on the next point release after Python does.

As PEP562 was added in PY37, we can also remove the backport. This should resolve the failing coverage check.


Objective-C solution

Trying again, without cruft in the commits.
Once again I welcome your keen eye!

Jeff, in the process of doing the ObjC version, I discovered a Swift commit where I violated the 3 Laws. Since folks may study the commits, I'd like to revise the history.  I should probably re-test-drive. thanks Jon!


[CRT][microTVM] Enable USMP by default for AoTExecutor + CRT runtime

This PR enables USMP by default when AoTExecutor and CRT runtime are selected. Check forum discussion about this change: https://discuss.tvm.apache.org/t/enable-usmp-by-default-in-aot-executor-with-runtime-crt/14406

@Mousius thanks for the review. I removed unrelated changes. The rest are only removing some unused packages. PTAL.


Cancel submission waits after close of epoch

A node that is trying to send end-of-publish, but is waiting for locally executed transactions to be sequenced, may end up waiting a long time if the elected submitter of that cert has failed to submit. Instead, at reconfig time, we should immediately submit everything we are waiting for.
This greatly reduced reconfig pauses while testing my problematic PR #10360, and it may provide some benefit even during normal operation. There were no obvious problems caused by the temporary increase in amplification even though we were above 4K tps, so the inflight submission limit appears to be doing the right thing.

@mwtian couple of ideas, lmk what you think:

we could only cancel the wait if our position is below some threshold (e.g. in bottom 1/3rd or something)
when epoch ends, we could add a random delay of 0-10s to spread out any load.

I am not convinced however that there is a need to fix this right away - I already tested this at high load and didn't observe any problems. In addition to the fact that the inflight limit is observed, this change will only come into effect during a period of sharply declining submissions anyway. Happy to run a test with short epochs before landing though.

I agree that for the bottlenecks we know of, the inflight limit should be enough. My worry is that running the network at at inflight limit at epoch end is not something we often do, so I'm a bit hesitant to have potentially destabilizing behavior now or in future. One way to test could be to overload consensus by sending only owned object transfers, and try to get sequencing_certificate_inflight to be close to 100k at epoch change.
Another idea, similar to idea 2, is to use position at ~L626, and wait for both position / 5 * DEFAULT_LATENCY timer and epoch end for the epoch end condition. I can add this later too.


Values emitted out of order when nexting on a subject from one of its subscribers

Bug Report
Current Behavior
When synchronouslynexting a value on a subject from within one of the subject's subscribers, subscriptions made afterwards get values out of order.
Expected behavior
All subscribers on a subject receive values in the same (and correct) order.
Reproduction
https://codesandbox.io/s/mystifying-grass-ejyu7
import { interval, Subject } from "rxjs";
import { filter, take } from "rxjs/operators";

const subject = new Subject<number>();
// interval is simply a convenient way to emit values on the subject
interval()
  .pipe(take<number>(3))
  .subscribe((val) => subject.next(val));

subject.subscribe((val) => console.log("subscribed before", val));
subject.pipe(filter((val) => val === 2)).subscribe(() => subject.next(3));
subject.subscribe((val) => console.log("subscribed after", val));
// We expect 0, 1, 2, 3 to be logged in both subscribers

Environment

Runtime: Repro'd with Chrome 92, Safari 14.1.1
RxJS version: Repro'd with 6.6.0, 7.3.0

Additional context/Screenshots
The above code logs the following to the console
subscribed before 0
subscribed after 0
subscribed before 1
subscribed after 1
subscribed before 2
subscribed before 3
subscribed after 3
subscribed after 2

What you've described is the expected behaviour when reentrant calls to a source are made from within observers subscribed to that source. If you want different behaviour, use observeOn to observe the source's notifications using a scheduler.


Tests not run when pushing to main

Seems like build.yaml is not run when pushing into GitHub

Test runs without problem as defined in https://github.com/raeperd/kickstart.go/blob/main/.github/workflows/build.yaml


More description in the content

Added relevant information in the content to make things more clear.
Problem: https://github.com/MicrosoftDocs/windows-itpro-docs/issues/5978

@JohanFreelancer9 - kindly do the copy editor review for this PR. Thanks.

@mypil - Ready to go live

#sign-off


stage name change to configuration name in some places

Issue #, if available:
Related to
https://github.com/aws/aws-sam-cli/pull/3425
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

We are still using Stage in SAM CLI code, how do we manage the releases of them? I guess we should release them at the same time.


Enable more eslint rules

Enables the following eslint rules by default and removes instances violating them from the codebase:

2 space indentation
Consistent semicolon usage
No using undeclared variables
No unused variables

/cc @jlord @zcbenz :eyes: pretty minor stuff here, just some rule cleanup and formatting.


stack lights

could please provide a link to where we can purchase the lights in the picture
thank you

Hi @AlexOberfranc ,
We purchased our stack-lights from a Chinese supplier. It can also work with Allen Bradley products.
Feel free to contact us by email<EMAIL_ADDRESS>


Feature/device resources

:broken_heart: Build Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS

Expand to view the summary

Build stats

Build Cause: Pull request #16 opened

Start Time: 2021-03-02T17:55:20.686+0000

Duration: 1 min 50 sec

Commit: 4cb1023d819e6327927bf5f1169672238caa73df

Trends :test_tube:

Steps errors
Expand to view the steps failures

Shell Script

Took 0 min 4 sec . View more details on here
Description: xcodebuild -scheme iOSAgent

Log output
Expand to view the last 100 lines of log output

[2021-03-02T17:55:39.696Z] Merge succeeded, producing ba3051d3512e79ded6d88046883efdc5c5aad7f5
[2021-03-02T17:55:39.696Z] Checking out Revision ba3051d3512e79ded6d88046883efdc5c5aad7f5 (PR-16)
[2021-03-02T17:55:39.246Z]  > git config core.sparsecheckout # timeout=10
[2021-03-02T17:55:39.258Z]  > git checkout -f 4cb1023d819e6327927bf5f1169672238caa73df # timeout=15
[2021-03-02T17:55:39.450Z]  > git remote # timeout=10
[2021-03-02T17:55:39.463Z]  > git config --get remote.origin.url # timeout=10
[2021-03-02T17:55:39.475Z] using GIT_SSH to set credentials GitHub user @elasticmachine SSH key
[2021-03-02T17:55:39.479Z]  > git merge 8c2389e5b5d31e021e4103d1ab17873e951a0ef4 # timeout=10
[2021-03-02T17:55:39.561Z]  > git rev-parse HEAD^{commit} # timeout=10
[2021-03-02T17:55:39.632Z]  > git config core.sparsecheckout # timeout=10
[2021-03-02T17:55:39.645Z]  > git checkout -f ba3051d3512e79ded6d88046883efdc5c5aad7f5 # timeout=15
[2021-03-02T17:55:40.545Z] Commit message: "Merge commit '8c2389e5b5d31e021e4103d1ab17873e951a0ef4' into HEAD"
[2021-03-02T17:55:40.545Z] First time build. Skipping changelog.
[2021-03-02T17:55:40.768Z]  > git --version # timeout=10
[2021-03-02T17:55:40.780Z]  > git --version # 'git version 2.24.3 (Apple Git-128)'
[2021-03-02T17:55:40.791Z] fatal: bad object<PHONE_NUMBER>22d814af1d42740fd53a737f925a59
[2021-03-02T17:55:41.545Z] Masking supported pattern matches of $NOTIFY_TO
[2021-03-02T17:55:41.611Z] Timeout set to expire in 1 hr 0 min
[2021-03-02T17:55:41.636Z] The timestamps step is unnecessary when timestamps are enabled for all Pipeline builds.
[2021-03-02T17:55:41.892Z] [INFO] Number of builds to be searched 10
[2021-03-02T17:55:42.062Z] [INFO] 'shallow' is forced to be disabled when running on PullRequests
[2021-03-02T17:55:42.085Z] Running in /var/lib/jenkins/workspace/gent-ios_apm-agent-ios-mbp_PR-16/src/github.com/elastic/apm-agent-ios
[2021-03-02T17:55:42.121Z] [INFO] gitCheckout: Checkout SCM PR-16 with default customisation from the Item.
[2021-03-02T17:55:42.152Z] [INFO] Override default checkout
[2021-03-02T17:55:42.213Z] Sleeping for 10 sec
[2021-03-02T17:55:52.301Z] The recommended git tool is: NONE
[2021-03-02T17:55:52.531Z] using credential f6c7695a-671e-4f4f-a331-acdce44ff9ba
[2021-03-02T17:55:52.548Z] Wiping out workspace first.
[2021-03-02T17:55:52.719Z] Cloning the remote Git repository
[2021-03-02T17:55:52.719Z] Using shallow clone with depth 3
[2021-03-02T17:55:52.719Z] Avoid fetching tags
[2021-03-02T17:55:52.712Z] Cloning repository git@github.com:elastic/apm-agent-ios.git
[2021-03-02T17:55:52.713Z]  > git init /var/lib/jenkins/workspace/gent-ios_apm-agent-ios-mbp_PR-16/src/github.com/elastic/apm-agent-ios # timeout=10
[2021-03-02T17:55:52.730Z] Fetching upstream changes from git@github.com:elastic/apm-agent-ios.git
[2021-03-02T17:55:52.730Z]  > git --version # timeout=10
[2021-03-02T17:55:52.741Z]  > git --version # 'git version 2.24.3 (Apple Git-128)'
[2021-03-02T17:55:52.741Z] using GIT_SSH to set credentials GitHub user @elasticmachine SSH key
[2021-03-02T17:55:52.746Z]  > git fetch --no-tags --force --progress -- git@github.com:elastic/apm-agent-ios.git +refs/heads/*:refs/remotes/origin/* # timeout=15
[2021-03-02T17:55:54.180Z] Using shallow fetch with depth 3
[2021-03-02T17:55:54.180Z] Pruning obsolete local branches
[2021-03-02T17:55:53.964Z]  > git config remote.origin.url git@github.com:elastic/apm-agent-ios.git # timeout=10
[2021-03-02T17:55:53.976Z]  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
[2021-03-02T17:55:54.045Z]  > git config remote.origin.url git@github.com:elastic/apm-agent-ios.git # timeout=10
[2021-03-02T17:55:54.116Z] Fetching upstream changes from git@github.com:elastic/apm-agent-ios.git
[2021-03-02T17:55:54.116Z] using GIT_SSH to set credentials GitHub user @elasticmachine SSH key
[2021-03-02T17:55:54.121Z]  > git fetch --no-tags --force --progress --prune -- git@github.com:elastic/apm-agent-ios.git +refs/pull/16/head:refs/remotes/origin/PR-16 +refs/heads/main:refs/remotes/origin/main # timeout=15
[2021-03-02T17:55:55.372Z] Merging remotes/origin/main commit 8c2389e5b5d31e021e4103d1ab17873e951a0ef4 into PR head commit 4cb1023d819e6327927bf5f1169672238caa73df
[2021-03-02T17:55:55.308Z]  > git config core.sparsecheckout # timeout=10
[2021-03-02T17:55:55.320Z]  > git checkout -f 4cb1023d819e6327927bf5f1169672238caa73df # timeout=15
[2021-03-02T17:55:55.758Z] Merge succeeded, producing 2873c9e98bf64f1cfec7943af5c8ed6b097c0bce
[2021-03-02T17:55:55.758Z] Checking out Revision 2873c9e98bf64f1cfec7943af5c8ed6b097c0bce (PR-16)
[2021-03-02T17:55:55.905Z] Commit message: "Merge commit '8c2389e5b5d31e021e4103d1ab17873e951a0ef4' into HEAD"
[2021-03-02T17:55:55.905Z] First time build. Skipping changelog.
[2021-03-02T17:55:56.130Z]  > git --version # timeout=10
[2021-03-02T17:55:56.142Z]  > git --version # 'git version 2.24.3 (Apple Git-128)'
[2021-03-02T17:55:56.154Z] fatal: bad object<PHONE_NUMBER>22d814af1d42740fd53a737f925a59
[2021-03-02T17:55:55.513Z]  > git remote # timeout=10
[2021-03-02T17:55:55.524Z]  > git config --get remote.origin.url # timeout=10
[2021-03-02T17:55:55.536Z] using GIT_SSH to set credentials GitHub user @elasticmachine SSH key
[2021-03-02T17:55:55.541Z]  > git merge 8c2389e5b5d31e021e4103d1ab17873e951a0ef4 # timeout=10
[2021-03-02T17:55:55.623Z]  > git rev-parse HEAD^{commit} # timeout=10
[2021-03-02T17:55:55.694Z]  > git config core.sparsecheckout # timeout=10
[2021-03-02T17:55:55.706Z]  > git checkout -f 2873c9e98bf64f1cfec7943af5c8ed6b097c0bce # timeout=15
[2021-03-02T17:55:56.982Z] Masking supported pattern matches of $GIT_USERNAME or $GIT_PASSWORD
[2021-03-02T17:55:57.906Z] + git fetch<EMAIL_ADDRESS>'+refs/pull/*/head:refs/remotes/origin/pr/*'
[2021-03-02T17:55:58.639Z] Running in /var/lib/jenkins/workspace/gent-ios_apm-agent-ios-mbp_PR-16/src/github.com/elastic/apm-agent-ios/.git
[2021-03-02T17:55:58.877Z] Archiving artifacts
[2021-03-02T17:55:59.967Z] + git rev-parse HEAD
[2021-03-02T17:56:01.009Z] + git rev-parse HEAD
[2021-03-02T17:56:02.030Z] + git rev-parse origin/pr/16
[2021-03-02T17:56:02.297Z] [INFO] githubEnv: Found Git Build Cause: pr
[2021-03-02T17:56:02.589Z] Masking supported pattern matches of $GITHUB_TOKEN
[2021-03-02T17:56:03.376Z] [WARN] githubApiCall: The REST API call https://api.github.com/repos/elastic/apm-agent-ios/pulls/16/reviews return 0 elements
[2021-03-02T17:56:03.430Z] [INFO] githubPrCheckApproved: Title: Feature/device resources - User: bryce-b - Author Association: MEMBER
[2021-03-02T17:56:04.504Z] Stashed 114 file(s)
[2021-03-02T17:56:04.933Z] Running in /var/lib/jenkins/workspace/gent-ios_apm-agent-ios-mbp_PR-16/src/github.com/elastic/apm-agent-ios
[2021-03-02T17:56:05.736Z] + xcodebuild -scheme iOSAgent
[2021-03-02T17:56:06.211Z] Command line invocation:
[2021-03-02T17:56:06.211Z]     /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -scheme iOSAgent
[2021-03-02T17:56:06.211Z]
[2021-03-02T17:56:06.687Z] Resolve Package Graph
[2021-03-02T17:56:07.691Z]
[2021-03-02T17:56:07.691Z] Fetching git@github.com:open-telemetry/opentelemetry-swift.git
[2021-03-02T17:56:08.696Z]
[2021-03-02T17:56:08.696Z]
[2021-03-02T17:56:08.696Z] Resolved source packages:
[2021-03-02T17:56:08.696Z]   apm-agent-ios: /var/lib/jenkins/workspace/gent-ios_apm-agent-ios-mbp_PR-16/src/github.com/elastic/apm-agent-ios
[2021-03-02T17:56:08.696Z]
[2021-03-02T17:56:08.696Z] xcodebuild: error: Could not resolve package dependencies:
[2021-03-02T17:56:08.696Z]   The server SSH fingerprint failed to verify.
[2021-03-02T17:56:08.696Z]
[2021-03-02T17:56:09.331Z] Running on Jenkins in /var/lib/jenkins/workspace/gent-ios_apm-agent-ios-mbp_PR-16
[2021-03-02T17:56:09.449Z] [INFO] getVaultSecret: Getting secrets
[2021-03-02T17:56:09.666Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-03-02T17:56:10.548Z] + chmod 755 generate-build-data.sh
[2021-03-02T17:56:10.548Z] + ./generate-build-data.sh https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-ios/apm-agent-ios-mbp/PR-16/ https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-ios/apm-agent-ios-mbp/PR-16/runs/1 FAILURE 49587
[2021-03-02T17:56:10.798Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-ios/apm-agent-ios-mbp/PR-16/runs/1/steps/?limit=10000 -o steps-info.json
[2021-03-02T17:56:11.349Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-ios/apm-agent-ios-mbp/PR-16/runs/1/tests/?status=FAILED -o tests-errors.json
[2021-03-02T17:56:11.349Z] Retry 1/3 exited 22, retrying in 1 seconds...
[2021-03-02T17:56:12.260Z] Retry 2/3 exited 22, retrying in 2 seconds...


MCEdit doesn't work with MCPE 0.9.0

MCPE 0.9.0 worlds have a new format (LevelDB) and doesn't work.

Not yet he is still developing it. MCEdit-Unified has higher probability of getting this feature


Add tests to package

Added __init__.py files to each test directory
Modified setup.py to include tests in package

Fixes #1223. CC @stefanv.

Thanks!  This is helpful for the Debian package.


Force dark mode

Hi there, is there a way to always force dark mode?
Allow switching but if the user reload => dark mode

Sure, you can call switchToDarkMode as soon as your app loads.
For example, call it in the _app.jsx's useEffect with empty array