Add pwsh PowerShell interpreter

PowerShell is using #!/usr/bin/env pwsh shebang on Unix these days and pwsh is "the thing" that runs powershell :)
I assume after this change, the following would show syntax highlighting:
```pwsh
Get-ChildItem .
```
as
Get-ChildItem .

Description

Checklist:

[ ] I am associating a language with a new file extension.

[ ] The new extension is used in hundreds of repositories on GitHub.com

Search results for each extension:

https://github.com/search?utf8=✓&type=Code&ref=searchresults&q=extension%3AFOOBAR+KEYWORDS+NOT+nothack

[ ] I have included a real-world usage sample for all extensions added in this PR:

Sample source(s):

[URL to each sample source, if applicable]

Sample license(s):

[ ] I have included a change to the heuristics to distinguish my language from others using the same extension.

[ ] I am adding a new language.

[ ] The extension of the new language is used in hundreds of repositories on GitHub.com.

Search results for each extension:

https://github.com/search?utf8=✓&type=Code&ref=searchresults&q=extension%3AFOOBAR+KEYWORDS+NOT+nothack

[ ] I have included a real-world usage sample for all extensions added in this PR:

Sample source(s):

[URL to each sample source, if applicable]

Sample license(s):

[ ] I have included a syntax highlighting grammar.
[ ] I have included a change to the heuristics to distinguish my language from others using the same extension.

[ ] I am fixing a misclassified language

[ ] I have included a new sample for the misclassified language:

Sample source(s):

[URL to each sample source, if applicable]

Sample license(s):

[ ] I have included a change to the heuristics to distinguish my language from others using the same extension.

[ ] I am changing the source of a syntax highlighting grammar

Old: https://github-lightshow.herokuapp.com/
New: https://github-lightshow.herokuapp.com/

[ ] I am adding new or changing current functionality

[ ] I have added or updated the tests for the new or changed functionality.

Thanks for the contribution!
Would you have an example file with such a shebang we could use (i.e., under permissive license)?

I assume after this change, the following would show syntax highlighting:

Yes it will.

@pchaigno, thanks! i have found https://github.com/PowerShell/PowerShellStandard/blob/3436bfc162d6804dd11d1d76c4faff486b4b405d/build.ps1.
This repo is MIT Licensed https://github.com/PowerShell/PowerShellStandard/blob/master/LICENSE.txt

That'll do. Could you add it under samples/PowerShell/?

@pchaigno, added. I renamed the file to shabang.ps1, to clarify it's purpose.

@lildude, can this be selected for the next release?
@SteveL-MSFT, @TravisEz13, FYI

@kasper3 very cool!  Thanks for this!

@lildude, can this be selected for the next release?

Yup, once all the necessary reviews are in - I don't review until PRs have been reviewed by at least one of the other primary contributors. I plan to make a new release later this week so it'll hopefully be reviewed before then.

Installed and confirmed a working pwsh example on macOS with Homebrew's cask:
#!/usr/bin/env pwsh
Write-Output "Hello, world."

Couldn't find a package for PowerShell on Ubuntu, however.

Thanks, for Ubuntu, we need to add repo and key. The instructions are given here for each version of Ubuntu: https://github.com/powershell/powershell.

@kasper3 Sorry, I just noticed pwsh was listed under the Shell entry as an interpreter too.
Unless there's a completely unrelated interpreter called pwsh for POSIX shell-scripts, it should be removed.

@Alhadis, thanks, we can remove it for sure. However, PowerShell grammar is based on POSIX 1003.2 (aka POSIX.2) based on https://books.google.com/books?id=MYZQAAAAMAAJ. We can invoke sh,ash,csh,bash,dash etc. scripts from pwsh on Unix. We can conversely invoke pwsh from sh,ash,csh,bash,dash etc. on Unix. Is there any substantial missing feature that makes in ineligible to get enlisted under Shells section?

Is there any substantial missing feature that makes in ineligible to get enlisted under Shells section?

That would be usage, which, as far as I can see^Wsearch, is not there yet: "env pwsh" extension:sh.

No sensible shell-script author would ever write a POSIX shell-script and specify an interpreter using anything other than sh,  bash, or any of the usual "traditional" interpreters.

@Alhadis, done. In our build automation, we have started to use powershell DSC. Though our file extensions are .ps1. Technically, we can have an .sh file with pwsh shebang. But I agree, statically on GitHub, pwsh shebang is not as viral to warrant an addition under Shell: section.

However, PowerShell grammar is based on POSIX 1003.2

Uh, no. It isn't POSIX-compatible whatsoever:
a=2
if [ $a -eq 3 ]; then
	printf '%s\n' Foo
elif [ $a -ne 3 ]; then
	printf '%s\n' Bar
fi

pwsh output:
At line:2 char:3
+ if [ $a -eq 3 ]; then
+   ~
Missing '(' after 'if' in if statement.
At line:2 char:5
+ if [ $a -eq 3 ]; then
+     ~
Missing type name after '['.
+ CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingOpenParenthesisInIfStatement

Any POSIX-compliant shell should output Bar. 😉
There's also a side-by-side comparison here which clearly illustrates the differences in syntax between the various command-line interpreters.

I read it https://en.wikipedia.org/wiki/PowerShell#Design

PowerShell's developers based the core grammar of the tool on that of POSIX 1003.2.[21]
[21] "Payette, Bruce (2007). Windows PowerShell in Action. Manning Pubs Co Series. Manning. p. 27. ISBN<PHONE_NUMBER>900. Retrieved 2016-07-22. The core PowerShell language is based on the POSIX 1003.2 grammar for the Korn shell."

It says "based on", which is loosely subjective and denounced quite clearly in the form of a syntax error. I've no idea what they could have been referring to...

It says "based on"

Yup, that's what i said However, PowerShell grammar is based on POSIX 1003.2
Perhaps POSIX IEEE Std 1003.2 does not mandate the syntax to be if [ $a -eq 2 ] then; ... ; fi vs. if ($a -eq 2) { ... }?

The syntax ($a -eq 2) describes a command to run inside a subshell, not an expression. There's actually no requirement for any sort of punctuation to separate if from a condition. E.g., this is legal syntax:
if this; then that; fi

In any case, it's quite clear PowerShell is by no means a "normal" interpreter of POSIX shell-scripts.

I meant maybe IEEE Std 1003.2 does not cover syntax at all and only utilities. Otherwise that would be a lie that PowerShell conforms with the said standard, right?

Utilities have nothing to do with shells. There's GNU on Windows, which makes the standard Unix toolchain available to cmd.exe or even COMMAND.COM. The fact they're available in PowerShell – either as builtins or bundled utilities – really doesn't have much relevance to this discussion.

@lildude, was this change picked in the release?
```pwsh
Get-ChildItem test
```
We don't get the expected syntax highlighting:
Get-ChildItem test

as opposed to ```poweshell:
Get-ChildItem test

Yup, it was. However looking back at this PR, pwsh was only added as an interpreter so files that start with a shebang of #!/usr/bin/env pwsh will be highlighted as PowerShell.
Inline code blocks aren't affected by this so PowerShell still needs to be used.  For pwsh to be used in code blocks, an alias needs to be created. Looks like we addressed the first point in your OP but completely missed your assumption.

@lildude Perhaps interpreters should be included in aliases for a language though?

A quick test reveled that is the case: https://github.com/kasper3/linguist/blob/master/test1 (extension less file with pwsh shebang get picked up for syntax highlighting).
I agree with @pchaigno's idea of implicitly including interpreters as aliases.

And feel free to open a PR adding pwsh as an alias too.

Thanks, I have opened a pull request https://github.com/github/linguist/pull/4117 :)


Add CSI and provisioner examples

This PR adds additional examples to demonstrate usage of Longhorn:

csi/example_pv.yaml demonstrates how to use a PersistentVolume for CSI.
example_pv.yaml and example.yaml have been moved under the flexvolume folder to indicate that they demonstrate FlexVolume usage.
example_storageclass.yaml demonstrates how to use a StorageClass to provision volumes. Usage is the same under CSI and FlexVolume.

Note: pvc.yaml is very similar to example_storageclass.yaml and may need to be removed before merging.
This PR resolves #109.

The examples look good, but please make PR to longhorn-manager repo. We haven't released the feature to longhorn repo yet.
During the release, we will copy the examples in the longhorn-manager repo to the longhorn repo. So everything will be in sync.


Another batch of ModelBinding integration tests

Includes tests for [Required] on properties with various levels of nesting
inside complex model binders.

/cc @harshgMSFT

:shipit:


Fix bug using internal javascript files to allow SSL

I noticed that on newer versions of Omeka, this plugin was failing when my site loaded using https because of dynamic loaded of external scripts that are hard coded to use http. I noticed that the plugin supports using local javascript files, which fixes this problem neatly, but that functionality was not working with my Omeka 2.4 installation.
It looks like this is caused by a syntax change in the Omeka config.ini file that happened a few years back: https://github.com/omeka/Omeka/issues/305
I made a quick change that fixes the issue.
I also removed the "http" from one dynamically loaded script so that it could load using the protocol of the parent page if need be, but this alone will not get the timeline to work on a page loaded with SSL.

Well, inexplicably and inexcusably, it's only taken us three years and a few months to actually review and merge this pull request. Thanks for contributing it @NedHenry


Created CameraDescription refactor CameraGeometry

This PR follows on suggestions in #1227, to refactor CameraGeometry in order to address the following problems:

CameraGeometry contains items unrelated to the geometry (sampling rate and reference pulse shape)
The reference_pulse_shape is not compatible with the CameraGeometry table as it is not shape (n_pixels)

The solution to this was to create another class similar to CameraGeometry, which will contain the readout-related properties of the camera, and defines its own table methods such that the reference pulse shape can be written to disk. I called this class CameraReadout.
To fit this new class into the instrument hierarchy I created the CameraDescription class. The purpose of this class is to provide access to the underlying CameraGeometry and CameraReadout classes. They are now accessible from the subarray as follows:
subarray.tel[tel_id].camera.geometry
subarray.tel[tel_id].camera.readout
All previous usages of CameraGeometry have been refactored for these changes.

Currently the tests will fail as there are no "camreadout" files in ctapipe-extra to load when from_name is called. How should we proceed with addressing this?

Wow, this nb tool looks great!

Currently the tests will fail as there are no "camreadout" files in ctapipe-extra to load when from_name is called. How should we proceed with addressing this?

By making it optional first with a warning?
The ones for the simtel cameras should be easy enough to create, I'll make one for FACT but for the other's it might take a while before we have them.

To get rid of the imported but unused warnings in the __init__.py files, add the  imported stuff to __all__

Docs added, but something weird is going on with travis

It was done the day before yesterday for a few hours, maybe that's why the status update got lost

I triggered a build, maybe it works now

Can we get this merged now?

@MaxNoe refactoring done

The build was successful but the result was apparently not reported: https://travis-ci.org/github/cta-observatory/ctapipe/builds/668810372?utm_medium=notification&utm_source=github_status
Let's just merge.

may have to wait for travis to catch up. Perhaps force a re-run


Target version 7?

It already came up before here.
Cannot set the deployment target to 7?
I would also suggest to indicate the minimum supported version in the README file.

Ok, I'll make it 7 in the next release

Should be live on npm v0.20.0

Thanks @marcshilling.


New Ruletype: Variable Metadata with Define metadata and library

This PR creates a new Ruletype "Variable Metadata Check against Define XML and Library Metadata" and updates associated documents as well as dataset builder test coverage.

note - cdisc_rules_engine/dataset_builders/variables_metadata_with_define_and_library_dataset_builder.py is a placeholder and will be altered/addressed in ticket #837


Update Cypress tests. Added the use of the "Done" button.

Motivation and context
Updating tests for drawing points, polygons, and polylines. Added the use of the "Done" button when drawing shapes.
PR #3417
How has this been tested?

Checklist

[x] I submit my changes into the develop branch
[ ] I have added description of my changes into CHANGELOG file
[ ] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[ ] I have linked related issues (read github docs)
[ ] I have increased versions of npm packages if it is necessary (cvat-canvas,
cvat-core, cvat-data and cvat-ui)

License

[x] I submit my code changes under the same MIT License that covers the project.
Feel free to contact the maintainers if that's a concern.
[ ] I have updated the license header for each file (see an example below)

# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

@dvkruchinin Please, merge develop branch to fix remark issues.


dlib is already installed, but the extension still doesn’t show up in Forge.

Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import dlib
print(dlib.version)
19.24.1

Hi Haoming, I checked and dlib is already installed, but the extension still doesn’t show up in Forge. Does it support Forge?

Yes, it works on Forge.
Did you install the dlib package inside the virtual environment venv used by your WebUI?

If it still doesn't work, try installing dlib-bin instead~


ARROW-1488: [C++] Implement ArrayBuilder::Finish in terms of FinishInternal based on ArrayData

I don't have strong feelings about the function names here, but this was backwards compatible and will prevent extra box-then-unbox steps in analytics code that utilizes builders for accumulating outputs

+1


FreeRTOS+TCP /multi /IPv6 : FreeRTOS_Sockets.c(v2)

The purpose of this PR is to get the sources reviewed. Please do not used them for any project.
FreeRTOS_Sockets.c is now compatible with multiple interfaces and IPv6.
This PR replaces my earlier PR #196
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Since FreeRTOS-Plus-TCP has become a separate module, the development of FreeRTOS+TCP with multiple interfaces and IPv6, will be moved to that repo.
Closing this PR now.


adept and std::vector and Eigen

Hi,
I would like to test adept for auto differentiation in an optimization process (using IPOPT).
I have a template class that use double or adouble.
In the class, I have some std::vector of Eigen::Matrix defined as :
std::vector < Eigen::Matrix < T, 6, 1 >, Eigen::aligned_allocator < Eigen::Matrix < T, 6, 1 > > > a;
I have a segmentation fault when I try to resize the vector.
If I resize this kind of vector in a simple program (out of any class), I do not have any trouble
Do you have any clue about it ?
Thank you
S. Lengagne

I think the purpose of adept 2.0 is to use the native matrix functionalities, so the user doesn't need to worry about the compatibility issue while using Eigen for linear algebra calculations. So my suggestion is to try the native implementation of matrix manipulation.

Thank you for your answer
Unfortunately, I need to compute derivative of a complex and specific function that is described using std::vectors and eigen matrices.

If i remember well Adept 2.0 does not support (hope currently) adjoint inversion or adjoint of the linear solver.
so the "matrix" that you are talking about is simply a container and not a mathematical object.

Since the query is not about Adept, I'm closing it.


change PomBases slim term

change pombase slim
ubiquinone biosynthetic process (GO:0006744)
to ubiquinone metabolic process
so that pathway can include coq10
(remember to update local list/config)

Also remove "protein folding" from the slim because it is now fully redundant with protein maturation (is now a child)
2023-07-06 | Added | RELATION | part of GO:0051604 (protein maturation)

I changed my mind. Instead of removing "protein folding" I'll remove "protein maturation" and add "protein maturation by [4Fe-4S] cluster transfer"
There are then fewer than 15 proteins that are not covered by other slim terms and some of these need reviewing.


Support os.subsystem

In order for code like if self.settings.os.subsystem == "msys2" to work the subsystem needs to be set in the profile.  Currently Conan Package Tools does not add subsystem to profiles.  This means that recipes need to continue to rely on if self.settings.os == "Windows" and self.settings.compiler == "gcc".

The goal of the subsetting os.subsystem is not to let Conan/recipes know if you have to build it with a subsystem. This subsetting is used to model if you are building native cygwin or native msys2 (depending on its own runtime dll).
A recipe itself has to know if self.settings.os == "Windows" and self.settings.compiler == "gcc" if they need a subsystem to be compiled or not.
Clarified that, you can customize the settings of the builds that will be run in conan_package_tools, that is only translating the "build" objects to a profile, but I think you don't want to to this:
from conan.packager import ConanMultiPackager

if __name__ == "__main__":
    builder = ConanMultiPackager(username="myuser")
    builder.add_common_builds()
    filtered_builds = []
    for settings, options, env_vars, build_requires, reference in builder.items:
        if settings["os"] == "Windows" and settings["compiler"] == "gcc":
             settings["os.subsystem"] = "msys2"
             filtered_builds.append([settings, options, env_vars, build_requires])
    builder.builds = filtered_builds
    builder.run()

I recently reviewd a Bincrafters recipe using subsystems, you can take a look here: https://github.com/bincrafters/conan-giflib/blob/stable/5.1.3/conanfile.py

Ok - thanks.  I definitely had the wrong idea.

The linked recipe did not use os.subsystem.  I'm interested to know which use cases where that be used.

Only to model the native subsystems apps. Definitely not a common use case.


fix: fiveg_rfsim lib

Description
This PR is fixing get_provider_rfsim_information method which is failing if SD is not available.

Get SD optionally
Log error messages
Improve fiveg_rfsim interface requirer tests

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that validate the behaviour of the software
[ ] I validated that new and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
[ ] I have bumped the version of the library

https://github.com/canonical/oai-ran-du-k8s-operator/pull/68/files# should be merged first to fix the integration tests.


Require Underline Color same as text Color

Problem:
Underline color always be Black regardless of the Text color.
Requirements:

Underline color should be same as text color by default
There should be a decorationColor property in case we want different underline color

Example EDL
Text:
  text: View Terms & Conditions
  styles:
    textStyle:
      fontSize: 16
      fontWeight: w600
      # color: red
      # decoration: underline
      # decorationColor: green
      # decorationThickness: 2


IAM module uses wrong naming conventions.

Error: "name" must match [\w+=,.@-]

  on ..\..\modules\global\iam\main.tf line 21, in resource "aws_iam_role" "lambda-role":
  21: resource "aws_iam_role" "lambda-role" {

This is due to you providing a variable input that does not adhere to the rules stipulated by the IAM naming convention.


[MRG] small ICA bug fixes for #5967 - 2nd try

Continues/replaces #5968

Did you also check why the unit tests were falling?

Very good, you only have a pep failure:
https://travis-ci.org/mne-tools/mne-python/jobs/525415877

mne/preprocessing/ica.py:2184:21: E126 continuation line over-indented for hanging indent

Fix that and set the title from FIX to MRG please.

/home/circleci/project/doc/whats_new.rst:210: WARNING: py:attr reference target not found: mne.preprocessing.ICA.exclude
/home/circleci/project/doc/whats_new.rst:212: WARNING: py:func reference target not found: mne.preprocessing.ICA.run_ica

hm... and why? How to fix this? Is it important? run_ica is not part of the ICA class but in the same file. So how to link to this? Why it does not find the attribute I cannot see.

hm... and why? How to fix this?

You need to link to things where they are documented (implicitly or explicitly) in python_reference.rst, not where they end up in code. So the first one is mne.preprocessing.run_ica. The second one we actually can't link to without making it a @property rather than just variable, so for now instead of linking just use double backticks on it.

Is it important?

The way it is now, we will have broken links in our whats_new.html on the website.

Thanks for the explanation. The first one was obvious, sorry ...

@mmagnuski if you use these functions can you take a look?

OK, I implemented your suggestion, thanks @mmagnuski. I also made the docstring a little more explicit.
To make the detect_artifacts method really useful, I think we need to (also) add the identified components to the .labels_ attribute as it is done in find_bads_eog/ecg rather than just dumping everything into .exclude, so the reason for labelling is logged. (There is also already a nice inspection function which makes use of .labels_.) Also, it would probably make sense if _detect_artifacts would call those functions internally for eog and ecg artifacts, e.g. to make use of the default filtering etc. --> Ideas for a next PR :)

OK, apparently, SyntaxWarning is the wrong class. What should it be instead? RuntimeWarning? I am not deprecating anything.

@mmagnuski or @larsoner merge if you're happy. Travis error is unrelated

I'll let you take a last look and merge if you're happy @mmagnuski

I'm happy, thanks @jeythekey!

@jeythekey we don't have your name to update the mailing for the release. Can you provide us your full name and desired email to ament that? thx.

@GuillaumeFavelier : Johannes Kasper<EMAIL_ADDRESS>


Added focusPreventScroll to HtmlElementRe

Added focusPreventScroll to HtmlElementRe

Ah, that's quite a few commits you got there :grinning: That's OK though, since the sum of all of them looks good I can just squash them when I merge so it'll end up as just one commit.
But for future reference, git pull will do a fetch followed by a merge, which will always just add commits. When you're out of sync with upstream, you will have to make destructive changes. If all you want is to make your local fork an exact mirror of upstream, you can do one of two things:
Either:
Delete both your fork on github and your local clone of that fork. Then go back here, push the fork button again to make a fresh fork on your account and clone that locally as usual. This will delete anything you've done in other branches too though.
Or, to update just the master branch:
If you haven't already, run:
git checkout master
git remote add upstream https://github.com/reasonml-community/bs-webapi-incubator

Then, to make sure your upstream reference is up to date:
git fetch upstream

This next step will overwrite everything you've done in the current branch with whatever is in the master branch of the upstream repository:
git reset --hard upstream/master

And then finally, to overwrite the branch on your github fork, you have to add --force to git push:
git push --force

Also, it's a good idea to make a separate branch for each PR. That way master won't get out of sync, it'll just be out of date, and you can simply do git fetch upstream && git merge upstream/master to add the latest commits to your master branch. No need to force push either, since you're not overwriting anything.
You'll get the hang of this soon enough, I'm sure. I struggled with exactly this for the first 10 or so PRs I made too. And it can add up to a lot more than this if you keep pulling and doing everything on master :laughing:
Anyway, thanks for the PR! :smile:


Update dependencies and tests workflow

Updated all the dependencies
Updated matrix strategy for workflow
Updated actions used
Added github-actions to dependabot

Ping @eozer Thanks!

Thanks. A new version to be released still.

The change is included in v1.3.0 and newer.

The change is included in v1.3.0 and newer.

Thank you! 💪


(not)equalTo null issues

Hi,
I found a couple of issues when using queries that have a equalTo/notEqualTo null constraint.
I created 4 test cases for each variant (commit 1):
should handle an equalTo null query for an object with a null field
should handle an equalTo null query for an object without a null field
should handle a notEqualTo null query for an object with a null field
should handle a notEqualTo null query for an object without a null field

I double-checked that this is the desired behavior using the hosted parse service.
3 of those cases where failing with parse-mockdb. In the second commit I managed to fix 2, leaving the third which seems to be a little deeper in your matching algorithm. I didn't wanna break something I don't fully understand so I did not provide a fix for this case. Maybe an issue should be opened for this case?

Hey David, thanks for putting this up. Hopefully I'll have some time to take a look this weekend.

I think we should do a separate commit for the last issue, or commit the test with xit

good idea, I changed the failing test to xit.


Poor documentation of multiple items in Returns docstring

Summary
I have a project of mine - wumpy - hosted on Read the Docs (which can be found here) built with MKDocs. I am now trying to introduce an API reference using mkdocstrings but Griffe is failing to collect the api.interactions file (note: different repository for the documentation).
Description
I am using Google-style docstrings in my code and somewhere within the wumpy.interactions subpackage Griffe fails to parse the docstring. Below is a subset of the traceback:
  File "C:\Users\%username%\Projects\wumpy-docs\venv\lib\site-packages\griffe\dataclasses.py", line 141, in parsed
    return self.parse()
  File "C:\Users\%username%\Projects\wumpy-docs\venv\lib\site-packages\griffe\dataclasses.py", line 154, in parse
    return parse(self, parser or self.parser, **(options or self.parser_options))
  File "C:\Users\%username%\Projects\wumpy-docs\venv\lib\site-packages\griffe\docstrings\parsers.py", line 51, in parse
    return parsers[parser](docstring, **options)  # type: ignore[operator]
  File "C:\Users\%username%\Projects\wumpy-docs\venv\lib\site-packages\griffe\docstrings\google.py", line 673, in parse
    section, offset = reader(docstring, offset + 1, **options)  # type: ignore[operator]
  File "C:\Users\%username%\Projects\wumpy-docs\venv\lib\site-packages\griffe\docstrings\google.py", line 369, in _read_returns_section
    annotation = annotation.tuple_item(index)
  File "C:\Users\%username%\Projects\wumpy-docs\venv\lib\site-packages\griffe\expressions.py", line 170, in tuple_item
    return self[2][2 * nth]
IndexError: list index out of range

I have uploaded the full traceback on a gist

Parsing of wumpy.rest also fails that but is a much bigger subpackage and wumpy.interactions is built first.
Unrelated failure
I am aware of a failure in the type annotations which causes the wumpy-bot documentation to fail on versions other than Python 3.10. See the build failure on Read the Docs and this discussion I opened about the annotation.
Installation
I am on a Windows 10 machine running Python 3.10.1 with griffe==0.19.1 and mkdocstrings==0.18.1.

I have been able to nail this down to _authenticate_request() and by looking at Griffe I can see that I was wrong: this is failing to parse the annotation and not the docstring necessarily.

Hello! Thanks for the report. I believe you just need to indent the continuation lines in your Returns section. Indeed, we chose to support documenting multiple items in Returns, Yields and Receives sections, therefore you need to indent continuation lines for Griffe to properly detect whether you're documenting a single item or multiple ones.

To fix this I need to indent the Returns section twice?

Yes, but only from the second line onward, something like this:
"""
Summary.

Blabla.

Returns:
    Description of what is returned, spanning
        multiple lines. The whole Markdown
        markup is supported, even...

        ...blank lines, as long as indentation
        is consistent.
"""

Thinking about it more, is there any way for me to configure this behaviour? I think I rather disable it and place the documentation for each item in the description (which is what I did so far, not knowing about this feature).
It's a cool feature, but I rather indent the Returns section normally than being able to document each item separately for my current project.

@valq7711 I think that deserves its own issue judging from the traceback.

I agree with @Bluenix2, it's another issue :slightly_smiling_face:

sorry guys, i just posted this here to let you know about the issue, not hoping for a fix in the foreseeable future. I would be glad to take part in your project if there were 25 hrs in this day ;)

That's fine. And I fixed your issue, it's released in 0.19.2 :laughing:

@pawamoy   it's incredible! thanks for your time and great project!!!

@Bluenix2 I've pushed some docs about Google-style docstrings: https://mkdocstrings.github.io/griffe/docstrings/

I've improved the docs for the Returns section in particular. There are new options allowing to configure the behavior of the parser. Docs will be published when I release the new version :slightly_smiling_face:


BlurView ignores blurAmount updates on re-render

The following minimal reproduction shows the problem:
import React, { useRef, useEffect, useState } from 'react';
import { Text, View, StyleSheet } from 'react-native';
import { BlurView } from 'rn-id-blurview';

const useInterval = (callback: () => void, delay: number | null) => {
    const savedCallback = useRef<() => void>();
    useEffect(() => {
        savedCallback.current = callback;
    }, [callback]);
    useEffect(() => {
        const tick = () => {
            savedCallback.current && savedCallback.current();
        }
        if (delay !== null) {
            let id = setInterval(tick, delay);
            return () => clearInterval(id);
        }
    }, [delay]);
}

const App = () => {
    const [blurAmount, setBlurAmount] = useState(20);
    useInterval(() => {
        const newBlur = blurAmount - 1;
        if (newBlur >= 0) {
            setBlurAmount(newBlur);
            console.info(`blurAmount: ${blurAmount}`)
        }
    }, 100);
    console.info(`rendering with blurAmount ${blurAmount}`);
    return (
        <View style={{ justifyContent: 'center', alignItems: 'center', flex: 1, }}>
            <Text style={{ fontSize: 40 }}>Hello World</Text>
            <BlurView
                style={StyleSheet.absoluteFill}
                blurAmount={blurAmount}
                blurType="light"
            />
        </View>
    );
}

export default App;

Here, we start with a blurAmount of 20, and slowly reduce it until it is 0.
However, the rendered view's blurAmount stays at its initial value of 20, even though it is re-rendered.
Expected behavior: the BlurView should respect the changes in blurAmount.

hey,
for your previous issue, you can use BlurAmount for IOS instead of blurRadius
and for this issue i will see what’s the issue there

@yolpsoftware Hey 👋
now you can animate the blurRadius on both android and ios.
On android, you can even deactivate blur by passing blurRadius to 0.
Would you test 1.2.2 and keep me updated please.


Shorten run-experiments name

The names used in the CI are too long and get cut off -- it's hard to see which run is failing without hovering over them:

@jgoeders Do you have a specific name change in mind?

How about we shorten the CI name run-experiments to run-test
And for the directory structure, lets rename experiments/tests/ to tests/ci/

There's already a directory called test/ Is that going to be confusing if there's another directory called tests/ at the same level?


Specifying ucx-proc in environments.

closes #163
cc @jakirkham

@jacobtomlinson @jarmak-nv - I think one of you has write access, could you please take a look and approve if it looks good?
@jakirkham - Thanks! You might want to get that for this repo.

I don't seem to have write access yet, but it looks good to me!

Ah, okay thanks. @ajschmidt8 can you approve?


Reasons for not working queryRule

For what technical reasons are these features not working with the latest typesense?
queryRuleCustomData
queryRuleContext

While Typesense server supports query rules (called overrides / curation in Typesense), we don't support returning custom data or context in overrides yet. So we would need to first add these features to Typesense server, before we can add support in the adapter.
Could you open separate issues for each in Typesense repo, along with your use-case for each of these? We can then prioritize based on demand.

I believe that if we do at least part of this element - and suggestions (out of the box), we can chase even algolia very quickly. I think that dynamic widgets were already a milestone. Because it's such a hot feature.

Hello @jasonbosco.
https://www.algolia.com/doc/api-reference/widgets/query-rules/react-hooks/
It is the same as dynamicWidget. It just tracks and returns results - based on what's active. I don't think it matters, in the context of typesense. It would be nice if you did that with the new update. For larger projects, this is a useful feature - including my project I wrote about.

Also works, but returns no results.

From what I can see there is no problem to implement this. Even if we download e.g. "banners" from an external collection - we use multisearch after all. Let's do that and typesense will be fully ready replacement instead of algolia.


How to implement scalability for a 3D model in an ARScene by incorporating a  button child node with 3D model dedicated to scalability.

You must activate the isScaleEditable property of the modelNode and with the button execute modelNode.setScale(1f) to increase the size.
ModelNode Class

I am looking for to change size of model in ARScene  real environment. i don't want to fix it before.


Fix letop binary printing

this was happening after the downgrade so it effectively only worked if
you were printing to the console?

I think this is fairly low-risk and can be reverted easily so I'm gonna go ahead and merge it.


feat: #27 Internal RaygunLogger

feat: #27 Internal RaygunLogger
Description :memo:

Purpose: Provides an internal logger to log to console and facilitate development
Approach:

Similar to Raygun4Net https://github.com/MindscapeHQ/raygun4net/tree/master/Mindscape.Raygun4Net.Core/Logging
Leverages the Singleton/Scope from Blazor to make the logger available to the package components.
Users can set the Raygun.LogLevel setting to define the maximum log level.
Setting it to "None" completely disables the logs.
The default value is "Warning".
Closes #27

Type of change

[x] New feature (non-breaking change which adds functionality)

Updates

Added Raygun.Blazor.Logger classes.
Added as dependency.
Created several debug and verbose logs to help development.

Screenshots :camera:
Example of logs on console:

Test plan :test_tube:

Tested with Sample app

Author to check :eyeglasses:

[x] Project and all contained modules builds successfully
[x] Self-/dev-tested
[x] Unit/UI/Automation/Integration tests provided where applicable
[x] Code is written to standards
[x] Appropriate documentation written (code comments, internal docs)

Reviewer to check :heavy_check_mark:

[ ] Project and all contained modules builds successfully
[ ] Change has been dev-/reviewer-tested, where possible
[ ] Unit/UI/Automation/Integration tests provided where applicable
[ ] Code is written to standards
[ ] Appropriate documentation written (code comments, internal docs)

I have some feedback for this feature, if you folks don't mind. I would highly recommend making a couple changes to clarify exactly what is going on here, so that the end user has control over whether these extra calls are taking place in the code.
The first thing I notice is that in the existing setup, the LogLevel setting is super confusing. Is that a LogLevel for my own app, or for RaygunBlazorClient issues? Does that mean when I log something at a lower level that the default in my own app, will it be ignored?
I think this implementation as-is will lead to significant developer confusion, and relying on documentation to explain what is happening is not enough.
The second thing I see is that there is no way to keep this internal logger out of the system entirely, resulting in extra allocations and calls that are going to affect performance in my app.
If I were a developer trying to optimize performance, I might be upset that all these extra logging commands are adding unnecessary instructions to my codepaths, and if I don't want this logging in there at all, I'm effed because there's nothing I can do about it.
This would make me consider ripping the RaygunBlazorClient out of my app. Not magical.
The point of using DI is to give the end user complete control over these situations. So I think there are ways you folks can leverage the DI more effectively to get a better result.
To solve the first problem, I would make the following changes:
public class InternalLoggerSettings
 {

    public RaygunLogLevel LogLevel = RaygunLogLevel.Error;

    public bool UseInProduction = false;

}

public class RaygunSettings
{
    ...

    public InternalLoggerSettings InternalLogger { get; set; }

}

And then change RaygunLogger to RaygunInternalLogger and remove the IRaygunLogger interface (as it feels too close to the .NET's standard ILogger interface, and no one else will likely be providing implementations for internal logging).
This setup would result in the following appSettings.json setup:
{
  "Raygun": {
    "ApiKey": "YOUR_API_KEY",
    "CatchUnhandledExceptions": "false",
    "InternalLogger": {
      "LogLevel": "Error",
      "UseInProduction": false
    }
  }
}

That is a lot more understandable and intuitive for the end user. Clear delineation on what the log level is, and the opportunity to use the same LogLevel approach (and enum) to prevent certain sets of messages from being sent to Raygun in RaygunBlazorClient. Clean, simple.
Now, how to implement this for the best end-developer experience:
The first step is going to be to make the injected RaygunInternalLogger instance nullable in constructors and change the calls to look like _raygunLogger?.Info() and so forth.
That way they properly respond to no logger being in the container, and if the developer doesn't want logging, the calls will short-circuit quickly.
Next, how to control the logger DI registration? Two options:

One would be NOT to inject the RaygunInternalLogger by default at all and instead provide sample code to the end user on how to register it themselves, wrapped it in an Environment check. At that point, the "UseInProduction" property on InternalLoggerSettings might not be necessary.
The other would be to add an addInternalLogger = false parameter on the DI extensions, to specify whether the RaygunInternalLogger gets added to DI without having to read DI configuration. You would then need to inject the Environment into the HostExtensions and not register the logger if the app is in Production.

This approach feels more magical, makes the end user code more efficient, and allows them to opt-into troubleshooting the Raygun client instead of having to opt-out. This also minimizes the possibility of accidentally leaking information into the Console, which could be used in coordination with a dictionary attack on an app's login to steal critical information.
Happy to discuss more if necessary. HTH!


How do you make a request from client to backend server when there's multiple backend servers?

So on my client I have the code
  pomelo.request('match_1v1.playerHandler.enterMatch', {},
                function (data) {
                     console.log('entered')
                })

But when it sends that to the server I'm getting an errors
"[2017-03-23 00:02:45.107] [ERROR] pomelo-rpc - [MailStation] [pomelo-rpc] unknown server: [object Object]
[2017-03-23 00:02:45.107] [ERROR] pomelo-rpc - [MailStation] [pomelo-rpc] fail to find remote server:[object Object]
And I know why, it's because I have a routing strategy set up since there's multiple match_1v1 servers

var match1v1Route = function(routeParam, msg, context, cb) {
    var match1v1Servers = app.getServersByType('match_1v1');
    console.log('the routePAram is', routeParam)
    if (! match1v1Servers || match1v1Servers.length === 0) {
        cb (new Error ('can not find 1v1 match servers.'));
        return;
    }
    cb (null, routeParam);
}

app.configure ('production|development', function() {
    app.route('match_1v1', match1v1Route);
})

This works when I'm making rpc calls from a server because I can put the server name in the rpc call as the routeParam, but when I make a call from the client the routeParam is coming up as
the routePAram is FrontendSession {
  domain: null,
  _events: {},
  _eventsCount: 0,
  _maxListeners: undefined,
  id: 1,
 just FrontendSession object stuff..................

The clients are already in a channel by the time I'm sending the request, so how do I make it so the request uses a routing strategy to go to the correct server?

When the connector forwards the request to the back-end server it uses the session as the routing param. Try setting some info in the session that you can later use in the routing function.
My advice is to try to keep the back-end servers stateless so it won't matter which instance will serve the request. This way you can scale easier your application by adding or removing back-end instances.

I don't think there's a way to structure the game so the match servers can be stateless.. there's too much information the match needs to run the logic for the game the players are in.
How can I set the session information from an rpc call?
because my logic goes connector rpc-> matchmaking rpc-> match
so by the time the matchmaking server puts a player into match, the only data it has is the user's uid, username, and connector server id. Is there a way to get and set a session with that data?

Maybe the answer is to notify the connector server with the match params and then update the session before making a request to the match server? I will probably try to implement it this way and give an update.

So that's the logic I went with. Just remember to use session.pushAll() when you update the settings to the session. :)

hello I'm new here in the pomelo framework and I saw that you got this error ...mailStation) server unknown. I'm starting my server and every time the client tries to connect this message there with it an addition at the end ...unknown server: undefined. Could you help me understand this problem?

I also wanted to know where this "mailStation" file is called in the base api code.


Populating data

Hello,
How can I show data that belongs from other class in bootstrap-table?
For example:
public class Person
{
public int PersonId { get; set; }
public string Name { get; set; }
public Family FamilyItem { get; set; }
}
public class Family
{
public int FamilyId { get; set; }
public string Name { get; set; }
}
Applying @Html.BootstrapTable will show me "[object Object]" for FamilyItem.
How can I flatten to "FamilyItem.Name" ?

You could try -

Hide the child object using an annotation
Add a new derived property (get) to your model.

public class Person
{
  public int PersonId { get; set; }
  public string Name { get; set; }

  [Display(AutoGenerateField = false)]
  public Family FamilyItem { get; set; }

  public string FamilyName {
    get {
      return FamilyItem.Name;
    }
  }
}


e2e,quarantine: Remove tests from quarantine that were effected by slower deletion issue

What this PR does
There was an issue in cri-o[1] that caused these tests to be very flaky.
This has been fixed in the latest releases of cri-o so we can reintroduce these tests to the presubmit test lanes.
[1] https://github.com/cri-o/cri-o/pull/7735

Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Special notes for your reviewer
/cc @dhiller @xpivarc
Requires https://github.com/kubevirt/kubevirt/pull/11465 to merge first.

Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

[ ] Design: A design document was considered and is present (link) or not required
[ ] PR: The PR description is expressive enough and will help future contributors
[ ] Code: Write code that humans can understand and Keep it simple
[ ] Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
[ ] Upgrade: Impact of this change on upgrade flows was considered and addressed if required
[ ] Testing: New code requires new unit tests. New features and bug fixes require at least on e2e test
[ ] Documentation: A user-guide update was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature / API change.
[ ] Community: Announcement to kubevirt-dev was considered

Release note

NONE

https://github.com/kubevirt/kubevirt/pull/11465 has merged -we can reintroduce these tests.


App telemetry flawed

Allow user to allow or block app telemetry from About dialog.
User Id is not retained between versions breaking continuity.

Versions ><IP_ADDRESS> fixes the second part of this issue. The id is retained.


Enable Gherkin Linting

What type of PR is this?

correction
enhancement/feature
tests

What this PR does / why we need it:
PR to enable Gherkin Linter as per Commonalities/PR#292.
Even it is ongoing PR, it is fine to incorporate into WG to have some preliminary linter rules
Which issue(s) this PR fixes:
Fixes #180
Special notes for reviewers:
Changes with regards to Commonalities/PR#292

Indentation (NOTE: reviewed test_definitions in other WGs and this makes sense)
"Background" set to "2".
"example" set to "6".

Disable "file-name" kebab-case checking as operationId is lowerCamelCase.

Specific for Carrier Billing: disable "validate" word in Feature as Carrier Billing has validatePayment operation

Changelog input
 Enable Gherkin linter for Test Definitions

Additional documentation
N/A

@rartych I do not know how to manage pending linter errors.

@rartych I do not know how to manage pending linter errors.

I found out it was due to how to represent "minor or less than" in logical operation "=<"

@rartych I do not know how to manage pending linter errors.

Commit https://github.com/camaraproject/CarrierBillingCheckOut/pull/191/commits/9a463368c666135427300cf58e28c84b87c7e79a would be a workaround to fix "logical operators comparison" topic raised by linter configuration
cc @rartych @bigludo7 just in case no simple solution can be found at linter configuration level


Adjust textarea Height to Fill Remaining Space in Contact Form

BEFORE :-

AFTER :-

pls assign the tag of level 2.

pls merge it as soon as possible as event is coming to and end.


setup proper-backend for CDS guys

add necessary extensions and addons for the cds guys on dev-14

PR: https://github.tools.sap/cx-commerce/c3po-legacy-devconfigs/pull/12


Tokens: organized packages/gestalt-design-tokens/config.json & packages/gestalt-design-tokens/build.js

Tokens: organized packages/gestalt-design-tokens/config.json & packages/gestalt-design-tokens/build.js
Organized files to increase comprehension and documenting all parts.
More info:
https://amzn.github.io/style-dictionary/#/transforms
https://amzn.github.io/style-dictionary/#/transforms?id=pre-defined-transforms
https://amzn.github.io/style-dictionary/#/formats
https://amzn.github.io/style-dictionary/#/formats?id=pre-defined-formats
https://amzn.github.io/style-dictionary/#/transform_groups
https://amzn.github.io/style-dictionary/#/transform_groups?id=pre-defined-transform-groups\
ADDING NEW CONSTANTS FILE

so we can import and reference tokens safely in JS files

What's the before & after on this?

@rlingineni There's no before and after. I only refactored code for comprehension and added the new constants library for web.
Technically, no modifications on tokens happened.


__setitem__ always falling back to Pandas when the key is not a string

Describe the problem
The __setitem__ always falls back to Pandas when the key is not a string even when the query compiler is perfectly capable of handling cases where the key is a list of strings.
Source code / logs
https://github.com/modin-project/modin/blob/master/modin/pandas/dataframe.py#L1986-L1997

Thanks @magnatelee, we should fix this as it affects performance as well.

Will try to figure this out.

Can't find any reference documentation for DataFrame.__setitem__  in Pandas docs. Though I'm starting to learn the documentation never actually covers the full API...
The code is more useful: https://github.com/pandas-dev/pandas/blob/385a2ca42ae17ac5457901e8718b3f23263d86ad/pandas/core/frame.py#L3026 (master as of today).
It seems the following cases need to be handled (suggesting this is really multiple issues):

[ ] Key is a boolean DataFrame or 2-dimensionial array (df[df > df2] = 0 is example in Pandas code).
[ ] The key is a slice.
[ ] The key is a function which generates a new key given the DataFrame as input.
[ ] The key is a boolean indexer.
[ ] The key is a list-like.

Note that as I just discovered while working on #1898, some usage patterns don't fallback to Pandas, they just break outright.

All the cases @itamarst mentions seem to work at version c9fc326e3a02f2090c58f6e233aac29ddd651bea.


doc: Update setup document for m1 mac:  install llvm@12 via homebrew

Add description of how to install llvm@12 via homebrew for m1 mac user

Pls follow the PR template and add more documents.


Request for documentation/samples to handle multiple accounts and account switching

Library

[ ]<EMAIL_ADDRESS>or<EMAIL_ADDRESS>[x]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>
Documentation location

[ ] docs.microsoft.com
[ ] MSAL.js Github Wiki
[ ] README file
[ ] Other (please fill in)
[x] Documentation does not exist

Description
It would be extremely helpful to have a sample/documentation that demonstrates how to switch between multiple logged in accounts.

@amrutha95 Thanks, we'll make sure to get this documentation added.

Is there any update on when this documentation will be available?

@mojanas Not yet, unfortunately.

+1 I am also waiting for this. When multiple users are signed in and one isn’t able to refresh the token, then it still shows as “authenticated” even if the second user has no relation to my application whatsoever.
In this case, my app may try to fetch profile info from my API to re-hydrate the user context, thinks a valid user is authenticated, yet may actually return undefined because the user was signed into the browser (therefore appears in the list of accounts) but never actually registered with my application and therefore doesn’t exist as far as my backend is concerned. More samples on this would be much appreciated!

Any progress on this logic? Commenting to keep open.

@jasonnutter
Is there any update?

@anton-marchenko @olafwrieden @mojanas @amrutha95 See the updated document on accounts and the react-router sample which has this logic now.


feat(chart): add pod label

Signed-off-by: Rita Zhang<EMAIL_ADDRESS>
Description:
This PR adds app.kubernetes.io/component: osm-controller labels to osm pods so we can use them to scrape osm metrics.
NOTE: This PR depends on upstream release of v0.8.3-rc.1
Pending #87

Affected area:

New Functionality      [ ]
Documentation          [ ]
Install                [ ]
Networking             [ ]
Metrics                [X]
Security               [ ]
Tests                  [ ]
CI System              [ ]
Performance            [ ]
Other                  [ ]

Please answer the following questions with yes/no.

Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?
No

/azp run pr-e2e-arc


AWS S3 module does not work with Mitogen on RedHat-based OSes

Which version of Ansible are you running?

ansible 2.10.7
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.8.8 (default, Mar 15 2021, 13:10:14) [GCC 10.2.1 20201203]

Is your version of Ansible patched in any way? - nope

Are you running with any custom modules, or module_utils loaded? - nope

Have you tried the latest master version from Git? - yes, and added patch #776

Mention your host and target OS and versions:

custom image based on https://hub.docker.com/r/cytopia/ansible with AWS CLI.
AWS CLI version:
aws-cli/1.19.47 Python/3.8.8 Linux/5.10.25-linuxkit botocore/1.20.47

Mention your host and target Python versions:

host 3.8.8
target Python2 and Python3 (does not work with both)

Do you have some idea of what the underlying problem may be?

aws_s3 module and Mitogen incompatibility, without Mitogen works fine.
Seems that Mitogen does not play nicely with AWS S3 module on RedHat-based OSes :/
Task
- name: copy some file from S3
  amazon.aws.aws_s3:
    aws_region: "{{ aws_region }}"
    aws_access_key: "{{ aws_access_key_id }}"
    aws_secret_key: "{{ aws_secret_access_key }}"
    mode: get
    bucket: "{{ aws_bucket_resources }}"
    # ...
    overwrite: never

1) CentOS 7 - with Mitogen - error, without works
===========================================
error:
   amazon-ebs.ami: TASK [xxx : copy Java] ************************************************
    amazon-ebs.ami: An exception occurred during task execution. To see the full traceback, use -vvv. The error was: SystemError: Parent module 'ansible_collections.amazon.aws.plugins' not loaded, cannot perform relative import
    amazon-ebs.ami: fatal: [xxx]: FAILED! => {
    amazon-ebs.ami:     "ansible_facts": {
    amazon-ebs.ami:         "discovered_interpreter_python": "/usr/bin/python"
    amazon-ebs.ami:     },
    amazon-ebs.ami:     "changed": false,
    amazon-ebs.ami:     "rc": 1
    amazon-ebs.ami: }
    amazon-ebs.ami:
    amazon-ebs.ami: MSG:
    amazon-ebs.ami:
    amazon-ebs.ami: MODULE FAILURE
    amazon-ebs.ami: See stdout/stderr for the exact error
    amazon-ebs.ami:
    amazon-ebs.ami:
    amazon-ebs.ami: MODULE_STDERR:
    amazon-ebs.ami:
    amazon-ebs.ami: Traceback (most recent call last):
    amazon-ebs.ami:   File "master:/usr/lib/python3.8/site-packages/ansible_mitogen/runner.py", line 975, in _run
    amazon-ebs.ami:     self._run_code(code, mod)
    amazon-ebs.ami:   File "master:/usr/lib/python3.8/site-packages/ansible_mitogen/runner.py", line 941, in _run_code
    amazon-ebs.ami:     exec('exec code in vars(mod)')
    amazon-ebs.ami:   File "<string>", line 1, in <module>
    amazon-ebs.ami:   File "master:/root/.ansible/collections/ansible_collections/amazon/aws/plugins/modules/aws_s3.py", line 317, in <module>
    amazon-ebs.ami: SystemError: Parent module 'ansible_collections.amazon.aws.plugins' not loaded, cannot perform relative import
    amazon-ebs.ami:
    amazon-ebs.ami:

=====
2) RHEL8 - without Mitogen works, with Mitogen and even when adding 'vars: mitogen_task_isolation: fork' does not work too :/
amazon-ebs.ami: TASK [xxx : copy Java] ************************************************
amazon-ebs.ami: fatal: [xxx]: FAILED! => {
amazon-ebs.ami:     "ansible_facts": {
amazon-ebs.ami:         "discovered_interpreter_python": "/usr/libexec/platform-python"
amazon-ebs.ami:     },
amazon-ebs.ami:     "changed": false
amazon-ebs.ami: }
amazon-ebs.ami:
amazon-ebs.ami: MSG:
amazon-ebs.ami:
amazon-ebs.ami: Failed to import the required Python library (botocore or boto3) on ip-172-31-13-225.eu-central-1.compute.internal's Python /usr/libexec/platform-python. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter

2b)
Even when adding to Ansible invocation -e ansible_python_interpreter=/usr/bin/python3 ; it reports that Python3 interpreter but same error as above; boto is for sure already installed. Mitogen is causing that boto is not found.
===
Please help! I am blocked to use Mitogen right now. I am forced to use RedHat-based OS. I have tested also Mitogen on Ubuntu 18.04, it worked fine ;) so the case is RedHat+AWS S3 module+Mitogen incompatibility :/
PS. I have made it working once on Centos 8 by specifying ansible_python_interpreter in few places and customizing PIP install especially for Mitogen. But this was just uncomfortable - to add such customizations needed especially for Mitogen :/

hmm maybe it is related with #794 , collections is not loaded?

hmm now I am quite sure that on RHEL8 it is the same issue as #664 . During the same Ansible run am installing boto3 using pip module then trying to use it in AWS3 module.

@pun-ky ,
Thank you for the response, I have already installed boto3 in the target machine but still getting the issue.

Hmm I needed that one too https://github.com/mitogen-hq/mitogen/issues/776#issuecomment-817741822

@krystian-panek-wttech ,
Did you add s3 module in here, could you please share the config?.

@krystian-panek-wttech , could you please share the mitogen zip which you use to fix the issue it will be a great help.

https://github.com/pun-ky/mitogen/archive/refs/tags/v0.3.0-776.tar.gz

@krystian-panek-wttech ,
Thank you so much for sharing the zip, I added import ansible_collections.amazon.aws.plugins here  and the S3 module is working now.

@mathewseby I am glad that I helped 🙂

I have also run into this issue with the latest (0.3.2) on Ubuntu 18.04.

I'm running into this with ansible 4.10/2.11 and mitogen 0.3.2, on a centos 7 server. Tried various workarounds from the discussions in this and other issues, short of patching mitogen itself, but no joy so far.


Added the Dark Mode and Light Mode Button on the main page and some css…

… on bottom left color of the index page

Dark Mode

Light Mode

Hey @Pratham16112002 thanks for your contribution, I've merged your PR and I want you to know that I'm very thankful to you


Save ticker on db

I'm currently still learning linux so I'm not that familiar yet. I wanted to ask how will i add the -db setting so that I can save the tickers that I created.
I use this btw and I'm using a vps
wget https://github.com/rssnyder/discord-stock-ticker/releases/download/v3.3.0/discord-stock-ticker-v3.3.0-linux-amd64.tar.gz

tar zxf discord-stock-ticker-v3.3.0-linux-amd64.tar.gz

mkdir -p /etc/discord-stock-ticker

mv discord-stock-ticker /etc/discord-stock-ticker/

wget https://raw.githubusercontent.com/rssnyder/discord-stock-ticker/master/discord-stock-ticker.service

mv discord-stock-ticker.service /etc/systemd/system/

systemctl daemon-reload

systemctl start discord-stock-ticker.service

Edit the service file so it has the flags you need.

Like this?

yes but, the path for your db looks wrong, just make it -db=./discordbottickers.db

Thanks. Do I have to stop the bot and make the tickers again or will this save the tickers that I have already?

Thanks. Do I have to stop the bot and make the tickers again or will this save the tickers that I have already?

be sure and do systemctl daemon-reload after every change to the systemd file, otherwise the changes wont take affect.
once the service has been started with the -db flag, any bots added will be stored in the DB. If you have bots running now added before you added the flag, they will need to be created again after restarting the service with the flag.
you can verify the DB is being using if you see this log line when you start the service INFO[0000] Will be storing state in ./discordbottickers.db
you can see logs with journalctl -f -u discord-stock-ticker

Thank you very much for this

Thank you very much for this

Anytime! I think the best way to make documentation is just to write stuff down when you teach someone new. https://github.com/rssnyder/discord-stock-ticker/commit/9740d88810dd8e1d5d48c1185627439a3e482192

Is this correct?

you must have an error in your systemd file, share it here and ill take a look.

you must have an error in your systemd file, share it here and ill take a look.

Here
I use
systemctl edit discord-stock-ticker.service
To edit

that isnt my template, what you should have is:
https://github.com/rssnyder/discord-stock-ticker/blob/master/discord-stock-ticker.service
[Unit]
Description=discord-stock-ticker
Wants=basic.target
After=basic.target network.target
Before=sshd.service

[Service]
SyslogIdentifier=discord-stock-ticker
StandardOutput=syslog
StandardError=syslog
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/etc/discord-stock-ticker/discord-stock-ticker -db=./discordbottickers.db
Restart=always

[Install]
WantedBy=multi-user.target

Will the db file create itself or do I have to make one first?

do not create it first it will create the file itself.

I receive an error that states my flag -db is provided, but not defined.
flag provided but not defined: -db
Usage of ./discord-stock-ticker:
-address string
address:port to bind http server to. (default "localhost:8080")
-cache
enable cache for coingecko
-logLevel int
defines the log level. 0=production builds. 1=dev builds.
-redisAddress string
address:port for redis server. (default "localhost:6379")

 I got another error
 I just copied and pasted the one you sent.

I got the same error. When editing the file, it saves as a snippet, instead of overwriting the original. So, it runs both discord-stock-ticker.service and the edit you created. typically, /etc/systemd/system/discord-stock-ticker.service.d/override.conf
I've no idea how to fix this.


pop + Origami

Any idea on pop + Origami
https://facebook.github.io/origami/

This looks great!
+1

Is prototype tool yeah @yozef and @ankesh27

haven't tried with Origami yet, will have a look:)


Web  - we are allowing modification of money request details in an inactive workspace

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Go to settings and select "Create Workspace."
Click on the plus sign and choose "Request Money."
Enter the desired amount and select the created workspace.
Pin the workspace in the Left Hand Navigation (LHN) for easy access.
Go to settings > workspace and delete the created workspace.
Return to the LHN and open the deleted workspace. Navigate to the IOU section.
Observe that the unavailable workspace is still accessible, and it's possible to update the IOU (e.g., amount, etc.).

Expected Result:
It should not be possible to update the IOU with an unavailable workspace.
Actual Result:
Updating IOU Possible with Unavailable Workspace
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: <IP_ADDRESS>
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/93399543/78d5fb5b-cb67-4220-b9f2-9668cd65249d
https://github.com/Expensify/App/assets/93399543/7209212b-6fee-43ea-8829-127dfe1757e7
Expensify/Expensify Issue URL:
Issue reported by: @tewodrosGirmaA
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692862098073539
View all open jobs on GitHub

Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
We don't have any check to check if report(parent report) is archived or not.
What changes do you think we should make in order to solve the problem?
We can change canEdit in MoneyRequestView. and use isArchivedRoom() and if the room is archived then we don't allow user to change description.
There is a function canEditMoneyRequest, in which we can add this additional check for archived room.
We can also add this check if user tried to change using deep link.
We can display FullPageNotFoundView for that pages.
What alternative solutions did you explore? (Optional)

This is reproducible for sure. But I want to confirm this is true:

Expected behavior:
It should not be possible to update the IOU with an unavailable workspace.

Like I'm partially sold this is true. But I want to make sure it's intentional.

Discussing this internally a little and I'll follow up after. We are leaning toward locking down this behavior when a workspace because inactive.

is this the same issue? https://github.com/Expensify/App/issues/27113

@Christinadobrzyn I don't see these are duplicates personally. This GH is about modifying/actioning an existing money request in an archived workspace. Whereas https://github.com/Expensify/App/issues/27113 is about using a link to create a new money request from an archived workspace.
Both related to archived workspaces, but in a different way (e.g. existing vs new requests).

We are discussing more and this may not be deemed a bug actually. I'll follow up when we reach a point of finality with internal convo, and I'll share those guidelines for visibility of course too.

So far this is trending toward being a feature, and not a bug. I'm going to close this GH for that reason. We will start to refine our guidelines around archived workspaces and workspaces where members are removed, but for now I want to clarify this isn't a bug.

expense reports should remain functional and a conversation between admin/approver/submitter should be possible within the expense report still to allow for collaborating on tying up any loose ends.

@michaelhaxhiu , I am not eligible for payment?


Issue #46 - Remove update URL from package.json

Good, all upcoming version will be updated from AMO.
Honza


Implement Strategy Pattern for the SystemStore

Technical Story
When receiving an alert from the Alerter the AlertStore performs the following:

It stores the alert in Mongo
Stores the state of the alerted metric inside Redis. This is then used by the API/UI to display the problems in the Overview Dashboard.

Following the SRP (single responsibility principle) the AlertStore should perform one job only, that being of storing the alert in Mongo. Therefore, we need to create another component which continuously checks the values of each metric and compares them to the alertable thresholds/conditions.
In order to do this change we need to perform the following tasks:

Remove metric state storing logic from the AlertStore
Remove internal alerts mechanism as it would no longer be needed
Develop the MetricsStateStore by integrating each monitorable in a granular way using the Strategy pattern

Description
The aim of this ticket is to implement the Strategy Pattern for storing the systems' metric state. By using the Strategy Pattern we would be able to easily switch between storing strategies in the MetricStore, depending on what type of transformed data we are receiving
Resources:

https://refactoring.guru/design-patterns/strategy/python/example
https://auth0.com/blog/strategy-design-pattern-in-python/

Requirements
To achieve the aims of this ticket you need to implement a strategy that encapsulates the storing of System metrics. The following code snippet can be used as an example:
class MetricStateStorer:
    """
    This is the Context class,  it defines the interface of interest to clients.
    """

    def __init__(self, strategy: MetricStateStoringStrategy) -> None:
        """
        Usually, the Context accepts a strategy through the constructor, but
        also provides a setter to change it at runtime.
        """

        self._strategy = strategy

    @property
    def strategy(self) -> MetricStateStoringStrategy:
        """
        The Context maintains a reference to one of the Strategy objects. The
        Context does not know the concrete class of a strategy. It should work
        with all strategies via the Strategy interface.
        """

        return self._strategy

    @strategy.setter
    def strategy(self, strategy: MetricStateStoringStrategy) -> None:
        """
        Usually, the Context allows replacing a Strategy object at runtime.
        """

        self._strategy = strategy

    def store(self, transformed_data: TransformedData, alerts_config: AlertsConfigs) -> None:
        """
        The Context delegates some work to the Strategy object instead of
        implementing multiple versions of the algorithm on its own.
        """

        self._strategy.store(transformed_data, alerts_config)

class MetricStateStoringStrategy(ABC):
    """
    The Strategy interface declares operations common to all supported versions
    of some algorithm.

    The Context uses this interface to call the algorithm defined by Concrete
    Strategies.
    """

   @abstractmethod
    def store(self,  transformed_data: TransformedData, alerts_config: AlertsConfigs) -> None:
        pass

class SystemMetricStateStoringStrategy(MetricStateStoringStrategy):
    def __init__():
        redis = Redis('localhost')

    def store(self, transformed_data: SystemTransformedData, alerts_config: SystemAlertsConfigs) -> None:
        system_metric_state_storing_helper(transformed_data, alerts_config, redis)

Acceptance criteria
Scenario: The SystemStore storing procedure should satisfy the Strategy pattern

Another option is to implement the Strategy Pattern on the Existing SystemStore and implement two abstract algorithms for the context class, store_metric_state and store_metric_value


AdapterItemIds are too complicated.

In writing the samples, I've come to realise that the AdapterItemIds are really complicated, and make writing adapters really difficult.
The worst offender is the TreeAdapterNode - the contact for all Adapters is that a AdapterItemId needs to be unique for every item in the data set. Creating a unique integer for any data is hard, keeping it deterministic is really hard.
For context - the point of the AdapterItemId is so that the List or Tree knows when a Control needs to be rebuilt as the data is mutated - i.e. insertion of a new control shouldn't mean all other controls need to be rebuilt. It is also a requirement if we were to do sliding animations when things are inserted or removed, so we can associate what's on screen before the mutation and after the mutation.
I've thought about the problem a bit, and decided that actually AdapterItemIds should be replaced with AdapterItems - these are user data types (interface{}) that have equality testing. This simplifies usage heavily. For example:

Instead of List.Selected returning the AdapterItemId, it instead returns the actual AdapterItem data. Yay, no more looking up in the adapter.
If you have duplicates value types in your dataset (lets say strings) simply use a pointer as your AdapterItem. You can then guarantee it's unique.

I've pushed the rm_itemids branch that tries out this idea. It needs a little more polish before being ready.

@crawshaw - I know you're still getting up to speed on this, but I'd appreciate any feedback you might have.

This is one of the things I was talking about in #26 and masking in interface{} is how I did this in https://github.com/dskinner/ui/blob/master/recycler.go#L35
though in that case, I masked the actual retrieval with a Selector interface that would be implemented on an adapter that is also composable with a Filterer interface (also optionally implemented on the adapter).
The intent there is to trigger the filter action on the list and respond appropriately with animations and also be able to compose default implementations for some things with minimal developer input.
In the same breath, this could all be done on an adapter and the developer could keep around references for both the adapter and list, filter the adapter, and then notify the list.
My 2 cents

Removing the IDs and using equality on a user-defined type LGTM.
A few other related thoughts I've been having:

I believe the Adaptor index is a flattened view of all of the children. Is this worth it? An adaptor could just index its direct children, and leave it up to the person querying the children to descend into the children.

Only doing direct descendants raises the possibility of making Adapter a concrete type with a linked list in it, and it containing a general interface with the element/theme-specific implementation. For example, see how the html package represents nodes: http://godoc.org/golang.org/x/net/html#Node

I can't think of a practical situation where you would want more than one theme operating in a process. That leads to a tempting simplification: create a global variable that holds the active theme. A lot of parameters could be removed.

Curious to hear what you think, but none of these thoughts should block this change. (I would usually send this to a mailing list, but we seem to be using github issues like a mailing list. We can keep trying this new world.)

Only doing direct descendants raises the possibility of making Adapter a
concrete type with a linked list in it

I think its a mistake to assume that just b/c a developer writes an adapter
that reports N items, that all of those items are actually loaded into
memory.
On Fri, Mar 20, 2015 at 3:06 PM David Crawshaw<EMAIL_ADDRESS>wrote:

Removing the IDs and using equality on a user-defined type LGTM.
A few other related thoughts I've been having:

I believe the Adaptor index is a flattened view of all of the
children. Is this worth it? An adaptor could just index its direct
children, and leave it up to the person querying the children to descend
into the children.
Only doing direct descendants raises the possibility of making Adapter
a concrete type with a linked list in it, and it containing a general
interface with the element/theme-specific implementation. For example, see
how the html package represents nodes:
http://godoc.org/golang.org/x/net/html#Node
I can't think of a practical situation where you would want more than
one theme operating in a process. That leads to a tempting simplification:
create a global variable that holds the active theme. A lot of parameters
could be removed.
Curious to hear what you think, but none of these thoughts should block
this change. (I would usually send this to a mailing list, but we seem to
be using github issues like a mailing list. We can keep trying this new
world.)
—
Reply to this email directly or view it on GitHub
https://github.com/google/gxui/issues/46#issuecomment-84131387.

Just because the adaptor instances exist doesn't mean a heavier, app specific backing object needs to have fully loaded.
It seems like a significant investment to parameterize these designs by "may be bigger than system memory". Millions of items can be easily represented in tens of megabytes. It is not obviously worth it to me for a UI system to cater to more than that.

hundreds of megabytes is easily represented by tens of items. Exploring
mobile, such concerns may be more valid when conflated with other UI, not
just "may be bigger than system memory".
On Fri, Mar 20, 2015 at 3:16 PM David Crawshaw<EMAIL_ADDRESS>wrote:

Just because the adaptor instances exist doesn't mean a heavier, app
specific backing object needs to have fully loaded.
It seems like a significant investment to parameterize these designs by
"may be bigger than system memory". Millions of items can be easily
represented in tens of megabytes. It is not obviously worth it to me for a
UI system to cater to more than that.
—
Reply to this email directly or view it on GitHub
https://github.com/google/gxui/issues/46#issuecomment-84133658.

I believe the Adaptor index is a flattened view of all of the children. Is this worth it? An adaptor could just index its direct children, and leave it up to the person querying the children to descend into the children.

I'm guessing you're referring to the TreeAdapterNode?
If so - no, the index parameter of ItemAt is the index into the immediate descendants of that node [0 - Count-1]. ItemIndex is a little more complicated, in that it will return the index of the immediate descendants with that item or if that child contains the item indirectly.

Only doing direct descendants raises the possibility of making Adapter a concrete type with a linked list in it, and it containing a general interface with the element/theme-specific implementation. For example, see how the html package represents nodes: http://godoc.org/golang.org/x/net/html#Node

If I follow you correctly, this doesn't really seem much like my idea of an Adapter, but more like another concrete wrapper around the dataset. I agree with @dskinner on this - one of the big wins with this interface is that data can be streamed. This is something that we could really benefit from on our project that uses GXUI.

I can't think of a practical situation where you would want more than one theme operating in a process. That leads to a tempting simplification: create a global variable that holds the active theme. A lot of parameters could be removed.

Humm, interesting idea. I can't really think of one situation either. I'll mull it over.

(I would usually send this to a mailing list, but we seem to be using github issues like a mailing list. We can keep trying this new world.)

On my 4th day of using GitHub, I'm actually quite liking it. Some aspects of code-reviews is a bit clunky, but given how angry Gerrit has been making me recently, this is actually quite refreshing. I'm also liking the markdown links - it works really nicely.
Shall we give it another week and see?

For what it's worth, +1 on global theme. Referencing multiple themes sounds
wrong, but a theme that can reference multiple themes sound like how that
should go if the functionality was needed.
On Fri, Mar 20, 2015 at 4:08 PM Ben Clayton<EMAIL_ADDRESS>wrote:

I believe the Adaptor index is a flattened view of all of the
children. Is this worth it? An adaptor could just index its direct
children, and leave it up to the person querying the children to descend
into the children.

I'm guessing you're referring to the TreeAdapterNode
https://github.com/google/gxui/blob/rm_itemids/tree_adapter.go#L11?
If so - no, the index parameter of ItemAt
https://github.com/google/gxui/blob/rm_itemids/tree_adapter.go#L13 is
the index into the immediate descendants of that node [0 - Count
https://github.com/google/gxui/blob/rm_itemids/tree_adapter.go#L12-1].
ItemIndex
https://github.com/google/gxui/blob/rm_itemids/tree_adapter.go#L14 is a
little more complicated, in that it will return the index of the immediate
descendants with that item or if that child contains the item
indirectly.

Only doing direct descendants raises the possibility of making
Adapter a concrete type with a linked list in it, and it containing a
general interface with the element/theme-specific implementation. For
example, see how the html package represents nodes:
http://godoc.org/golang.org/x/net/html#Node

If I follow you correctly, this doesn't really seem much like my idea of
an Adapter, but more like another concrete wrapper around the dataset. I
agree with @dskinner https://github.com/dskinner on this - one of the
big wins with this interface is that data can be streamed. This is
something that we could really benefit from on our project that uses GXUI.

I can't think of a practical situation where you would want more
than one theme operating in a process. That leads to a tempting
simplification: create a global variable that holds the active theme. A lot
of parameters could be removed.

Humm, interesting idea. I can't really think of one situation either.
I'll mull it over.
(I would usually send this to a mailing list, but we seem to be using
github issues like a mailing list. We can keep trying this new world.)
On my 4th day of using GitHub, I'm actually quite liking it. Some aspects
of code-reviews is a bit clunky, but given how angry Gerrit has been making
me recently, this is actually quite refreshing. I'm also liking the
markdown links - it works really nicely.
Shall we give it another week and see?
—
Reply to this email directly or view it on GitHub
https://github.com/google/gxui/issues/46#issuecomment-84147440.

If you have a practical application of a streaming adaptor that obviously trumps any theoretical argument I can make.
(I'm still, more broadly, hunting for a way to mixins.)

Branch merged.


multi languages supports with mo files on single project

hello, i got one problem
for example
i want to add French and Chinese to my actual English project: example.readthedocs.org/en/latest/
and i do not want to create some projects likes example_fr and example_zh (because i have to fork many projects on github, i want to keep all translation all in a centralized repository)
So i follow these steps here: http://sphinx-doc.org/intl.html, so i got mo file of translation in locale:
├── locale
│   ├── fr
│   │   └── LC_MESSAGES
│   │       ├── Behavioral
│   │       ├── Creational
│   │       ├── More
│   │       ├── README.mo
│   │       ├── README.po
│   │       └── Structural
│   └── zh_CN
│       └── LC_MESSAGES
......

and i add these parameters in my conf.py
language = ['en', 'fr', 'zh_CN']
locale_dirs = ['locale/']
gettext_compact = False

and then i found RTD can not recognize 3 languages at one time, it cound only generate/show/support one language, for example:
if i chose English in admin page it generate English version and the project turn to example.readthedocs.org/en/latest/
Running Sphinx v1.3.1
making output directory...
loading translations [en]... done
building [mo]: targets for 0 po files that are out of date
building [readthedocs]: targets for 39 source files that are out of date

if i chose French in admin page it generate French version and the projet turn to example.readthedocs.org/fr/latest/
Running Sphinx v1.3.1
making output directory...
loading translations [fr]... done
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [readthedocs]: targets for 39 source files that are out of date

what should i do to make RTD generate these threes language in one build (loading translations [en, fr, zh-CN]) and active languages picker in UI?

The version we came up with can be seen at: https://github.com/effektif/user-docs/tree/master/docs. We keep everything in one repo and have different conf.py files for the different languages.

German: https://github.com/effektif/user-docs/blob/master/docs/de/conf.py
English: https://github.com/effektif/user-docs/blob/master/docs/en/conf.py

I think i understand how you did on your project, keep each translation and each conf.py in one repo, and use "Manually Import" form same repo same branch to create different project "effektif" and "effektif-de",and in admin page, choose different language, then create connection between them.
but i think if it is possible to just create only one project "effektif" on RTD, when it buiding, it can
loading translations [en, de]
if it is not possible, i'll took your solution, it's great. thanks for your help.


Suggest avoiding UMD for CJS only packages

ESM importing a UMD package does not work as the named imports interop fails in nodejs.
ESM importing a UMD package does not work well for treeshaking

Gave an attempt at https://github.com/bluwy/publint/tree/umd-suggestion. Also updated the description about named imports interop. It seems to affect IIFE specifically, not UMD.


Allow RFC7396 Json Merge PATCH

Our /PATCH/{kind}/{id} currently only supports RFC 6902 patch semantics which are cumbersome to use and often not intuitive.
RFC 7396 has introduced a much more natural json merge syntax which should make partial updates much more intuitive.
Goal

Implement without breaking change
Accept merge document if Header Content-Type: application/merge-patch+json is set
Merge as atomically as possible (try to avoid Read-before-Write pattern and let backend handle the merge if possible)

Regardless of what the current behavior is: Is there a reason to ever show "field": null instead of doing it exactly as described in the RFC document? I can't think of any?

I was just wondering if we even support that. If a class has a field and it is not specified will it not be null by default?


Implemented age_tail function

age_tail() function returns a list containing all the elements, excluding the first one, from a list.

Yeah quite odd actually, I did though remove on one of the commits as you can see, but it still shows the extra line... I'll check again soon.

@MatheusFarias03 ty! merged


Add expand program

As an exercise to learn V, I added the expand program. It is 66% compatible with GNU coreutils CLI.
Two things diverge from the GNU flavour:

LIST flavour of --tabs option is not implemented.
--tabs N will always replace TAB by N spaces, thus not making smart alignment.

Great work and a great way to learn the language!


add MinMaxNorm constraint

Hi,
I have added a new constraint, for constraining the norm of the weights to an interval. In addition, the new constraint has a 'rate' parameter to control how the constraint is enforced.
All current constraints change the weights in a hard way to achieve the desired norm value. For example, consider the unit norm constraint. If we start training a network with random initial weights, the weights will already be rescaled to norm 1 after the first batch is processed. This might get the network stuck at a local minimum, because it moves the weights suddenly in a direction that might be incompatible with the gradient. The tunable 'rate' parameter allows the weights to change in a more predictable way, only doing a fragment of the rescaling required to reach norm 1 after each step. Hard constraint enforcing can still be achieved, by taking rate=1.0.
The MinMaxNorm constraint covers the previous ones as follows:
MaxNorm(m, axis) => MinMaxNorm(high=m, rate=1.0, axis=axis)
UnitNorm(axis) => MinMaxNorm(low=1.0, high=1.0, rate=1.0, axis=axis)

Looks good to me. In theory we shouldn't change the API at this time, but this change is well-contained and makes sense so we may make an exception.

How does this compare to using something like a boundary method to do constraints?
For example, regularization like log(1-weight)+log(weight) constrains weight to <0...1>, because the loss approaches infinity as weight approaches 0 or 1.
Anyone tested out the difference between the hard constraints we typically use and using a boundary method? Logarithmic boundary can give you NANs if the learning rate is too high, but there are other boundary methods possible.
Cheers

One advantage I see for explicit interval constraints (hard or not) is that if the norm of the weights is already in the desired interval, no change is needed and learning goes in the direction of the gradient.
This behavior can be achieved with boundary methods as well, but I find it less intuitive (I also find weight decay more intuitive than L2 regularization, so it might be just personal preference). For example, a quadratic loss term that would bring the weights closer to the [a, b] interval could be the following: r * (max(a - weights, 0) ** 2 + max(weights - b, 0) ** 2). This is in fact exactly the kind of regularization that would happen when using something like MinMaxConstraint(low=a, high=b, rate=r) but for weight values instead of norms.
On the other hand, to achieve the regularization provided by hard constraints, one would need a boundary method that goes to infinity outside the desired interval (like your example), but more than that, it should be zero inside the interval. And as far as programming languages go, it is probably easier to write this as a hard constraint and avoid infinity.


Message.getEmbeds() contains certain embeds only the second time they're sent

General Troubleshooting

[X] I have checked for similar issues on the Issue-tracker.
[X] I have checked for PRs that might already address this issue.

Version of JDA
5.0.0-beta.20
Expected Behaviour
The getEmbeds method on a message should always contain all embeds that are contained in a message instead of only doing so after the embed was sent before at least once already.
For example, when a link to a GitHub repo is sent (e.g. https://github.com/discord-jda/JDA), the embed will only be in the list from getEmbeds on messages that are sent after the first one containing the link.
Code Example for Reproduction Steps
From: https://github.com/Erdragh/AstralBot/blob/main/common/src/main/kotlin/dev/erdragh/astralbot/handlers/MinecraftHandler.kt
    /**
     * Event handler that gets fired when the bot receives a message
     * @param event the event which contains information about the message
     */
    override fun onMessageReceived(event: MessageReceivedEvent) {
        // Only send messages from the configured channel and only if the author isn't a bot
        if (event.channel.idLong == textChannel?.idLong && !event.author.isBot) {
            sendDiscordToChat(event.message)
        }
    }

    // ... Methods inbetween sendDiscordToChat and formatEmbeds ...

    /**
     * Formats the attachments and embeds on a Discord [Message] into
     * a comma separated list.
     * The following things can be en- or disabled in the [AstralBotConfig]:
     * - Making the embeds clickable
     * - Blocklist for disallowing certain URLs, blocking based on site hostname
     *
     * If an embed doesn't have a title it will be called embed`n` where `n` is
     * the index of the embed. All embeds come before attachments. If the URL of
     * an embed or attachment is blocked, it will display `BLOCKED` in red instead
     * of the name.
     *
     * @param message the message of which the attachments and embeds are handled
     */
    private fun formatEmbeds(message: Message): MutableComponent {
        val comp = Component.empty()
        // Adds a newline with space if there are embeds and the message isn't empty
        if (message.embeds.size + message.attachments.size > 0 && message.contentDisplay.isNotBlank()) comp.append("\n ")
        var i = 0
        // message.embeds here is Kotlin syntax sugar for calling getEmbeds() on the message
        message.embeds.forEach {
            if (i++ != 0) comp.append(", ")
            comp.append(formatEmbed(it.title ?: "embed$i", it.url))
        }
        message.attachments.forEach {
            if (i != 0) {
                comp.append(", ")
            } else {
                i++
            }
            comp.append(formatEmbed(it.fileName, it.url))
        }
        return comp
    }

Code for JDABuilder or DefaultShardManagerBuilder used
JDABuilder.createLight(
            env["DISCORD_TOKEN"],
            GatewayIntent.MESSAGE_CONTENT,
            GatewayIntent.GUILD_MESSAGES,
            GatewayIntent.GUILD_MEMBERS
        ).addEventListeners(CommandHandlingListener, minecraftHandler).build()

Exception or Error
N/A

Please provide code example for reproduction steps, I have no idea what getEmbeds method you're talking about, nor where the message comes from
If I had to guess, this is a message received event, in which case the embed resolution is done asynchronously (on Discord's side), as you may have noticed that embeds sometimes do take time to appear on Discord itself, it is therefore not a JDA issue.
There's also an event that fires when an embed get resolved, see MessageEmbedEvent

Sorry, I'm indeed talking about the message received event. I've also just found the line where they're parsed so I was about to say that it seems it's a problem on Discord's side:
https://github.com/discord-jda/JDA/blob/472cf520f10656a823c47d8c67abe7fcc30c84d5/src/main/java/net/dv8tion/jda/internal/entities/EntityBuilder.java#L1755
Is there a way to check whether a message has any embeds, even if they aren't resolved yet? I'm constrained by needing the entire contents of a message and any embeds it may have at a singular point in time, so if I could check whether a message has embeds and then wait for them I would like to know about it. From what I've read in the wiki and javadocs so far, it doesn't seem like it.

There's no way to determine if a message will have embeds generated by links, only Discord's embed generator can do that.
You can check if a message has links, you should be able to find a few regex's online
Telling why you need to see generated embeds would also help

(I've updated the issue with the relevant code now)
My usecase is synchronizing Discord chat with Minecraft chat, where I want to send the Discord messages into the Minecraft chat after formatting them with Minecraft's Component system. In the code example given in the issue you can see where I access the embeds and format them.

Also, not every link leads to an embed, so check whether there's a link and then waiting for the embeds event may just deadlock the program if done without a timeout. I want it to be as responsive as possible.

If there's no way to edit a MC message to include the embeds later, then you can't


RDF/JS Sink & Store interface support

Sink (& Store). Transaction boundaries for an import might need a bit of thought: you could have one transaction per quad, or one transaction per stream, or some batching. That would then drive what the app sees, via updates.

OK great! here is what I have in mind for triples: we could broadly augment MeldState with the RDF/JS Streams Store interface. That would allow you to asynchronously feed triples into m-ld.
One consideration: in m-ld, an individual call to write takes some json-rql representing multiple triple deletions and insertions, making a consistent atomic change according to relevant constraints. The stream-based Store interface doesn't have any such boundaries: you can add and remove individual triples anytime. We could have a transaction for each individual triple, and this might be okay in some cases, but in others it might represent an intermediate state between consistent ones.
A way would be to expose the Store interface only to a callback. So, for example, a 'write' might look like this:
await state.writeRdf(async store => { /* make calls to the store here */ });

Originally posted by @gsvarovsky in https://github.com/m-ld/m-ld-spec/discussions/117#discussioncomment-6861604

Prior art:

IndexedGraph, a prepared statements/indexed API for RDF databases – no replies
O-Team's SubscribableDataset – extension to sync Dataset interface
https://github.com/comunica/comunica/issues/810 – open ticket

A problem with using Store as a temporary representation of the dataset:
The Store interface assumes a mutable state, to which operations are applied serially. So, if you import a stream of quads, you can then remove an intersecting stream, you expect the intersection to be absent in the final state.
In our proposed interface this would not be the case. The imported quads would be gathered into an array of inserts, and the removed quads gathered into an array of deletes. In a single m-ld update, inserts logically follow deletes, so the intersection would be present, not absent.
This could lead to some unpleasant surprises, because we are breaking the Store contract. (Although it's rather implicit anyway; and I'm not sure what is expected in a Store when imports and removals are actually concurrent.)
This leads me to think that "transaction" was the wrong word to use, because that implies a private state that can be serially mutated. Let's consider instead an "update", which is much more in line with m-ld's updates, in turn inspired by a SPARQL delete/insert. This is the API I'm considering:
/**
 * An RDF dataset representation that provides update semantics.
 * @category RDF/JS
 */
export interface UpdatableRdfDataset<State, Q extends BaseQuad = Quad> {
  /**
   * Performs an atomic update to the dataset. The deletes and inserts will be
   * committed in the resolved state.
   */
  updateRdf(operation: { deletes?: Iterable<Q>, inserts?: Iterable<Q> }): Promise<State>;
}

I agree, that the last option is a much more stable interface.

That is implemented, with some simplification:
https://github.com/m-ld/m-ld-js/blob/d8472eb24ef9306ef5a2b33487aa014f50ceffb0/src/rdfjs-support.ts#L59-L75
However, there is one more thing to consider:
When an update is made, any followers of the clone receive the changes that were actually made, as MeldUpdates. These updates are provided as JSON-LD. I think it would be better for RDF applications to receive Quads, probably even using the new BaseDeleteInsert interface (above).
I will have a think about how this should be designed.

I have added support for updates with Quads. In the end, it was just a matter of adding a quads member to the GraphSubjects class which is used in a MeldUpdate for the deletes and inserts. It looks quite easy to use, I have created a live-code demo in this branch:
https://m-ld-js-git-rdf-update-gsvarovsky.vercel.app/#using-the-rdfjs-api

I merged the branch because it also had the very useful enhancement to provide an async iterator for following a clone. Happy to keep evolving the RDF API though of course. 🚀


Apply Zopfli lossless compression to PNGs

32 % reduction of PNG files without reducing image quality.

@da2x I know a lot of time has passed since then, but could you please fix the conflicts, re-run the compression, and I'll merge it right after? Thanks 😃

Continued in #313