Replaced os.path with pathlib

Hey, I just made a Pull Request!
Description
Changes all occurrences of os.path to use pathlib instead.
Motivation and Context
Closes #179
Have you tested this? If so, how?
Updated unit tests :)
Checklist for PR author(s)

[x] Changes are covered by unit tests (no major decrease in code coverage %).
[x] All tests pass.
[x] Docstring coverage is 100% via tox -e docs or interrogate -c pyproject.toml (I mean, we should set a good example :smile:).
[ ] Updates to documentation:

[x] Document any relevant additions/changes in README.rst.
[x] Manually update both the README.rst and docs/index.rst for any new/changed CLI flags.
[ ] Any changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives.  Find the appropriate next version in the project's __init__.py file.

Release note

NONE

Not hitting 100% docstring coverage although I don't recall adding any new functions/methods. Also not sure if this deserves a release note or any versionchanged directives.

I'll take a look at Windows' fails tomorrow 👍

Took a bit longer but I'm getting OSErrors, seems like Windows can't install cairosvg 🤔 I feel like I'm doing something wrong here.
@econchick Could you approve the workflow? 😄


CORE-5539: Add Config Change Smoke Test

Add new smoke test to make a configuration change (triggering a full
reload on all workers) and execute some flows exercising multiple
features from different workers afterwards.
Amend retry logic in tests, disable parallel execution of 'e2eTest' and
'smokeTest' gradle tasks in CI, and automatically reconnect 'kubectl'
port-forwarding upon failure in CI to prevent flakiness (by design, the
automatic reload triggered on the rpc-worker causes the internal HTTP
server to become unavailable for a small period of time).

Automatically restart kubectl port-forward in Jenkins jobs.
Execute 'e2eTest' and 'smokeTest' gradle tasks serially in Jenkins.
Update 'FlowTests' to automatically install prerequisites as part of
the setup logic instead of requiring external intervention.
Fix assertions within 'VirtualNodeRpcTest' to correctly detect
conflict errors when uploading CPIs.
Add helper methods to make the interaction with REST configuration
endpoints easier.
Improve 'assertWithRetry' to allow ignoring exceptions thrown while
executing the retry logic.
Refactor 'ConfigTests' to use new helper methods and avoid
duplicating logic across tests.
Create new smoke test flow within 'RpcSmokeTestFlow' to exercise
membership lookup.
Add 'corda-config-schema' as a dependency to 'workers-smoke-test' in
order to use already defined constants instead of duplicating the
keys across modules.
Prevent test 'start multiple RPC flow and validate they complete'
from failing when executed multiple times by specifically checking
the result of the flows fired by the test instead of all flows for a
particular 'holdingID'.

@yarivus : looks like while true is still a better option (at least until INFRA-1859 is implemented). More details here.


Enhancements

Hi,
Firstly, thanks for making this library available through Gradle.
I'm using this library in a new project and would like to add a number of enhancements to the library. But before I do the coding and pull requests, I want to run them by you to make sure we're on the same page.
Enhancements I want to make are:

AdbConnection.openStreams is a regular HashMap but has a race condition when read from the connection thread and updated from main thread at the same time. I'm thinking of changing it to a ConcurrentHashMap or possibly adding some locks in the code that accesses it.
Add timeout parameter to AdbConnection.connect() since this method will never return in the following situations:

The auth popup appears on the target device and the protocol version is 0x01000000
The auth popup appears on the target device but is cancelled by the user
The auth popup appears on the target device but the user ignores it

Add an option to AdbConnection.connect() to throw an AdbAuthenticationFailedException if we receive a second AUTH message after we've already sent our signature. This way we get instant feedback about whether we are "always allowed" from a previous auth attempt, and this is exactly how the adb command line tool handles the situation. (The adb tool assumes authentication failed in this situation, but then if the user accepts the auth popup and the adb tool receives a subsequent CNXN, then it changes its mind and decides the connection was ok after all.) Or the other option is, instead of throwing an exception, to at least provide status updates about the current state (eg connecting vs authenticating vs connected) so our app can respond to them in real-time.
Update client protocol version from 0x01000000 to 0x01000001. The main benefit of this is, when the target device gets an auth popup, then when the user presses the "OK" button, then we receive a CNXN message and the connection establishes. Whereas if we're on the old version, then we never receive a CNXN message when the user presses "OK", so connection attempts always fail unless the user has previously checked the "always allow" box on the auth popup.

This is based on testing against an NVIDIA Shield TV Pro 2019 and Google Pixel 3 XL. Maybe older Android devices that run the older 0x01000000 protocol version have less issues?
Can you let me know what you think of these ideas? And do you need unit tests or any other specific checks and balances before I raise the pull request?
Lastly, how long would the review and release process take before the changes are live and ready to pull into an app through Gradle?
Thanks!

Ideas sound good to me. Please make sure to make small PRs for each change, so it can be easily reviewed.

Will do!
Just regarding upgrading the protocol version, after further testing, it looks like the hanging connection issue wasn't related to protocol version after all, so I'll leave it at the original version.

Raised #7 for the thread safety issues

Raised #9 for timeout option

Raised #10 for auth exception

Closing this issue since it's been converted to pull requests

@tananaev  @sampalmer may I merge recent PRs to com.cgutman.adblib (https://github.com/mirfatif/AdbLib)?

@tananaev @sampalmer may I merge recent PRs to com.cgutman.adblib (https://github.com/mirfatif/AdbLib)?

Sure!
I just looked at your fork and noticed you have a fix for AdbStream.read(): https://github.com/mirfatif/AdbLib/commit/aaa08a4bd4567bbf7a03f09f22fddbd5c256498e.
Does that fix the issue where code like this sometimes fails?
try (AdbStream stream = connection.open("shell:echo Hello world")) {
    byte[] response = stream.read();
    String responseText = new String(response, StandardCharsets.UTF_8);
    Assert.assertEquals("Hello world", responseText.trim());
}

Sure!

Thanks.

Does that fix the issue where read() sometimes fails with an IOException instead of sending back the response text?
try (AdbStream stream = connection.open("shell:echo Hello world")) {
    byte[] response = stream.read();
    String responseText = new String(response, StandardCharsets.UTF_8);
    Assert.assertEquals("Hello world", responseText.trim());
}

While waiting for read() (here), if isClosed is set true (here), read() would throw Exception (here) even if readQueue is still receiving stdout/stderr data (here) and we have one or more messages to be read() and displayed yet.
I hope this makes sense :smile:
So the following would definitely throw IOException on first read() without printing anything:
try (AdbStream stream = connection.open("shell:echo Hello world")) {
    SystemClock.sleep(1000);
    byte[] response = stream.read();
    System.out.println(new String(response, StandardCharsets.UTF_8).trim());
}

I've tried to fix this.

While waiting for read() (here), if isClosed is set true (here), read() would throw Exception (here) even if readQueue is still receiving stdout/stderr data (here) and we have one or more messages to be read() and displayed yet.
I hope this makes sense 😄

Ah, yeah that makes sense thanks! I've been running into this bug as well, but I hadn't realised why it was happening until I saw your fix!
I've just raised #11 to get this fixed in com.tananaev.adblib as well. I implemented the fix without changing the API to keep things simple for existing apps that use code like this:
while (!stream.isClosed()) {
    stream.read();
    // etc
}


Add open source project: Json Schema Editor

Json Schema Editor - An intuitive editor for json schema built with Vue.js and Firebase.

Sorry! I just found that Json Schema Editor should be under Apps/Websites category.
I will close this request and create another.


RFC bibdocfile: removed in 2.3

Proposal
As documents module is getting stable we propose to deprecate bibdocfile module and remove it in 2.3.

[ ] fulltext extraction to special field in document
[ ] add migration script (matching fields from bibdocfile to new document model)
[ ] missing cli vs. admin interface

+1

+1

Newbie question: how restrictions are supported by the new document model? In particular in terms of streaming documents?

Restrictions works more or less like in bibdocfile. See

https://github.com/inveniosoftware/invenio/blob/master/invenio/modules/access/jsonext/fields/acl_base.cfg
https://github.com/inveniosoftware/invenio/blob/master/invenio/modules/records/views.py#L211
https://github.com/inveniosoftware/invenio/blob/master/invenio/modules/access/bases.py#L56

With respect to streaming I'm not sure though.

Removed in Invenio 3.

see Invenio-Files-RESR instead (https://github.com/inveniosoftware/invenio-files-rest)


gcc: error: unrecognized command-line option '-marm'

$ uname -a
Linux raspberrypi 6.1.0-rpi8-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64 GNU/Linux
$ go install -v github.com/projectdiscovery/katana/cmd/katana@latest
runtime/cgo
runtime/cgo
gcc: error: unrecognized command-line option '-marm'
It looks like you're trying to install the Katana tool from the projectdiscovery GitHub repository, but encountering a compilation error related to the CGo package and an unrecognized gcc compiler flag -marm.

$ go version
go version go1.21.6 linux/arm
$ export GOARCH=arm64  # Adjust based on your actual architecture
$ go install -v github.com/projectdiscovery/katana/cmd/katana@latest
github.com/smacker/go-tree-sitter/javascript
github.com/smacker/go-tree-sitter/javascript: build constraints exclude all Go files in<EMAIL_ADDRESS>github.com/smacker/go-tree-sitter
github.com/smacker/go-tree-sitter
go/pkg/mod/github.com/smacker/go-tree-sitter@v0.0.0-20230720070738-0d0a9f78d8f8/iter.go:17:18: undefined: Node
go/pkg/mod/github.com/smacker/go-tree-sitter@v0.0.0-20230720070738-0d0a9f78d8f8/iter.go:21:21: undefined: Node
go/pkg/mod/github.com/smacker/go-tree-sitter@v0.0.0-20230720070738-0d0a9f78d8f8/iter.go:25:20: undefined: Node
go/pkg/mod/github.com/smacker/go-tree-sitter@v0.0.0-20230720070738-0d0a9f78d8f8/iter.go:30:26: undefined: Node
go/pkg/mod/github.com/smacker/go-tree-sitter@v0.0.0-20230720070738-0d0a9f78d8f8/iter.go:34:20: undefined: Node
go/pkg/mod/github.com/smacker/go-tree-sitter@v0.0.0-20230720070738-0d0a9f78d8f8/iter.go:38:32: undefined: Node
go/pkg/mod/github.com/smacker/go-tree-sitter@v0.0.0-20230720070738-0d0a9f78d8f8/iter.go:43:9: undefined: Node
go/pkg/mod/github.com/smacker/go-tree-sitter@v0.0.0-20230720070738-0d0a9f78d8f8/iter.go:46:18: undefined: Node
go/pkg/mod/github.com/smacker/go-tree-sitter@v0.0.0-20230720070738-0d0a9f78d8f8/iter.go:68:40: undefined: Node

~/go/bin/linux_arm64 $ ls
anew    assetfinder  dnsx  hakrawler  httpx    notify     subfinder  waybackurls
asnmap  cvemap       gron  hakrevdns  mapcidr  qsreplace  uncover
others are working, father export GOARCH=arm64
but katana

sudo find / -type f -name "katana"


ZEPPELIN-386 provide links to individual bin/src artifact as well as signatures and KEYS

This PR addresses https://issues.apache.org/jira/browse/ZEPPELIN-386, by provide links to individual bin/src artifact as well as signatures and KEYS
Current download page

After applying this PR

looks good

looks good to me


Add option to reverse conversation view

Personally I find the upside-down conversation list of micro dot blog really confusing. I'd like to be able to read it from top to bottom, chronologically, so I'd love an option for this behaviour please!

I've made this the default for now, because it makes more sense to me and matches the Mac app's behaviour. Later on we could add an option for the user to change this behaviour if enough people want it.


Vector, Matrix as native type

Should tensor a native type or implemented in a package?  It seems that Python doesn't have a native type of Tensor, but the package numpy provides one (numpy.ndarray).

Not sure. I just think the following matrix literal:
[1, 2, 3; 4, 5, 6; 7, 8, 9]

It will create a matrix object. For this reason, it maybe is a native type.
Currently, This issue is only a feature request, without any design detail.

I think something like numpy.ndarray is a must for data scientists.  But it's probably too much for a language feature.  It's better to be in NumGo+

I think something like numpy.ndarray is a must for data scientists. But it's probably too much for a language feature. It's better to be in NumGo+

I agree.


Save and Restore Environment State

I'm trying to restore the environment to a previously seen state. Since mujoco does not support the get_state() and set_state(state) functions anymore (as explained in the documentation), we have to set the relevant fields explicitly. But the observation that I get after restoring the state of the environment is very slightly different from the observation before restoring. Is this the correct way of doing it?
I'm using the following code:
import numpy as np
import gym

env = gym.make("Ant-v4")

seed = 100
obs = env.reset(seed = seed)
env.action_space.seed(seed)

nq, nv = env.unwrapped.model.nq, env.unwrapped.model.nv
obs_hidden = env.unwrapped.state_vector()

act = env.action_space.sample()
obs_1, _, _, _ = env.step(act)
print(obs_1)

env.unwrapped.set_state(obs_hidden[: nq], obs_hidden[nq : nq + nv])
obs_2, _, _, _ = env.step(act)
print(obs_2)

print(np.array_equal(obs_1, obs_2))
print(obs_1[24])
print(obs_2[24])

Following is a sample output:
[  0.78102192   0.99446227   0.06098776   0.07400553   0.04299374
  -0.07730379   0.47748963   0.05383492  -0.38538979   0.1836153
  -0.48892288  -0.12608098   0.47900775   0.36596394   0.3628452
   0.46128181  -0.37403918  -0.8717751   -0.94878363   0.05584823
  13.62777278   4.9388784   -5.24978601   4.30822419 -12.55063306
  -3.66821107  10.81313906]
[  0.78102192   0.99446227   0.06098776   0.07400553   0.04299374
  -0.07730379   0.47748963   0.05383492  -0.38538979   0.1836153
  -0.48892288  -0.12608098   0.47900775   0.36596394   0.3628452
   0.46128181  -0.37403918  -0.8717751   -0.94878363   0.05584823
  13.62777278   4.9388784   -5.24978601   4.30822419 -12.55063306
  -3.66821107  10.81313906]
False
-12.550633062180527
-12.550633062180529

Build info:
gym                           0.25.2
mujoco                        2.2.2

You probably need to set the warmstart accelerations. This is the relevant docs section.

You probably need to set the warmstart accelerations. This is the relevant docs section.

Do you mean to say we need to keep track of env.unwrapped.data.qacc_warmstart and set it prior to the second steping? It doesn't seem to change the output.

Please can you paste the code where you try this and it fails?

Here is the code:
import numpy as np
import gym

env = gym.make("Ant-v4")

seed = 100
obs = env.reset(seed = seed)
env.action_space.seed(seed)

nq, nv = env.unwrapped.model.nq, env.unwrapped.model.nv
obs_hidden = env.unwrapped.state_vector()
acc_hidden = env.unwrapped.data.qacc_warmstart

act = env.action_space.sample()
obs_1, _, _, _ = env.step(act)
print(obs_1)

env.unwrapped.set_state(obs_hidden[: nq], obs_hidden[nq : nq + nv])
env.unwrapped.data.qacc_warmstart = acc_hidden
obs_2, _, _, _ = env.step(act)
print(obs_2)

print(np.array_equal(obs_1, obs_2))

I tried to figure this out by looking at the gym code but couldn't see anything obviously suspicous.
Since we don't support mujoco-py I'm afraid I have no way to truly get to the bottom of this, sorry.
Let me know if you figure it out.


Possibility to interact with cardview by swipe left

For example displaying a magnet button and download button and a possible stream button.

Like Gmail Swipe to delete item?

I'm using default player from galaxy s8 and VLC. Both gives read error while playing the stream, as long as it is not done downloading. Also tried with MX Player and doesn't work, it gives the error: "can't play the file".

However Torrent Stream Server doesn't give error since it streams the file through a nanohttpd server.

Swipe to delete item on RecentFragment?

And torrent list too, after swipe show download and stream button. I think good?

Not suggest add button while swipe with carview.
Add a extend buttong maybe a good way to do this.

Please see Leave-behinds and Cards.

Ok you right

So might be best to add two simple button (link) at the bottom of each cardview then? Download and Stream? Or Magnet?

What do you think about this design?

@ltype it's ok but this is better imo http://imgur.com/a/tlk7b
sorry for paint 😄

instead expand just 2 bottom buttons

I tryed this. but have some problem.
I'd like show more item in one screen. That make user fast view all item.

Another way, maybe a long press on a card reveal the two buttons?

Long press and show pop up menu?

Overall I stay on idea to add buttons like I said before

In Material Design, not recommend use long press on a card.

Guys http://www.strawpoll.me/13450355 xdddd

Seems like collapsing like @ltype did is the way to go :')

Seems to be done


Conversations started referencing two files removes each of their unique conversations

If you start a new conversation with two files and when you already have unique conversations for each of those files, you will no longer be able to access those unique conversations in the File view.

To recreate:

Post File 1 to Teams and start a new conversation and post "File 1"
Post a File 2 to Teams and start a new conversation and post "File 2"
Start a new conversation and attached those two files to the conversation and post "Both files"
Open File 1 in File view and open the conversation. Only the "Both file" conversation will remain and the "File 1" item is now lost.

@drewling390 Thanks for reporting this. We have raised a bug for this and we are looking into it.


Asset Ingestor gives error when using SFTP URL as source on Local AEM setup

Required Information
Local Configuration Details:

AEM 6.5 with Service Pack 6.5.6 and S3 integration
ACS AEM Commons Version 4.8.0
Local Test SFTP setup with Rebex Tiny SFTP Server, which is accessible over SFTP clients
Reproducible on Latest? yes (same behavior on ACS AEM Commons Version 4.8.4)

Expected Behavior
When I provide SFTP URL as the source in Asset Ingestor form and start the process, I expect the assets in the SFTP source to be imported into AEM DAM target folder.
Actual Behavior
Instead, the process shows the loader indefinitely and I observe the following in error.log:
21.09.2020 10:29:00.888 ERROR [0:0:0:0:0:0:0:1 [1600664340821] POST /apps/acs-commons/content/manage-controlled-processes/jcr:content.start.json HTTP/1.1] com.day.cq.wcm.core.impl.WCMDebugFilter Error during include of SlingRequestPathInfo: path='/apps/acs-commons/content/manage-controlled-processes/jcr:content', selectorString='start', extension='json', suffix='null'
java.lang.NoClassDefFoundError: javax/crypto/spec/SecretKeySpec
at acscommons.com.jcraft.jsch.jce.AES256CTR.init(AES256CTR.java:55) [com.adobe.acs.acs-aem-commons-bundle:4.8.0]
at acscommons.com.jcraft.jsch.Session.checkCipher(Session.java:2497) [com.adobe.acs.acs-aem-commons-bundle:4.8.0]
at acscommons.com.jcraft.jsch.Session.checkCiphers(Session.java:2474) [com.adobe.acs.acs-aem-commons-bundle:4.8.0]
at acscommons.com.jcraft.jsch.Session.send_kexinit(Session.java:624) [com.adobe.acs.acs-aem-commons-bundle:4.8.0]
at acscommons.com.jcraft.jsch.Session.connect(Session.java:307) [com.adobe.acs.acs-aem-commons-bundle:4.8.0]
at acscommons.com.jcraft.jsch.Session.connect(Session.java:183) [com.adobe.acs.acs-aem-commons-bundle:4.8.0]
at com.adobe.acs.commons.mcp.impl.processes.asset.FileAssetIngestor$SftpHierarchicalElement.openChannel(FileAssetIngestor.java:343) [com.adobe.acs.acs-aem-commons-bundle:4.8.0]
at com.adobe.acs.commons.mcp.impl.processes.asset.FileAssetIngestor$SftpHierarchicalElement.retrieveDetails(FileAssetIngestor.java:367) [com.adobe.acs.acs-aem-commons-bundle:4.8.0]
at com.adobe.acs.commons.mcp.impl.processes.asset.FileAssetIngestor$SftpHierarchicalElement.access$000(FileAssetIngestor.java:299) [com.adobe.acs.acs-aem-commons-bundle:4.8.0]
at com.adobe.acs.commons.mcp.impl.processes.asset.FileAssetIngestor.getBaseFolder(FileAssetIngestor.java:117) [com.adobe.acs.acs-aem-commons-bundle:4.8.0]
at com.adobe.acs.commons.mcp.impl.processes.asset.FileAssetIngestor.buildProcess(FileAssetIngestor.java:104) [com.adobe.acs.acs-aem-commons-bundle:4.8.0]
at com.adobe.acs.commons.mcp.impl.ProcessInstanceImpl.run(ProcessInstanceImpl.java:198) [com.adobe.acs.acs-aem-commons-bundle:4.8.0]
at com.adobe.acs.commons.mcp.impl.ControlledProcessManagerServlet.doStartProcess(ControlledProcessManagerServlet.java:152) [com.adobe.acs.acs-aem-commons-bundle:4.8.0]
at com.adobe.acs.commons.mcp.impl.ControlledProcessManagerServlet.doGet(ControlledProcessManagerServlet.java:97) [com.adobe.acs.acs-aem-commons-bundle:4.8.0]
at com.adobe.acs.commons.mcp.impl.ControlledProcessManagerServlet.doPost(ControlledProcessManagerServlet.java:84) [com.adobe.acs.acs-aem-commons-bundle:4.8.0]
Steps to Reproduce

Installed AEM 6.5 with latest Service Pack (6.5.6).
Configured to use AWS S3 as data store.
Installed ACS AEM Commons 4.8.0
Setup test SFTP on local using Rebex Tiny SFTP Server
Tested that the SFTP server is accessible from SFTP client (WinSCP)
Selected Asset Ingestor process in Managed Controlled Processes
Entered appropriate values in form and provided SFTP folder path in 'Source'.
Started the process.

Links
Links to related assets, e.g. content packages containing test components

Are you sure that you're not having DNS lookup issues?  I used SFTP locally when I wrote this tool and I cannot say I was having this kind of issue.

I am having the same issue ..
...
Caused by: java.lang.ClassNotFoundException: javax.crypto.spec.SecretKeySpec not found by com.adobe.acs.acs-aem-commons-bundle [592]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1597)
at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1982)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
...

What version of Java are you using?  Oracle JDK, OpenJDK, Azul, etc?
Depending on what you have installed you might not have the needed jce.jar in your sdk's lib folder.
For example:
https://www.oracle.com/java/technologies/java-archive-downloads-java-plat-downloads.html#JCE-1_2_2-G-JS
This is a likely solution but without knowing more about your environment I can't really say with 100% certainty.

We are using the Oracle JDK

Hello,
This issue is not resolved.
We are using Java 11.0.12 2021-07-20 LTS
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.12+8-LTS-237, mixed mode)
According to Oracle, we do not need policy files see
https://www.oracle.com/java/technologies/javase-jce-all-downloads.html
Current versions of the JDK do not require these policy files. They are provided here for use with older version of the JDK.
JDK 9 and later offer the stronger cryptographic algorithms by default.
The unlimited policy files are required only for JDK 8, 7, and 6 updates earlier than 8u161, 7u171, and 6u181. On those versions and later, the stronger cryptographic algorithms are available by default.


'java.io.File java.io.File.getParentFile()' error in android

Exception com.facebook.react.common.JavascriptException: Java exception in 'NativeModules' java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.File java.io.File.getParentFile()' on a null object reference, stack: com.RNFetchBlob.RNFetchBlobFS.getSystemfolders
any ideas what can it be ?

Same issue here, but only seen on one device so far on android 6.0.1.

+1

https://github.com/wkh237/react-native-fetch-blob/pull/557

I have the same issue

Same issue here

It looks like @chrusart created a PR with the fix 🎉
https://github.com/wkh237/react-native-fetch-blob/pull/619#issuecomment-357925638

@kelset #636 have this fix too and few other improvements and bugfixes, in production for 3 weeks now and fixed crashes didn't occur yet, no new ones appeared.

+1

@chrusart It seems like this repo is no longer maintained. Could you open a PR there? https://github.com/wkh237/react-native-fetch-blob/pull/636#issuecomment-375953433


Makefile: install rust and cargo autoload files

Fixes https://github.com/vim/vim/issues/14551, essentially https://github.com/vim/vim/commit/c8b6d4b37853b24c92d9166eb48636918b6e676e but for the Rust and Cargo folders.
/runtime/compiler/cargo.vim attempts to call cargo#quickfix#CmdPre() and cargo#quickfix#CmdPost() from runtime/autoload/cargo/quickfix.vim, but the autoload/cargo directory is not actually part of the distribution.
I tested with:
make unixall
cd dist/vim91
./configure --prefix=/throwaway
make
make install

Without the patch, the files were not in the resulting installation:
install-without-patch.tar.gz
With the patch, the files were there:
install-with-patch.tar.gz

CI failures appear unrelated:

GitHub CI / windows (HUGE, msvc, no, yes, x86) (pull_request):

curl: (28) Failed to connect to download.libsodium.org port 443 after 21021 ms: Couldn't connect to server

GitHub CI / macos (huge, macos-12) (pull_request):

-------------------------------
Executed:  6306 Tests
 Skipped:    88 Tests
  FAILED:     1 Tests

Failures:
	From test_channel.vim:
	Found errors in Test_channel_lsp_mode():
	Run 1, 10:23:09 - 10:23:20:
	command line..script /Users/runner/work/vim/vim/src/testdir/runtest.vim[607]..function RunTheTest[57]..Test_channel_lsp_mode[1]..RunServer[21]..LspTests line 117: Expected {'id': 15, 'jsonrpc': '2.0', 'result': 'delayed-payload'} but got {}
	Run 2, 10:23:22 - 10:23:32:
	command line..script /Users/runner/work/vim/vim/src/testdir/runtest.vim[642]..function RunTheTest[57]..Test_channel_lsp_mode[1]..RunServer[21]..LspTests line 117: Expected {'id': 15, 'jsonrpc': '2.0', 'result': 'delayed-payload'} but got {}
	Run 3, 10:23:34 - 10:23:45:
	command line..script /Users/runner/work/vim/vim/src/testdir/runtest.vim[642]..function RunTheTest[57]..Test_channel_lsp_mode[1]..RunServer[21]..LspTests line 117: Expected {'id': 15, 'jsonrpc': '2.0', 'result': 'delayed-payload'} but got {}
	Flaky test failed too often, giving up

I don't think I have permission to re-run them to see if they go away.

Yeah, that failing test is unrelated. Thanks!


Contact field for workshops is a list now (rather than a single value)

Contact field for workshops is a list now (rather than a single value) in workshop template so this needs to be supported in AMY too. Values get concatenated without a space, a comma or other separator when updating workshop data from a URL. For example see workshop with slug: 2017-06-21-qmul.

The cause of the problem is in the workshop template, not AMY. When generating <meta> tags, the template still assumes that contact is a single value rather than a list: see the template. So the values get concatenated by jekyll, not AMY. Have a look at the source code of the mentioned workshop and you can see:
<meta name="contact" content="rebecca.stewart<EMAIL_ADDRESS>/>

I believe we can still represent Event.contact as CharField if only we separate multiple emails with a comma or other separator. Let me know if you have different opinion.

@pbanaszkiewicz Can we address this in the changes to the Workshop Request form we've been discussing?

I think we can close this because we do have comma separated values in that list, and we can give someone an explicit role if needed.


Center loading indicator

Details

Loading indicator was not in the center of container on page addPersonalBankAccountPage and BankAccountStep .
We made it center using styles.flex1.
Fixed Issues

$ https://github.com/Expensify/App/issues/10362
Tests

Go to settings > Payments > Add payment method
Click on bank account

[x] Verify that no errors appear in the JS console

PR Review Checklist

Contributor (PR Author) Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

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

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product was added in all src/languages/* files
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] Any functional components have the displayName property
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

QA Steps

Login to valid account
Go to settings > Payments > Add payment method
Click on bank account

[X] Verify that no errors appear in the JS console

Screenshots

Web

addPersonalBankAccountPage:

BankAccountStep:

Mobile Web

addPersonalBankAccountPage:
https://user-images.githubusercontent.com/111683206/188496209-04af85a6-fb3b-45db-82ff-ae4d5a7abe5f.mp4
BankAccountStep:
https://user-images.githubusercontent.com/111683206/189186888-71d56095-3d87-4de8-ba9c-73b8aefac93c.mp4
Desktop

addPersonalBankAccountPage:

BankAccountStep:

iOS

addPersonalBankAccountPage:
https://user-images.githubusercontent.com/111683206/188496437-ef65a10c-4429-45a4-b3c2-174c7b2ae2f5.mp4
BankAccountStep:
https://user-images.githubusercontent.com/111683206/188940433-2ee1d00e-ccc6-4de8-a80d-6e83f50e5fcb.mp4
Android

addPersonalBankAccountPage:

BankAccountStep:

Also, the same issue could occur when adding a bank account via workspace. It should be handled there too!

Can you handle this also!

Also, the same issue could occur when adding a bank account via workspace. It should be handled there too!

Can you handle this also!

Yes sure, please suggest the page for adding a bank account via workspace. I am not getting an option to add a bank account in my workspace.

Find usages of AddPlaidAccount @varshamb

@Santhosh-Sellavel Done.

@Santhosh-Sellavel Done.

@varshamb Do you mind updating the screenshots to include both the updated views? Thanks!

@varshamb Still web & desktop videos are not updated,  can you update them properly?

Take this PR as an example, nothing from the app screen is cut off.

@Santhosh-Sellavel Is it really needed to update those screen shots, we used styles.flex1 on both pages, the screens which I have attached are slightly cropped from the bottom.
cc: @jasperhuangg

@Santhosh-Sellavel Is it really needed to update those screen shots, we used styles.flex1 on both pages, the screens which I have attached are slightly cropped from the bottom.
cc: @jasperhuangg

Actually, that's what @jasperhuangg has asked here to update.

@varshamb
Thanks! Looks like a few of your screenshots are slightly cut-off and don't display the indicator as centered. I'm checking out your PR now and verifying that everything looks good on my end, but please update those screenshots so that they display the loading indicator as centered vertically/horizontally, since that's what the issue calls for.

At least the RHN should be completely visible to ensure it's working fine on both platforms!

@Santhosh-Sellavel updated.

PR Reviewer Checklist
The Contributor+ will copy/paste it into a new comment and complete it after the author checklist is completed

[x] I have verified the author checklist is complete (all boxes are checked off).
[x] I verified the correct issue is linked in the ### Fixed Issues section above
[x] I verified testing steps are clear and they cover the changes made in this PR

[ ] I verified the steps for local testing are in the Tests section
[ ] I verified the steps for Staging and/or Production testing are in the QA steps section
[ ] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I checked that screenshots or videos are included for tests on all platforms
[x] I verified tests pass on all platforms & I tested again on:

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

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I verified proper code patterns were followed (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product was added in all src/languages/* files
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I verified that this PR follows the guidelines as stated in the Review Guidelines
[x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] Any functional components have the displayName property
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

@varshamb
Thanks for updating, mostly looks good just a couple more things.
Can you update the test steps for workspace  flow too?
Workspace Add Bank
Settings -> Workspace -> Connect Bank Account

@Santhosh-Sellavel Thanks for your inputs.
Both the 'Tests' & 'QA Tests' has been updated.

@jasperhuangg LGTM

🚀 Cherry-picked to staging by @francoisl in version: 1.2.0-3 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

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

Note: we had a conflict on the staging branch which ended up needing to be manually fixed, so this PR doesn't automatically appear in the diff between production and staging - so I'm manually adding the note that it was CPed to staging here.


[cgroups2] Error if --cgroups_limit_swap is used when cgroups v2 is used.

Mesos does not support limiting swap memory when using cgroups v2. This is because the cgroups v2 API does not allow us to directly control the swap memory usage limit.  Rather, we can only control the combined swap and RAM usage limit.
Therefore, when the --cgroups_limit_swap flag is provided and cgroups v2 is used we error during flag validation.

This is because the cgroups v2 API does not allow us to directly control the swap memory usage limit. Rather, we can only control the combined swap and RAM usage limit.

This doesn't sound accurate? in v2 we are able to separately control swap usage

This is because the cgroups v2 API does not allow us to directly control the swap memory usage limit. Rather, we can only control the combined swap and RAM usage limit.

This doesn't sound accurate? in v2 we are able to separately control swap usage

It's the opposite - v1 combines RAM and swap and v2 gives direct control over both; you're right :)


[BUG] App is not running with PM2 in cluster mode (more than 1 instance)

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
Example config
const maxMemoryPerInstance = process.env.PLATFORM_RAM ? Math.ceil(parseInt(process.env.PLATFORM_RAM) / process.env.PLATFORM_CPU) : 128;

module.exports = {
  apps: [
    {
      name: "frontends",
      script: "npm run start",
      cwd: '/app',
      instances: process.env.PLATFORM_CPU || 1,
      exec_mode: "cluster",
      max_memory_restart: `${maxMemoryPerInstance}M`,
      node_args: `--max_old_space_size=${maxMemoryPerInstance}`,
      env: {
        NODE_ENV: "production",

      },
    },
  ],
};

Other instances get killed because of Port already in use. With using node .output/server/index.mjs it works in cluster mode but as I am using the .env file for storing the credentials it then complains that it does not know the enpoint.

Expected Behavior
No response
Steps To Reproduce
No response
Environment
- OS:
- Node:
- pnpm:

Anything else?
No response

The problem was related to the .env configuration


Fix bugs

close https://github.com/iterative/gto/issues/298
close https://github.com/iterative/gto/issues/285
close https://github.com/iterative/gto/issues/274

Codecov Report
Base: 86.61% // Head: 86.45% // Decreases project coverage by -0.15% :warning:

Coverage data is based on head (f5e5417) compared to base (0600c0e).
Patch coverage: 86.01% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #324      +/-   ##
==========================================
- Coverage   86.61%   86.45%   -0.16%
==========================================
  Files          18       18
  Lines        2069     2104      +35
==========================================
+ Hits         1792     1819      +27
- Misses        277      285       +8

Impacted Files
Coverage Δ

gto/base.py
87.53% <ø> (-0.29%)
:arrow_down:

gto/index.py
87.41% <62.06%> (-3.98%)
:arrow_down:

gto/exceptions.py
73.60% <80.00%> (+0.04%)
:arrow_up:

gto/registry.py
90.08% <83.33%> (+0.54%)
:arrow_up:

gto/api.py
94.92% <90.00%> (+2.44%)
:arrow_up:

gto/cli.py
82.56% <90.47%> (+2.04%)
:arrow_up:

gto/config.py
95.34% <100.00%> (-0.45%)
:arrow_down:

gto/constants.py
100.00% <100.00%> (ø)

gto/tag.py
89.79% <100.00%> (-2.05%)
:arrow_down:

... and 8 more

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

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


Indexing with quantified coordinates

It seems not possible to index an array with quantified coordinates; see the example below.
import pint
import pint_xarray
import xarray as xr

unit_registry = pint.UnitRegistry(force_ndarray_like=True)
Q_ = unit_registry.Quantity

y = xr.DataArray(name="y", data=[1, 2], coords={"x": [1, 2]})
yq = y.pint.quantify({"y": "km", "x": "s"})
yq.loc[Q_(1, "s")]  # UnitStrippedWarning
yq.loc[Q_(1000, "ms")]  # KeyError

The line yq.loc[Q_(1, "s")] will raise a  UnitStrippedWarning and the line yq.loc[Q_(1000, "ms")] will give the same warning and then raise a KeyError.
Should one just avoid using quantified coordinates? Or are there plans to enable indexing with quantities?

you have two choices here:

use pint-xarray's versions of loc / sel: yq.pint.loc[{"x": Q_(1, "s")}] or yq.pint.sel(x=Q_(1, "s"))
install pint-xarray from main and try out the new PintIndex. This would mean that your mostly just works (but I've not been able to test this as much as I would have liked, so any feedback would be appreciated)


Is it possible to pass values to attributes of the html element?

Hi there,
I have a situation where I want to pass the source data to the attribute of the element. Is this possible with the engine?
For example, if the model has some base64 string, that I want to pass to the Image source, is is possible?
Model.SomeImage= "base64stringofimage"
Template:
<img src="{{Model.SomeImage}}" />

From Scriban's point of view SomeImage is just a string, so this should work just fine. You just need to register you model with Scriban: https://github.com/lunet-io/scriban/blob/master/doc/runtime.md


[7.00a1] Shapes and window resolution

The shape preview scaling changes depending on window size. Two image links below show the same shape preview at two different resolutions.
https://imgur.com/a/hhGfZ
https://imgur.com/a/fThrz
PS: How do you move the shape preview? LClick allows rotation. MWheel zooms but I can't shift/recenter the shape with the expected RClick. Thanks.

Yes I'm aware of that. Note that this is easy to correct by adjusting the offset in game with the mouse


add infinity retry option

In some cases, infinite retries are useful.

@Ljzn Thanks! Having infinity option does makes sense :)
Please take a look at Travis CI output - one build has failed because the code is not formatted.
Also, we need to provide some tests for :infinity

Hey @Ljzn, how's going? :)

@Ljzn ping ping

#222


More Language Support Needed!

Hi, I really don't know how to express my admiration to this awesome project. It is not an easy thing for my blog readers to understand the code explicitly unless they get the chances to try themselves, and your project Elaina makes the chances within reach in just a few steps.
I'd call it a masterpiece, but it also troubles me that Elaina now supports only 4 languages. I don't know if it's possible in near future that Elaina supports Java, C++, or even SQL? Libraries and modules installation are urgent needed too, e.g.， numpy and scipy for Python.
Thank again for the excellent project.

haha i need too


Contact American Airlines Customer Service +1-833-730-7587

Aka.ms link name
https://hpdcrmportal.dynamics365portals.us/forums/general-discussion/2a02715e-cf4d-ef11-b4ad-001dd80afa97
Category (Optional. Select None to auto-select)
learn

Travel plans can sometimes be complicated by errors or changes in personal information. One common issue travelers face is the need to change the name on their airline ticket. Whether due to a simple typo or a significant life event such as marriage or divorce, correcting the name on a ticket is essential to ensure a smooth travel experience. This guide will walk you through the process of changing your name on an American Airlines ticket or call +1-833-730-7587, providing you with a thorough understanding of the airline’s policies and procedures.
American Airlines Name Change | +1-833-730-7587 | Fees&Rules
What is American Airlines Name Change Special Policy (Fees and Rules) · HPD Enforcement Desk (dynamics365portals.us)
What is American Airlines Name Change Special Policy (Fees and Rules) · HPD Enforcement Desk (dynamics365portals.us)
What is American Airlines Name Change Special Policy (Fees and Rules) · HPD Enforcement Desk (dynamics365portals.us)


Pihole Query Log -  Error in 'lookup' command:

Describe the bug
Seeing "Error in 'lookup' command: Could not construct lookup 'pihole_dhcp_lease_lookup, dest_ip, as, src, OUTPUTNEW, dest_nt_host, as, Hostname'. See search.log for more details." in the Queries by Source over Time and Blocked Queryies by Source over Time panels on the Pihole Query Log.
To Reproduce
Steps to reproduce the behavior:

Go to Pi-hole DNS App for Splunk
Click on Pihole Query Log
See error

Expected behavior
Panels showing information as described by panel title.
Screenshots

Version (please complete the following information):

Splunk Version: 8.2.0
pihole_dns_app Version: 2.2
Pi-hole Version: Pi-hole v5.3.1 Web Interface v5.5 FTL v5.8.1

No enrichment data is being used.  The data is exported from the Pi-hole server to two flat files (for pihole and pihole:ftl) on the Splunk server via rsyslog.  Splunk is using the flat files as a data inputs and setting the sourcetypes, index to dns, and app to TA-pihole_dns.  This was working on Splunk 8.1.2 with the previous versions of the addon and app.

I will run some tests and get back to you.
Does this error only occur on this dashboard? Or do also see this error on the Pihole Overview dashboard on the bottom two panels (Top 10 sources & Top 10 Blocked Queries)?

The two panels on the overview dashboard are showing the error described in issue #38

I've been unable to replicate this issue on my development instances so far, but I will keep attempting. In the meantime, will you provide me the following information:

Run the following command in Splunk web and let me know if there are any errors:
| inputlookup pihole_dhcp_lease_lookup

You should see something similar to this (0 output with no errors):

Let me know if you see an output with errors.

Check the privileges of the lookup. Navigate to Settings > Lookups > Lookup Definitions.

Search for the pihole_dhcp_lease_lookup - The permissions should be global:

Quick Fix
A quick fix could be editing the SPL of the panels that are affected and comment out the line | `pihole_enrich_hostname(src)`  with three back ticks on both sides.
i.e.
``` | `pihole_enrich_hostname(src)` ```

I Look forward to your feedback and let me know if the quick fix works for you for the time being.

So it looks like this was an underlying issue with an expired certificate causing the KV store process to crash.  I fixed that and almost everything works now (except for that thing with issue #38).


Update README.md

Added my name and my github url
Related issue

What changes does this PR do?
Screenshots (If any)
Questions

It's great contributing🥰

Yeah sure it dose


VirtualDirectory.serveFile should return a Future

Originally opened as dart-lang/sdk#16924
This issue was originally filed by<EMAIL_ADDRESS>
VirtualDirectory.serveFile of http_server library should return a Future that completes when the file has been successfully served.
It is a small change, so I made a CL: https://codereview.chromium.org/171363006

<img src="https://avatars.githubusercontent.com/u/17034?v=3" align="left" width="48" height="48"hspace="10"> Comment by kevmoo

cc @skabet.
Removed Type-Defect label.
Added Type-Enhancement, Pkg-HttpServer, Area-Pkg, Triaged labels.


Arithmetic elaboration design decisions

There are many design decisions to be made regarding how basic arithmetic is defined and elaborated. Examples (*s next to my strong preferences):

<Nat> - <Nat>

Nat.sub
[*] Int.sub (and use e.g. ∸ for Nat.sub)

<Nat|Int> / <Nat|Int>

<Nat|Int>.div
[*] Rat.div (and use e.g. // for <Nat|Int>.div)

How should Int.div behave? (see https://en.wikipedia.org/wiki/Modulo_operation#Variants_of_the_definition)

truncated division
euclidean division
floored division

How should Int.mod behave?

determined by Int.div (i.e. so that a = nq + r)

How should <Real> ^ <Nat|Int> be elaborated?

Real.pow
Real.<nat|int>Pow
unimportant, since they are provably equal and noncomputable

Please post comments or additional design decisions.

I guess someone has to write the answer expected from mathematicians, so let me do it: of course we expect 2 - 3 to be -1 instead of 0 and 1/2 to a rational number instead of 0. This is especially important for beginners and when teaching. Basically I never use natural numbers and integers in my teaching with Lean because of this issue.
But I've spent enough time using Lean to know that this issue is much more subtle than what we naively think, and there would be drawbacks if we choose the natural way instead of the rigid way. So I'll be happy to use whatever seems good to the Lean 4 team.

I fully support @dselsam' strong preferences, i.e.: - defaulting to Int.sub for Nat and / defaulting to Rat.div for Int and Nat along with addition of // and ∸ for the explicitly homogeneous cases.
I do think computer science is one of the places where 1/2 = 0 can be reasonably desired. However, many programming languages have moved towards // for denoting integer division, and I think that is a good idea for Lean to follow. This is especially true in Lean as it is often of use to people outside of computer science who (reasonably, I think) expect division and subtraction to work like they do normally.

many programming languages have moved towards // for denoting integer division

@tydeu Could you please list other programming languages using //?

∸ for the explicitly homogeneous cases

The \\ is defensible, but ∸ looks quite exoteric for a programming language.

Here are a few languages that don't use / for integer division:

Python: //
Julia: ÷
Haskell: div (no notation)

The // is defensible, but ∸ looks quite exoteric for a programming language.

I would agree. I am not particularly in love with ∸. I would prefer an ASCII operator, which is what I generally expect in a normal programming language. I do not have a good idea for one, though. Also, given the current abundance of Unicode (and, particularly, Unicode-only) notation in Lean already, I don't think it is too exoteric for Lean.
Furthermore, I doubt it will be used all that much -- especially if homogenously typed operations already default - to it --- then it will only be used when homogenous subtraction (for Nat) is desired but the resulting type is unknown (which I suspect to be very rare).

I think that all of the choices presented here so far are defensible, and have been successfully used in some language before.  (One notable example that hasn't been mentioned so far is scheme, which does not even have truncating subtraction and integer division is truncate/.)
What I believe is more important than the semantics of the operations is that the elaborated terms are predictable and work well with the rest of the system.
For example, instances like [CoeHTCT α β] [Add β] : HAdd β α β cause rw to fail:
variable (z : ℤ) (y y₁ y₂ : ℂ)
axiom Complex.add_comm : y₁ + y₂ = y₂ + y₁
example : y + z = y :=
  by rw Complex.add_comm
/-
tactic 'rewrite' failed, did not find instance of the pattern in the target expression
  ?y₁ + ?y₂
z : ℤ
y y₁ y₂ : ℂ
⊢ y + z = y
-/

I like the idea of m-n being an Int, but I would also like common uses of arithmetic to be uncluttered.
For example, here are some array indexing examples that may be good to consider
def a : Array Nat := [1,2].toArray

def n : Nat := 2
def i : Int := 2

-- Desired Output: 11
-- No errors
#eval a[n-1]
-- Desired Output: 11
-- No errors
#eval a[i-1]
-- Desired Output: 0
-- Error: index out of bounds
#eval a[n-3]
-- Desired Output: 0
-- Error: index out of bounds
#eval a[i-3]
-- Desired Output: 11
-- No errors
#eval a[(i-3)+3]

I'm in favor of having Nat subtraction returning an Int, but also using Nat less often in general -- particularly for arguments where you may want to do arithmetic such as array indices.
On the separate topic of what array indices should be, I think having negative indices such as a[-1] implicitly denote a[a.length - 1] is error prone.  MATLAB would let one code write something like a(end - 1) for that, but coding that up in Lean would require a custom index type for array indices, and that itself introduces some complexity.

Discussed with Leo earlier today and will attempt to summarize our discussion:

He is not concerned about https://github.com/leanprover/lean4/issues/433#issuecomment-831928888 since we can normalize these expressions to their @HAdd α α α versions, as a preprocessing step in automation or as a standalone pass before manual rewriting.
Most people seem to agree that it is not acceptable to require programmers to use ∸ for indexing arrays since this is ubiquitous in many programming tasks.
He does not want Int-based array lookups, for many reasons including that (a) we would probably need a new type for proofs (e.g. Int.Fin n) and (b) Rust uses usize.
Most people seem to agree that silently-truncating subtraction is particularly bad in math domains.
In light of the above, it seems to make sense to support both subtraction idioms. Specifically, it seems okay for Init to define - as Nat.sub, since we can create higher-priority notations downstream (either within scopes or not).

We didn't discuss div or Pow, but I'll venture a guess that // is acceptable for truncating division (citing Python) and that a 2-parameter Pow (as @gebner suggests) is fine.

In a couple ways, usize is a more convenient type for array lookups than Nat.

It doesn't introduce a dependency on GMP.
It is non-saturating and still forms a group.

I don't know if this issue is particularly critical, and the solution of just using Nat.sub is almost certainly fine.  I do think it'd be a shame if different packages couldn't agree on the Nat subtraction though as it's another source of information that people have to remember when switching between packages.

I don't see a perfect solution for this issue.
I am curious about this claim

Most people seem to agree that silently-truncating subtraction is particularly bad in math domains.

I am wondering what kind of problems Mathlib developers had with the current Nat.sub and Nat.div.
They have been using them for a few years. @PatrickMassot mentioned he would be happy if we continue using in Lean 4 the definitions we used in Lean 3 for these two functions.
@dselsam You mentioned the current definitions created a nasty problem when you were formalizing IMO problems. Could you please post the issue here?

Here is one example.
[JBMO ShortLists 2019 N3]: Find all prime numbers p and nonnegative integers x≠y such that x^4 - y^4 = p * (x^3 - y^3).
The problem is significantly easier with Nat.sub:
example :
  let (p, x, y) := (2, 1, 2)
  x^4 - y^4 = p * (x^3 - y^3) := rfl

@dselsam What about using Int instead of Nat when formalizing IMO problems? When the problem says x is a nonnegative integer, we just add the hypothesis x >= 0.

There was one other minor issue I haven't seen mentioned with use of Nat and Nat.sub -- namely conversion to SMTLIB or other constraint solving formats.  I'm not sure how much of an issue this will be in Lean, but it was a minor issue in Galois' symbolic simulation tools.
Our what4 library used to supported Nat as a primitive, and our approach was to map Nat variables to SMTLIB integers, but assert the integer was non-negative in the appropriate places.   Unfortunately, encoding Nat.sub introduce a mux (e.g., Nat.sub x y maps to x >= y ? x - y : 0).
These additional muxes can often be eliminated through rewriting/abstract interpretation, but if like one say symbolically simulated a Lean expression to reduce it to SMT, the extra muxes can make problems harder than if Int was used throughout.
We've since removed primitive support for Nat values in what4 and now require languages encode the logic they need more directly.   It's preferable in my opinion if people only use Nat when they really want that semantics.

@leodemoura I would be happy to always use Int, but many number concepts in Mathlib are only defined for Nat, e.g. prime. In another problem, it was useful to use Fin n for similar reasons (i.e. because it exists and there is no Int-based alternative), but then I hit a Nat.sub issue after projecting to the vals.

many number concepts in Mathlib are only defined for Nat, e.g. prime

How many concepts would you have to lift from Nat to Int?

In another problem, it was useful to use Fin n for similar reasons (i.e. because it exists and there is no Int-based alternative), but then I hit a Nat.sub issue after projecting to the vals.

Couldn't we just define Fin.toInt and use .toInt instead of .val?

Another interesting design decision concerns the placement of coercions (which is now different than how it used to be in Lean 3):
-- Is this `a + Int.ofNat (b - c)` or `a + (Int.ofNat b - Int.ofNat c)`?

def f (a : Int) (b c : Nat) : Int :=
  a + (b - c)

#eval f 1 2 3

This is another argument against the CoeHTCT → HAdd instances, which sweep the coercions under the rug.  Even if you #print f you can't see where the coercion happens.
(The same issue arises with the coercion Fin n → Nat, so this is not specific to truncating subtraction on natural numbers.)

I think that all of the choices presented here so far are defensible, and have been successfully used in some language before. (One notable example that hasn't been mentioned so far is scheme, which does not even have truncating subtraction and integer division is truncate/.)
What I believe is more important than the semantics of the operations is that the elaborated terms are predictable and work well with the rest of the system.
For example, instances like [CoeHTCT α β] [Add β] : HAdd β α β cause rw to fail:
variable (z : ℤ) (y y₁ y₂ : ℂ)
axiom Complex.add_comm : y₁ + y₂ = y₂ + y₁
example : y + z = y :=
  by rw Complex.add_comm
/-
tactic 'rewrite' failed, did not find instance of the pattern in the target expression
  ?y₁ + ?y₂
z : ℤ
y y₁ y₂ : ℂ
⊢ y + z = y
-/

This issue has been fixed.

Another interesting design decision concerns the placement of coercions (which is now different than how it used to be in Lean 3):
-- Is this `a + Int.ofNat (b - c)` or `a + (Int.ofNat b - Int.ofNat c)`?

def f (a : Int) (b c : Nat) : Int :=
  a + (b - c)

#eval f 1 2 3

This is another argument against the CoeHTCT → HAdd instances, which sweep the coercions under the rug. Even if you #print f you can't see where the coercion happens.
(The same issue arises with the coercion Fin n → Nat, so this is not specific to truncating subtraction on natural numbers.)

Lean 4 is now putting the coercions on the leaves like Lean 3.

Is there any chance to get rid of absurd equalities such as (1 : Rat) / (0 : Rat) = (0 : Rat)?
I think the only path forward for provers is to take proof objects as arguments in this situations. I. e. (a : Rat) / (b : Rat) should expand to, say, low_level_div a b (by decide), where low_level_div has type (a b : Rat) -> (b ≠ 0) -> Rat.
Similarly head should take proof object stating that the list is not empty, etc

Consider this Rust code:
fn f(a: i32, b: i32) -> i32 {
    return a / b;
}

If we try to check this code using Prusti ( https://github.com/viperproject/prusti-dev ), Prusti will reject this code, saying '[Prusti: verification error] assertion might fail with "attempt to divide by zero"'.
Similar Lean code compiles successfully, because Lean thinks that 1 / 0 = 0.
How this happened that Lean is worse than Rust/Prusti?!

@safinaskar Recommended reading: https://xenaproject.wordpress.com/2020/07/05/division-by-zero-in-type-theory-a-faq/

many programming languages have moved towards // for denoting integer division

@tydeu Could you please list other programming languages using //?

I just realized I never answered this question. After doing some research, using // is less than I for some reason thought. The only significant language using // is Python (I don't know why I had the impression that I had seen other languages that also used //).
One disadvantage of // for truncated division is that the parallel operator of -- cannot be used in Lean for truncating subtraction. Alternatively, in my research into languages using //,  I discovered that Dart uses ~/and  R uses %/% for truncating division. These styles have the advantage that the parallel operator for truncate subtraction could be defined in Lean (i.e., ~- or %-%, respectively). Of the two, I favor Dart's style as the R's introduces the a potential for confusion with the modulo operator (%) which seems undesirable.

@digama0
The division in its current form is irregular and unnatural. (I'm still about 1/0 = 0).
Lean division is worse than division in most programming languages, where you get runtime error. In Lean you simply silently get 0.
Well, I agree that currently provers do "1/0=0", that this is how everybody does today. But this should not stop us from seeking for better ways, right? Yes, it seems that currently we cannot simply add proper division (i. e. (a b : Rat) -> (b ≠ 0) -> Rat) to Lean, because dealing with such division will be too difficult. But we can make dealing with such division to be not so difficult! We can work hard making Lean automatically infer needed equations (i. e. automatically proving that b = 0 without user noticing). Possibly something similar to inferring of instances (you don't need explicitly to pass instances around).
I want Lean not to stick with what "everybody does", but to explore innovative ways

@safinaskar I encourage you to bring this up on zulip (https://leanprover.zulipchat.com/) if you would like to debate this further. This issue is not the place for it.


Update for accessible payment icons

What are you trying to accomplish with this PR?
Fixes #86. The output for the payment icons in the footer now look like:

Sweet, I like the idea - I added the changes based on your feedback.


[Autocomplete] startAfter custom filter only works with freeSolo prop is set to true

The Autocomplete startAfter custom filter works only with the option freeSolo otherwise the Popper is shown with noOptionText until the minimum number is hit.

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
Showcase example with freeSolo
https://codesandbox.io/s/material-demo-e7oxj
Showcase example without freeSolo which seems buggy to me:
https://codesandbox.io/s/material-demo-t3my2
Expected Behavior 🤔
startAfter should work with or without freeSolo prop. It took me very long time to figure this out. Maybe otherwise it should be documented if this is the intended behaviour. Thanks!

Tech
Version

Material-UI
v4.9.10

React
latest

Browser
latest

TypeScript
latest

@dohomi Interesting, this sounds like a good reason to remove the startAfter option and to leave it to userland (custom filter + custom open/close logic).

@oliviertassinari custom filter + open prop on autocomplete sounds reasonable.

@dohomi Thanks for the confirmation :). It feels that frequency of the use case vs the added logic in the core doesn't worth it.

@oliviertassinari maybe it can be a feature to keep and skip only in free solo mode, what do you think?

I have never really understood the motivation for the prop in the first place. It feels like a logic you put in place to save requests to the backend API, not something you do to help users. I would be in favor of keeping the autocomplete simple.

If you want i can make a PR to remove the change

@marcosvega91 No objection from my side 😬

@marcosvega91 the startAfter option works flawlessly on freeSolo. It would be a bummer if you revert the change without making it possible to get the same result in any other way

@dohomi You can implement the same behavior by controlling the open state.
We have a usability issue when freeSolo={false} too. We don't give any feedback to the users that he needs to enter at least x chars. I think that in an acceptable version, we would get a "Need x more characters"  to trigger the options.

@oliviertassinari ok yeah - maybe best would be a demo example and leave it by the developer

@dohomi You can implement the same behavior by controlling the open state.
We have a usability issue when freeSolo={false} too. We don't give any feedback to the users that he needs to enter at least x chars. I think that in an acceptable version, we would display a "Need x more characters" message to guide the end-users. I think that it's better to leave it as a customization example.

It sound's good but you need to change the behaviour of createFilterOptions because you need to access in some way to startAfter params inside useAutocomplete hook


Create test.md

@Banani-Rath,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

azureps-cmdlets-docs/ResourceManager/Azure.Storage/v3.4.0/test.md
:white_check_mark:Succeeded

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


Investigate node v0.10 vs node v0.12. issue

@soundanalogous reported here

Also had to use node v0.10 instead of node v0.12.

When using node v0.12 I get the following error:
soundanalogous:eg soundanalogous$ node blink-johnny-five.js
It looks like serialport didn't compile properly. This is a common problem and its fix is well
documented here https://github.com/voodootikigod/node-serialport#to-install

/Users/soundanalogous/Documents/Dev/Firmata/etherport/node_modules/firmata/lib/firmata.js:28
  throw "Missing serialport dependency";
  ^
Missing serialport dependency

Which is strange because I should not be using the serialport when using Ethernet. I tried node install serialport per the instructions on the node-serialport page for this issue, but that made no difference. Switching back to node v0.10 made the error go away.

Which is strange because I should not be using the serialport when using Ethernet

Firmata.js has already done require("serialport") by the time it knows that user code is providing its own transport.

Switching back to node v0.10 made the error go away.

Which is really strange.

I just ran a few tests with node 0.12.x and encountered this issue, but it was resolved with a fresh npm install


More fixes towards v1.0

Some more fixes to move us towards being able to assemble all the currently skipped examples from the binutils-esp32ulp test suite (to resolve #49).
This PR contains a few fixes - felt it was easier to send them as one PR, than 1 PR per commit.
The commits are independent of each other and can be reviewed one by one. They contain commit messages explaining what they each fix. Each commit also has a reference to the issue it fixed in the relevant binutils-esp32ulp test.
The last commits enables the tests that can now pass because of the fixes. 2 more files to go.

I have added the changes as new commits this time.
I will leave the JUMP instruction's SYM vs IMM handling as it is now, because as I described in one of the comments, I believe the "special case" I saw in one of the remaining test scripts from binutils-esp32ulp, is a bug in their implementation.
So after this PR is merged, there is only 1 more issue I think (I will create a new PR after this one is merged) before we can pass all the skipped bintutils-esp32ulp tests. (There are some cases I don't think we should cater for, or that we could discuss how to cater for, but I will describe that in the next PR).

Merged, thanks!


[TEST] Implement test case test_csi_volumesnapshot_backing_image_basic

What's the test to develop? Please describe
Currently test case test_csi_volumesnapshot_backing_image_basic have skeleton only, need to implement test script.
Describe the items of the test development (DoD, definition of done) you'd like

[x] Implement and verify in pipeline

Additional context
N/A

Test case worked well on master (AMD64, ARm64), v1.5.x(AMD64, ARM64) pipeline


Use file hash instead of modification time to overwrite photo data in json file

First, thank you for this. I needed a photo gallery and stumbled across this after seeing a lot of overcomplicated and bloated solutions. This one is perfect.
After creating a gallery and adding captions to the json file, i did some file operations including some copies and some git operations on my photos. I am not sure what caused it but at some point the mtime changed on my photos and now when I regenerate my gallery it erases all my captions in the json file.
First, is there a way to regenerate and not have this happen (keep existing captions)?
Second, I suggest a better way to track whether the photo changed is to save hash of photo files and compare that instead of modification date.
Thank you.

I am now working on this issue on branch feature/filehash.


List of Projects

Create a list of projects and short project descriptions for the afternoon session.

[ ] LROSE wind tools  + PyDDA retrieval over complex terrain #52
[ ] #6
[ ] QPE exercise in the north of Italy (pyrad + Py-ART) #51
[ ] Creating analysis-ready data with xradar with QVPs (xradar) #53

LROSE wind tools retrieval over complex terrain

For Pyrad we are planning a QPE exercise in the north of Italy

To keep track of https://github.com/openradar/erad2024/issues/6 progress and discussions, follow the corresponding issue.

Once we have #104 and #105 here, I can put together a PR adding in the project page 👍
That should close some of these PRs... and then we can cut a release which would close #78


Catch validation exceptions in the router

I don't remember what I thought when I created this issue, but I'm pretty sure this isn't the way I want to do it anymore. Will look into it later


[microNPU] increase workspace sizes for network tests

The network tests with striping were reported to be flaky.
This commit increases the workspace size to be generous and
also repeats the test case to make sure its not flaky.

cc : @masahi

Thanks for the quick fix!


Add "freezed" feature to codegen

Before reporting a bug, please test the beta branch!
Bug description
For now it's pretty hard to use generated classes from "union" type;
For example now, to identify object and use it's field i need to use this construction:
query xxx {
   sometype: {
      ...on X {
         onlyXField
      }
      ...on Y {
         onlyYField
      }
      ...on Z {
         onlyZField
      }
   }
}

if (parsedObject is X) {
   return x.onlyXField;
}
if (parsedObject is Y) {
   return y.onlyYField;
}
if (parsedObject is Z) {
   return z.onlyZField;
}

// unsupported type
return error;

and if i use mixin (fragments inside queries), then i'd have to:
if (parsedObject is X) {
   return (x as XMixin).onlyXField;
}
if (parsedObject is Y) {
   return (y as XMixin).onlyYField;
}
if (parsedObject is Z) {
   return (z as XMixin).onlyZField;
}

// unsupported type
return error;

with "freezed" it would be something like this:
x.map(
   X: (it) => it.onlyXField,
   Y: (it) => it.onlyYField,
   Z: (it) => it.onlyZField,
)

Just came here to request the exact same thing then saw it top of the list. On our project we use unions to model the possible error results from a mutation or query so we pretty much have a union on every single operation. We use freezed for the rest of the app so currently we map the result types into a freezed union as soon as we get the result back.

This is a request I have as well. I'm using the Riverpod / Freezed architecture and this is my query / state example.
query GetMode($model: String!, $serial: String!, $language: String!) {
    getMode(model: $model , serial: $serial, language: $language) {
        ... on ModeResponse {
            enable
            modified_at
        }
        ... on Failure {
            failure
            detail
        }
    }
}

@freezed
class ModeState with _$ModeState {
  const factory ModeState({
    GetMode$Query$GetMode$Failure? failure,
    GetMode$Query$GetMode$ModeResponse? data,
    @Default(false) bool loading,
  }) = _ModeState;

  const ModeState._();
}

And I'm conditionally setting state via StateNotifier based on the type response. Would be sweet if this could be automatic somehow. Not sure how that would work. Example:
// Copy result to state (UNION CONDITIONAL STATE)
final resultData = result.data?.getMode;
if (resultData is GetMode$Query$GetMode$Failure) {
  state = state.copyWith(failure: resultData, data: null);
} else if (resultData is GetMode$Query$GetMode$ModeResponse) {
  state = state.copyWith(failure: null, data: resultData);
} else {
  state = state.copyWith(failure: null, data: null);
}


iosApp build problem

I keep getting:
Cannot access 'kotlin.AutoCloseable' which is a supertype of 'com.triple.pokemon.presentation.overview.PokemonOverviewViewModel'. Check your module classpath for missing or conflicting dependencies

When make a simple ViewModel, what is going wrong?
I'm using version 1.4.2 with compose multiplatform 1.4.0

Which version of Kotlin you're using for your project? kotlin.AutoCloseable requires Kotlin 1.8.20.

close as inactive


pip install -e fails on version 50: command class <class 'setuptools.command.egg_info.egg_info'> must subclass Command

> pip install -e .
    ERROR: Command errored out with exit status 1:
     command: /Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/jaykarimi/Documents/vanir/setup.py'"'"'; __file__='"'"'/Users/jaykarimi/Documents/vanir/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info
         cwd: /Users/jaykarimi/Documents/vanir/
    Complete output (19 lines):
    /Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/lib/python3.6/site-packages/_distutils_hack/__init__.py:30: UserWarning: Setuptools is replacing distutils.
      warnings.warn("Setuptools is replacing distutils.")
    /Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/lib/python3.6/site-packages/setuptools/dist.py:452: UserWarning: Normalizing 'v1.7.1' to '1.7.1'
      warnings.warn(tmpl.format(**locals()))
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Users/jaykarimi/Documents/vanir/setup.py", line 127, in <module>
        setup(**_conf)
      File "/Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/lib/python3.6/site-packages/setuptools/_distutils/core.py", line 134, in setup
        ok = dist.parse_command_line()
      File "/Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/lib/python3.6/site-packages/setuptools/_distutils/dist.py", line 484, in parse_command_line
        args = self._parse_command_opts(parser, args)
      File "/Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/lib/python3.6/site-packages/setuptools/dist.py", line 903, in _parse_command_opts
        nargs = _Distribution._parse_command_opts(self, parser, args)
      File "/Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/lib/python3.6/site-packages/setuptools/_distutils/dist.py", line 548, in _parse_command_opts
        "command class %s must subclass Command" % cmd_class)
    distutils.errors.DistutilsClassError: command class <class 'setuptools.command.egg_info.egg_info'> must subclass Command
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Minimal reproducing example setup.py
import setuptools
import pip
setuptools.setup()

So seems related to https://github.com/pypa/setuptools/issues/2365, though the symptoms are different

Since v50 we also get this error when installing open source package doit from its TGZ package (logs from a Windows machine, same error on Linux):
(venv) λ pip --no-cache-dir install doit
Looking in indexes: https://artifactory.cc.bmwgroup.net/artifactory/api/pypi/ic-gen5-pypi/simple
Collecting doit
  Downloading https://artifactory.cc.bmwgroup.net/artifactory/api/pypi/ic-gen5-pypi/packages/packages/1f/89/b5e1dd4854b47c4f9e5250899c04e0cd0c9082c30ef619c0413ace20cf7a/doit-0.32.0.tar.gz (1.4 MB)
     |████████████████████████████████| 1.4 MB 1.7 MB/s
    ERROR: Command errored out with exit status 1:
     command: 'd:\temp\doit-install-issue\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\q199925\\AppData\\Local\\Temp\\pip-install-by7x_6ei\\doit\\setup.py'"'"'; __file__='"'"'C:\\Users\\q199925\\AppData\\Local\\Temp\\pip-install-by7x_6ei\\doit\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\q199925\AppData\Local\Temp\pip-pip-egg-info-fhnoqhon'
         cwd: C:\Users\q199925\AppData\Local\Temp\pip-install-by7x_6ei\doit\
    Complete output (17 lines):
    d:\temp\doit-install-issue\venv\lib\site-packages\_distutils_hack\__init__.py:30: UserWarning: Setuptools is replacing distutils.
      warnings.warn("Setuptools is replacing distutils.")
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\q199925\AppData\Local\Temp\pip-install-by7x_6ei\doit\setup.py", line 44, in <module>
        setup(name = 'doit',
      File "d:\temp\doit-install-issue\venv\lib\site-packages\setuptools\__init__.py", line 152, in setup
        _install_setup_requires(attrs)
      File "d:\temp\doit-install-issue\venv\lib\site-packages\setuptools\__init__.py", line 145, in _install_setup_requires
        dist.parse_config_files(ignore_option_errors=True)
      File "d:\temp\doit-install-issue\venv\lib\site-packages\setuptools\dist.py", line 665, in parse_config_files
        self._parse_config_files(filenames=filenames)
      File "d:\temp\doit-install-issue\venv\lib\site-packages\setuptools\dist.py", line 572, in _parse_config_files
        filenames = self.find_config_files()
      File "d:\temp\doit-install-issue\venv\lib\site-packages\setuptools\_distutils\dist.py", line 353, in find_config_files
        sys_dir = os.path.dirname(sys.modules['distutils'].__file__)
    KeyError: 'distutils'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

It also has an import pip in its setup.py. Please note that while this might be wrong, it's quite tough to force other projects to adapt by releasing a new version of setuptools.
Also, please note that (official Python docs)[https://packaging.python.org/tutorials/installing-packages/#ensure-pip-setuptools-and-wheel-are-up-to-date] recommend to update setuptools to the latest version before installing anything for real, so pinning setuptools to overcome the current issues is not a real option.
Would it be possible to roll back, but release a new version such that all the pip install -U setuptool calls remain valid?
@ferraith FYI

This can be worked around if you set an environment variable:
export SETUPTOOLS_USE_DISTUTILS="stdlib"
https://setuptools.readthedocs.io/en/latest/history.html#v50-0-0
To reproduce, you may need to pip install while disabling wheels.  pip install --no-binary :all:

@asmacdo I can confirm that the workaround you describe with export SETUPTOOLS_USE_DISTUTILS="stdlib" seems to resolve the error I was seeing as well.

Note there are seemingly two errors reported here. One relating to Command subclass, which since it's in the title and OP, I'll continue to address here. The other, relating to import of pip, was reported in #2365, so I'll use that ticket to track that issue.

Hi @jay-karimi . Sorry for the trouble you experienced and thanks for filing a report. @asmacdo Thanks for the reproducer. That helps a lot. I'm able to replicate the failure with this command:
pip-run -q setuptools==50 -- -m pip-run --no-binary :all: --no-deps ruamel.yaml.clib

Same when executing against the source repo:
$ pip-run -q setuptools==50 -- -m pip-run<EMAIL_ADDRESS>

I traced the issue to its source:
ruamel-yaml-clib-code default $ pip-run -q setuptools==50 -- -Werror -m pdb setup.py egg_info
> /Users/jaraco/draft/ruamel-yaml-clib-code/setup.py(5)<module>()
-> from __future__ import print_function, absolute_import, division, unicode_literals
(Pdb) c
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> /var/folders/qs/5jptvz2x7_gblx4kc3qj005800n8zm/T/pip-run-ixe5il38/_distutils_hack/__init__.py(30)clear_distutils()
-> warnings.warn("Setuptools is replacing distutils.")
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/pdb.py", line 1703, in main
    pdb._runscript(mainpyfile)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/pdb.py", line 1572, in _runscript
    self.run(statement)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/bdb.py", line 587, in run
    exec(cmd, globals, locals)
  File "<string>", line 1, in <module>
  File "/Users/jaraco/draft/ruamel-yaml-clib-code/setup.py", line 5, in <module>
    from __future__ import print_function, absolute_import, division, unicode_literals
  File "/Users/jaraco/draft/ruamel-yaml-clib-code/setup.py", line 885, in main
    nsp.check()
  File "/Users/jaraco/draft/ruamel-yaml-clib-code/setup.py", line 451, in check
    from pip.exceptions import InstallationError
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 914, in _find_spec
  File "/var/folders/qs/5jptvz2x7_gblx4kc3qj005800n8zm/T/pip-run-ixe5il38/_distutils_hack/__init__.py", line 74, in find_spec
    return method()
  File "/var/folders/qs/5jptvz2x7_gblx4kc3qj005800n8zm/T/pip-run-ixe5il38/_distutils_hack/__init__.py", line 94, in spec_for_pip
    clear_distutils()
  File "/var/folders/qs/5jptvz2x7_gblx4kc3qj005800n8zm/T/pip-run-ixe5il38/_distutils_hack/__init__.py", line 30, in clear_distutils
    warnings.warn("Setuptools is replacing distutils.")
UserWarning: Setuptools is replacing distutils.
(Pdb) w
  /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/pdb.py(1703)main()
-> pdb._runscript(mainpyfile)
  /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/pdb.py(1572)_runscript()
-> self.run(statement)
  /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/bdb.py(587)run()
-> exec(cmd, globals, locals)
  <string>(1)<module>()
  /Users/jaraco/draft/ruamel-yaml-clib-code/setup.py(5)<module>()
-> from __future__ import print_function, absolute_import, division, unicode_literals
  /Users/jaraco/draft/ruamel-yaml-clib-code/setup.py(885)main()
-> nsp.check()
  /Users/jaraco/draft/ruamel-yaml-clib-code/setup.py(451)check()
-> from pip.exceptions import InstallationError
  <frozen importlib._bootstrap>(991)_find_and_load()
  <frozen importlib._bootstrap>(971)_find_and_load_unlocked()
  <frozen importlib._bootstrap>(914)_find_spec()
  /var/folders/qs/5jptvz2x7_gblx4kc3qj005800n8zm/T/pip-run-ixe5il38/_distutils_hack/__init__.py(74)find_spec()
-> return method()
  /var/folders/qs/5jptvz2x7_gblx4kc3qj005800n8zm/T/pip-run-ixe5il38/_distutils_hack/__init__.py(94)spec_for_pip()
-> clear_distutils()
> /var/folders/qs/5jptvz2x7_gblx4kc3qj005800n8zm/T/pip-run-ixe5il38/_distutils_hack/__init__.py(30)clear_distutils()
-> warnings.warn("Setuptools is replacing distutils.")

Notice /Users/jaraco/draft/ruamel-yaml-clib-code/setup.py(451)check() there in the call stack when the warning is raised? It seems the setup.py for that project is importing pip (and merely to get an InstallationError exception class).
By importing pip, the project is triggering the same behavior reported in #2351. In this case, however, before the KeyError is triggered, the distutils hack is disabled, then distutils is imported from the stdlib, then setuptools is imported, and distutils.cmd.Command now has two manifestations.
Replacing the use of import pip fixes the error:
ruamel-yaml-clib-code default $ hg diff
diff -r 52bf0eb35c43 setup.py
--- a/setup.py  Fri Sep 27 07:42:41 2019 +0200
+++ b/setup.py  Tue Sep 01 18:07:28 2020 -0400
@@ -447,10 +447,7 @@
             sys.exit(1)

     def check(self):
-        try:
-            from pip.exceptions import InstallationError
-        except ImportError:
-            return
+        InstallationError = Exception
         # arg is either develop (pip install -e) or install
         if self.command not in ['install', 'develop']:
             return

ruamel-yaml-clib-code default $ pip-run -q setuptools==50 -- -Werror setup.py egg_info
sys.argv ['setup.py', 'egg_info']
test compiling test_ruamel_yaml
running egg_info
writing ruamel.yaml.clib.egg-info/PKG-INFO
writing dependency_links to ruamel.yaml.clib.egg-info/dependency_links.txt
writing namespace_packages to ruamel.yaml.clib.egg-info/namespace_packages.txt
writing top-level names to ruamel.yaml.clib.egg-info/top_level.txt
reading manifest file 'ruamel.yaml.clib.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'ruamel.yaml.clib.egg-info/SOURCES.txt'

My recommendation is for that project (and any other projects using that technique) avoid importing pip.

@jaraco should we open a pip ticket to discuss a warning if pip is imported in setup.py (is that even possible)?

I apply the same fix for Windowns build and it worked too. Here is Window statement:
set SETUPTOOLS_USE_DISTUTILS="stdlib"
pip install ...

I traced the issue to its source:
ruamel-yaml-clib-code default $ pip-run -q setuptools==50 -- -Werror -m pdb setup.py egg_info

> By importing pip, the project is triggering the same behavior reported in #2351. In this case, however, before the `KeyError` is triggered, the distutils hack is disabled, then distutils is imported from the stdlib, then setuptools is imported, and `distutils.cmd.Command` now has two manifestations.
>
> Replacing the use of `import pip` fixes the error:
>

> My recommendation is for that project (and any other projects using that technique) avoid importing pip.
Thanks for the analysis and suggested fix.
I am in the process of implementing this, this is a common setup.py for all projects ruamel distributes, and especially generating the wheels for C extensions (such as ruamel.yaml.clib) will take some effort. I will however prioritize the open source pages (~25 or so from the 150+ that need updating).

should we open a pip ticket to discuss a warning if pip is imported in setup.py (is that even possible)?

It is likely possible. Given that for the distutils hack, setuptools special-cases pip, it may make sense to be even more sophisticated there and not disable the override unless pip is being executed.


New Script: Semaphore

[!NOTE]
We are meticulous when it comes to merging code into the main branch, so please understand that we may reject pull requests that do not meet the project's standards. It's never personal. Also, game-related scripts have a lower chance of being merged.

Description
!! RECREATED FORK REPO AND CREATED PR AGAIN !!
Made install script for Semaphore
Fixes # (issue)
#68
Project Board
Type of change
Please check the relevant option(s):

[ ] Bug fix (non-breaking change that resolves an issue)
[ ] New feature (non-breaking change that adds functionality)
[ ] Breaking change (a fix or feature that would cause existing functionality to change unexpectedly)
[x] New script (a fully functional and thoroughly tested script or set of scripts.)

Prerequisites
The following efforts must be made for the PR to be considered. Please check when completed:

[x] Self-review performed (I have reviewed my code, ensuring it follows established patterns and conventions)
[x] Testing performed (I have tested my changes, ensuring everything works as expected)
[x] Documentation updated (I have updated any relevant documentation)

Additional Information (optional)
Provide any additional context or screenshots about the feature or fix here.
Related Pull Requests / Discussions
If there are other pull requests or discussions related to this change, please link them here:
Previews PR was not reviewed so take this PR as a reference point!

Can you also please check the json file?
I added "Admin password: cat ~/semaphore.creds"