Add (optional) pre-commit hook

Flake8 no longer handles patches, so instead apply to entire files (see https://github.com/PyCQA/flake8/issues/1760)
Rename tools/lint_diff.py to tools/lint.py
Files can be obtained either via diffing against a branch, or by specifying them manually
tools/pre-commit-hook.sh is a pre-commit hook that utilizes tools/lint.py but only lints staged changes
Update contributor guidelines to point to pre-commit hook

See also the discussion at https://github.com/scipy/scipy/issues/15489

Also updated dev.py to keep on working.

Failures seem unrelated.

Flake8 no longer handles patches, so instead apply to entire files (see I'm temporarily disabling the issue tracker PyCQA/flake8#1760)

I am not sure about this change specific part. I tried your changes locally and it got a bunch of unrelated lint errors:

Details

python tools/lint.py --diff-against main                                                                                 ✔  scipy-dev 
scipy/integrate/_quadrature.py:289:5: E741 ambiguous variable name 'l'
scipy/integrate/_quadrature.py:835:80: E501 line too long (82 > 79 characters)
scipy/integrate/_quadrature.py:890:80: E501 line too long (103 > 79 characters)
scipy/integrate/_quadrature.py:906:10: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:906:12: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:906:15: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:906:18: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:906:21: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:907:10: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:907:12: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:907:15: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:907:17: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:907:20: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:907:23: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:908:10: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:908:12: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:908:15: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:908:17: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:908:19: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:908:22: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:908:25: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:909:10: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:909:13: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:909:16: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:909:19: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:909:22: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:909:25: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:909:28: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:909:31: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:910:10: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:910:14: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:910:18: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:910:21: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:910:24: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:910:27: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:910:30: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:910:34: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:910:39: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:911:10: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:911:14: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:911:18: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:911:22: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:911:25: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:911:29: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:911:32: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:911:36: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:911:40: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:911:43: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:912:10: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:912:16: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:912:21: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:912:26: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:912:31: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:912:36: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:912:41: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:912:46: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:912:51: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:912:56: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:912:62: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:913:10: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:913:16: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:913:21: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:913:26: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:913:31: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:913:37: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:913:43: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:913:49: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:913:54: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:913:59: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:914:14: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:915:10: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:915:16: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:915:22: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:915:28: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:915:33: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:915:39: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:915:44: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:915:49: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:915:55: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:916:23: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:917:11: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:917:18: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:917:25: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:917:32: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:917:39: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:917:46: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:917:54: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:918:27: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:918:34: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:918:41: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:918:48: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:920:12: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:920:21: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:920:30: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:920:39: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:920:58: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:921:31: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:921:40: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:921:49: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:921:58: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:922:31: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:923:30: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:923:38: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:923:47: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:923:56: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:924:31: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:924:41: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:924:50: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:924:60: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:925:31: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:925:39: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:926:26: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:927:40: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:927:54: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:928:40: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:928:53: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:929:41: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:929:54: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:930:39: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:932:34: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:932:44: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:932:55: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:933:37: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:933:49: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:933:62: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:934:38: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:934:50: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:934:62: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:935:36: E231 missing whitespace after ','
scipy/integrate/_quadrature.py:935:46: E231 missing whitespace after ','
scipy/stats/_continuous_distns.py:224:80: E501 line too long (84 > 79 characters)
scipy/stats/_continuous_distns.py:282:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:528:80: E501 line too long (82 > 79 characters)
scipy/stats/_continuous_distns.py:1010:80: E501 line too long (80 > 79 characters)
scipy/stats/_continuous_distns.py:1011:80: E501 line too long (83 > 79 characters)
scipy/stats/_continuous_distns.py:1021:20: E128 continuation line under-indented for visual indent
scipy/stats/_continuous_distns.py:1022:20: E128 continuation line under-indented for visual indent
scipy/stats/_continuous_distns.py:1022:22: E251 unexpected spaces around keyword / parameter equals
scipy/stats/_continuous_distns.py:1022:24: E251 unexpected spaces around keyword / parameter equals
scipy/stats/_continuous_distns.py:1031:80: E501 line too long (81 > 79 characters)
scipy/stats/_continuous_distns.py:1033:15: E251 unexpected spaces around keyword / parameter equals
scipy/stats/_continuous_distns.py:1033:17: E251 unexpected spaces around keyword / parameter equals
scipy/stats/_continuous_distns.py:1056:39: E231 missing whitespace after ','
scipy/stats/_continuous_distns.py:1057:9: E265 block comment should start with '# '
scipy/stats/_continuous_distns.py:1065:80: E501 line too long (94 > 79 characters)
scipy/stats/_continuous_distns.py:1127:80: E501 line too long (88 > 79 characters)
scipy/stats/_continuous_distns.py:1145:80: E501 line too long (82 > 79 characters)
scipy/stats/_continuous_distns.py:1349:9: E741 ambiguous variable name 'l'
scipy/stats/_continuous_distns.py:1425:80: E501 line too long (82 > 79 characters)
scipy/stats/_continuous_distns.py:1502:80: E501 line too long (89 > 79 characters)
scipy/stats/_continuous_distns.py:2176:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:2177:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:2179:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:2180:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:2182:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:2735:39: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:2742:39: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:2926:9: E731 do not assign a lambda expression, use a def
scipy/stats/_continuous_distns.py:2933:80: E501 line too long (86 > 79 characters)
scipy/stats/_continuous_distns.py:2999:5: E731 do not assign a lambda expression, use a def
scipy/stats/_continuous_distns.py:3021:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:3023:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:3024:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:3025:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:3057:80: E501 line too long (94 > 79 characters)
scipy/stats/_continuous_distns.py:3170:17: E731 do not assign a lambda expression, use a def
scipy/stats/_continuous_distns.py:4533:17: E731 do not assign a lambda expression, use a def
scipy/stats/_continuous_distns.py:4544:17: E731 do not assign a lambda expression, use a def
scipy/stats/_continuous_distns.py:5307:80: E501 line too long (81 > 79 characters)
scipy/stats/_continuous_distns.py:5641:80: E501 line too long (91 > 79 characters)
scipy/stats/_continuous_distns.py:6096:30: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:6098:30: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:6109:30: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:6111:30: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:6475:80: E501 line too long (97 > 79 characters)
scipy/stats/_continuous_distns.py:6667:80: E501 line too long (82 > 79 characters)
scipy/stats/_continuous_distns.py:6926:80: E501 line too long (82 > 79 characters)
scipy/stats/_continuous_distns.py:8433:29: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:8443:29: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:8562:80: E501 line too long (80 > 79 characters)
scipy/stats/_continuous_distns.py:9779:80: E501 line too long (84 > 79 characters)
scipy/stats/_continuous_distns.py:10052:80: E501 line too long (84 > 79 characters)
scipy/stats/tests/test_distributions.py:465:1: E302 expected 2 blank lines, found 1
scipy/stats/tests/test_distributions.py:3595:1: E302 expected 2 blank lines, found 1
scipy/stats/tests/test_distributions.py:7643:80: E501 line too long (80 > 79 characters)
scipy/stats/tests/test_distributions.py:7644:80: E501 line too long (81 > 79 characters)
scipy/stats/tests/test_distributions.py:7646:80: E501 line too long (80 > 79 characters)
scipy/stats/tests/test_distributions.py:7648:80: E501 line too long (80 > 79 characters)

Currently we just have the flake8 version pinned at flake8 < 6.0 so to avoid the removal of --diff

Not to influence this PR but many are already switching to https://github.com/charliermarsh/ruff. Just saying in case flake8 starts to lag behind.

I am not sure about this change specific part. I tried your changes locally and it got a bunch of unrelated lint errors:

Where is your main branch at? If it's not up to date, you'll see this. That was one of the question I had in the commit message.

I am not sure about this change specific part. I tried your changes locally and it got a bunch of unrelated lint errors:

Where is your main branch at? If it's not up to date, you'll see this. That was one of the question I had in the commit message.

Apologies yes you are right about this specific part.
However in the case that I make an edit to a file, I then see all the failures for that whole file which obscure any failures that I introduce. For example, if I make a bad edit in scipy/stats/_continuous_distns.py. On main I get just those bad failures:
python tools/lint_diff.py
scipy/stats/_continuous_distns.py:4421:56: E261 at least two spaces before inline comment
scipy/stats/_continuous_distns.py:4421:56: E262 inline comment should start with '# '

Whereas on this branch I get all the failures in that file which obscures my bad change:
python tools/lint.py --diff-against main
scipy/stats/_continuous_distns.py:224:80: E501 line too long (84 > 79 characters)
scipy/stats/_continuous_distns.py:282:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:528:80: E501 line too long (82 > 79 characters)
scipy/stats/_continuous_distns.py:1010:80: E501 line too long (80 > 79 characters)
scipy/stats/_continuous_distns.py:1011:80: E501 line too long (83 > 79 characters)
scipy/stats/_continuous_distns.py:1021:20: E128 continuation line under-indented for visual indent
scipy/stats/_continuous_distns.py:1022:20: E128 continuation line under-indented for visual indent
scipy/stats/_continuous_distns.py:1022:22: E251 unexpected spaces around keyword / parameter equals
scipy/stats/_continuous_distns.py:1022:24: E251 unexpected spaces around keyword / parameter equals
scipy/stats/_continuous_distns.py:1031:80: E501 line too long (81 > 79 characters)
scipy/stats/_continuous_distns.py:1033:15: E251 unexpected spaces around keyword / parameter equals
scipy/stats/_continuous_distns.py:1033:17: E251 unexpected spaces around keyword / parameter equals
scipy/stats/_continuous_distns.py:1056:39: E231 missing whitespace after ','
scipy/stats/_continuous_distns.py:1057:9: E265 block comment should start with '# '
scipy/stats/_continuous_distns.py:1065:80: E501 line too long (94 > 79 characters)
scipy/stats/_continuous_distns.py:1127:80: E501 line too long (88 > 79 characters)
scipy/stats/_continuous_distns.py:1145:80: E501 line too long (82 > 79 characters)
scipy/stats/_continuous_distns.py:1349:9: E741 ambiguous variable name 'l'
scipy/stats/_continuous_distns.py:1425:80: E501 line too long (82 > 79 characters)
scipy/stats/_continuous_distns.py:1502:80: E501 line too long (89 > 79 characters)
scipy/stats/_continuous_distns.py:2176:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:2177:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:2179:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:2180:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:2182:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:2735:39: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:2742:39: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:2926:9: E731 do not assign a lambda expression, use a def
scipy/stats/_continuous_distns.py:2933:80: E501 line too long (86 > 79 characters)
scipy/stats/_continuous_distns.py:2999:5: E731 do not assign a lambda expression, use a def
scipy/stats/_continuous_distns.py:3021:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:3023:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:3024:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:3025:1: E266 too many leading '#' for block comment
scipy/stats/_continuous_distns.py:3057:80: E501 line too long (94 > 79 characters)
scipy/stats/_continuous_distns.py:3170:17: E731 do not assign a lambda expression, use a def
scipy/stats/_continuous_distns.py:4421:56: E261 at least two spaces before inline comment
scipy/stats/_continuous_distns.py:4421:56: E262 inline comment should start with '# '
scipy/stats/_continuous_distns.py:4533:17: E731 do not assign a lambda expression, use a def
scipy/stats/_continuous_distns.py:4544:17: E731 do not assign a lambda expression, use a def
scipy/stats/_continuous_distns.py:5307:80: E501 line too long (81 > 79 characters)
scipy/stats/_continuous_distns.py:5641:80: E501 line too long (91 > 79 characters)
scipy/stats/_continuous_distns.py:6096:30: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:6098:30: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:6109:30: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:6111:30: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:6475:80: E501 line too long (97 > 79 characters)
scipy/stats/_continuous_distns.py:6667:80: E501 line too long (82 > 79 characters)
scipy/stats/_continuous_distns.py:6926:80: E501 line too long (82 > 79 characters)
scipy/stats/_continuous_distns.py:8433:29: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:8443:29: E127 continuation line over-indented for visual indent
scipy/stats/_continuous_distns.py:8562:80: E501 line too long (80 > 79 characters)
scipy/stats/_continuous_distns.py:9779:80: E501 line too long (84 > 79 characters)
scipy/stats/_continuous_distns.py:10052:80: E501 line too long (84 > 79 characters)

Not to influence this PR but many are already switching to https://github.com/charliermarsh/ruff. Just saying in case flake8 starts to lag behind.

Also, to lint Cython files you now need https://github.com/kmaehashi/flake8-force.

However in the case that I make an edit to a file, I then see all the failures for that whole file which obscure any failures that I introduce.

This is intended; please see the commit messages: flake8 no longer supports diffs.

Where is your main branch at? If it's not up to date, you'll see this. That was one of the question I had in the commit message.

FWIW, this is not a problem with the pre-commit hook, because it just scans whatever files were added to the index.

However in the case that I make an edit to a file, I then see all the failures for that whole file which obscure any failures that I introduce.

This is intended; please see the commit messages: flake8 no longer supports diffs.

Sorry I am not articulating my point well. I understand that as of 6.0.0 diffs are no longer supported. I actually raised an issue about it a while ago #17503. At the time it was decided to pin the version to  < 6.0.0  in the CI job and in the environment.yml as a good enough solution (for now at least). What I am asking is has anything changed enough that this is no longer an acceptable solution? In my mind there is a trade off, either:

we can have newer versions of flake8 but accept we cant have diffs so will see lots of unrelated failures
we are stuck with older versions of flake8 but we can use diff to have cleaner outputs.

At least in my mind we haven't reached the point where 1 is the better option but interest to hear your thoughts.

Also, to lint Cython files you now need https://github.com/kmaehashi/flake8-force.

Implemented. I'd appreciate if someone could check whether I got the conda environments.yml file right.

Implemented. I'd appreciate if someone could check whether I got the conda environments.yml file right.

It works, but shows this message:
$ mamba env create -f environment.yml
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies.  Conda may not use the correct pip to install your packages, and they may end up in the wrong place.  Please add an explicit pip dependency.  I'm adding one for you, but still nagging you.

If you add pip as a dependency right above where it's used in environment.yml, that will fix it.

@j-bowhay I thought about the behavior you saw some more: it doesn't seem right that the files affected should depend on whether the main branch had been updated, but I don't know how to identify the branching point in that case either. Any ideas? E.g., we cannot know the name of the remote (origin or upstream is typical), and not everyone sets up feature branches to track main.
With the pre-commit hook its easy, because we just look at what has been staged for commit.

@stefanv anything else you wanted to check? Happy to get this in and see how it goes.
(Ruff is really getting a lot of traction, tons of big projects are starting to use it right now.)

@j-bowhay I thought about the behavior you saw some more: it doesn't seem right that the files affected should depend on whether the main branch had been updated, but I don't know how to identify the branching point in that case either. Any ideas? E.g., we cannot know the name of the remote (origin or upstream is typical), and not everyone sets up feature branches to track main.
With the pre-commit hook its easy, because we just look at what has been staged for commit.

Unfortunately not sure I have any clever suggestions on how to overcome this. Maybe just a documentation or a warning saying to check it's up to date?
PS. I wasn't sure if this was intentional or not but flake8 is pinned to an old version in the CI job where as in other places you have unpinned it.

PS. I wasn't sure if this was intentional or not but flake8 is pinned to an old version in the CI job where as in other places you have unpinned it.

Thanks for letting me know. I looked now, but I don't see it; which CI job do you see it on?

PS. I wasn't sure if this was intentional or not but flake8 is pinned to an old version in the CI job where as in other places you have unpinned it.

Thanks for letting me know. I looked now, but I don't see it; which CI job do you see it on?

https://github.com/scipy/scipy/blob/fe2acebf92c2cdfca49d049aaf4c442dcee2327b/azure-pipelines.yml#L148

(Ruff is really getting a lot of traction, tons of big projects are starting to use it right now.)

I pushed a commit that switches checking to ruff and cython-lint so you can have a look.
ruff is, indeed, very fast. On the downside, it does not do Cython linting, and I don't think cython-lint gives us as thorough feedback as what flake8 does.

(Ruff is really getting a lot of traction, tons of big projects are starting to use it right now.)

I pushed a commit that switches checking to ruff and cython-lint so you can have a look.

Thanks!

ruff is, indeed, very fast. On the downside, it does not do Cython linting, and I don't think cython-lint gives us as thorough feedback as what flake8 does.

I think it's ok to move to this stack and have cython-lint as this is what Pandas does (would be great if we can standardise this as well). That would give more exposure to the project and hopefully the missing bits would get addressed (and we can ping @MarcoGorelli if we have an issue 😉)

😄 cheers for the mention, and for considering cython-lint. Just to clarify, the main hook does two things:

parse the Cython AST, and perform some checks
run pycodestyle (which is what flake8 used to do), with some error codes turned off because they don't generally apply to Cython

So, you should get everything flake8 used to give you, but more. If you're seeing some error codes from flake8 which cython-lint doesn't show, I'm fairly confident that it's a code which will result in false-positives. If that's not the case, or if you have any feature requests, please do ping me at https://github.com/MarcoGorelli/cython-lint/issues and I'll address it, I'm actively maintaining it and very open to requests 💚

So, you should get everything flake8 used to give you, and more.

Hi @MarcoGorelli, nice to meet you! :wave: Thank you for working on this tooling. :pray:
To be fair, the only test I did was to add import  as a blank line and noticed that cython-lint doesn't catch it. BUT, I think it may be a bug: the parser crashes, but doesn't report it? Because when I remove that line it does show errors. cython-lint also doesn't seem to check pxi and pxd files.

Awesome 👏

Unfortunately not sure I have any clever suggestions on how to overcome this. Maybe just a documentation or a warning saying to check it's up to date?

I added filters which seems to have helped. But perhaps the ultimate solution is doing a git log --cherry?

Beyond the config file comment above, I got speedy/working behavior on both Linux and Windows ("git bash for Windows") with both dev.py lint and pre-commit hook. Maybe you'd get something weird if you used an old-school Windows command-line, but that seems solid enough on Windows for now IMO. cp ..  command is just fine for "git bash" Windows terminals at least..

I guess one thing we can do is when you open the big linting PR a second person can repeat the whole-repo lint on another branch just to confirm the matching lint config with a neutral diff to your PR branch (slightly reduced chance of user-specific differences). Maybe I'll just run the lint on Windows again when you do that to make it as different as possible from the normal setup of devs.

One thing worth mentioning about the switch to Ruff:

As a project, Ruff is designed to be used alongside Black and, as such, will defer implementing stylistic lint rules that are obviated by autoformatting.

So, if I calculated correctly, we are missing the following rules:

E201
E901
E702
E301
E305
E241
E224
E306
E211
E225
E117
E273
E242
E111
E202
E271
E704
E502
E223
E221
E227
E129
E131
E261
E303
E703
E701
E116
E274
E222
E133
E115
E203
E114
E275
E272
E113
E112
E228
E304
E262
E124

Err, I'm having my doubts now about fixing all the remaining linting errors one-shot. Take a look at all the errors.
fixme.log

Hmm, about 3560 suggestions with 2438 (68 %) of them being E501 Line too long. I guess you're saying it may get worse if we compensate for Ruff disabling some stuff we may want though.

We could run black on all offending files, but not sure everyone will be happy with that level of intervention.

The issue I think is that Black does not look at docstrings and won't help for the line too longs there, which I think represent the majority due to urls and other things we cannot break.

Maybe we should get the pre-commit hook where we want it to be, and then take one module at a time.

In case it's useful, for reference, this is how we usually do it in pandas if applying something to the whole codebase in one go is too hard:

make a list of excluded files / folders
start running it immediately in CI
as folders / files are fixed up, they're removed from the exclusions list (e.g. https://github.com/pandas-dev/pandas/pull/49937/)

I think it's important to get it running in CI as soon as possible, otherwise it hangs around forever. And if there's a list of exclusions, then it kind of gamifies it and contributors enjoy seeing the list reduce as they make PRs

So, if I calculated correctly, we are missing the following rules...

On first glance, that list looks right to me. If any are particularly impactful for SciPy, I'd consider adding support for them! Although the tradeoff is that it could lead to significantly more existing errors, if I'm understanding the discussion correctly.
If helpful... please let me know if there's anything I can do from the Ruff side to help you here. We don't support diffs either (there's been some discussion of various error suppressions systems here, but it's not being actively worked on right now), but it'd obviously be my pleasure to help support SciPy.
(You should also feel free to ignore me completely and, of course, to make whatever decision is best for the project.)

On first glance, that list looks right to me. If any are particularly impactful for SciPy, I'd consider adding support for them! Although the tradeoff is that it could lead to significantly more existing errors, if I'm understanding the discussion correctly.

Thanks for chiming in here, @charliermarsh, it's good to have you in the discussion! I think the question we need to answer, broadly, is "how does ruff relate to projects that do not use black as an auto-formatter".

I think the question we need to answer, broadly, is "how does ruff relate to projects that do not use black as an auto-formatter".

Although Ruff doesn't support plugins, it is meant to be configured and tailored to each individual projects. We implement rules that are derived from a bunch of different flake8 plugins, but it's not the intention of Ruff that any given project should enable all rules; rather, that they enable the rules that make sense for that project. (Not all projects want to lint docstrings, not all projects have type annotations enabled, etc.)
This is all to say: just because Ruff is designed to work with Black, doesn't mean the rule set has to assume you use Black. And it would be fair game to add rules to Ruff that are made redundant by Black. The omission of those rules is more related to prioritization than anything else.
More succinctly: I'd like Ruff to be useful to projects that don't use Black, even if it means adding rules that aren't useful to the projects that do. (But, again, it's all a matter of prioritization :))

Thanks @charliermarsh, that makes sense. I am aware of the config porting tool, but it may be worth extending that tool to help projects that migrate so they know which rules they use and which they leave behind. I did that calculation yesterday here, and it wasn't too hard to implement, but the result is highly informative.

@stefanv are you leaning toward a ruff.toml exclusion directive at this point, so that we can uncouple formatting changes from "regular" PRs? (given that the full-reformatting PR is now impractical?) I recall some old rule about not making individual formatting-only PRs, but perhaps if they are scoped to 1 per submodule people may not get too annoyed with the volume relative to coupling small contributions to reformats over a longer period of time.

We could run black on all offending files, but not sure everyone will be happy with that level of intervention.

I'm pretty sure that particular one is a no-go with SciPy team, it causes too much friction for now I think re: some of the changes black makes. I heard there was some debate on the broader community discourse about black changes/plugin for scientific code, but don't know where that stands. Could we avoid the black changes completely per the original plan or is that more problematic now somehow?
@WarrenWeckesser is usually opinionated on formatting decisions too, wonder if he missed this one.

@tylerjereddy I think I figured out a path forward. If we disable E501 (long lines) and run autopep8 on the code base, only 307 errors remain. That feels doable to me.
While we're at it, we may want to consider also running pyupgrade --py38-plus.

+1 although pyupgrade being from the same maintainer of flake8, I am not sure about having it in the CI. But nothing wrong with running it once.

If helpful, Ruff implements a good chunk of pyupgrade under the UP error codes (but not the entire thing -- happy to enumerate the rules we're missing, it's mostly 2-to-3 compatibility stuff).

Oh that's good to know, thank you for the precision. Then I personally would prefer that we just stick with Ruff. And if we think we are missing something, we raise this on Ruff's side.

Thanks @charliermarsh! Great, if I add the UP rules, then after auto-fixing we are left with 338 errors. Again, that is doable to fix by hand.
As an experiment, I enabled the "D" rules, but I get a lot of:
warning: Failed to converge after 100 iterations.

Adding isort ("I"), all errors are auto-fixed, so still 338 to do by hand.  I quite like isort, but I think most devs just find that annoying.
pep-naming ("N") increases errors a lot; we have a lot of matrices like X and Y, and it wants those to be lowercase. That's a no.
Blind exceptions ("BLE") (by itself) takes us up to 395.
Bugbear ("B") (by itself) takes us up to 489.
flake8-builtins ("A") (by itself) takes us up to 853.
flake8-commas ("COM") (by itself) takes us up to 346.
flake8-comprehension ("C4") (by itself) takes us up to 352.
Anyway, you get the gist. We can browse the list of rules and see which ones we'd like to include.  Avoid pedantic ones and include helpful ones, preferably.

For now, I added UP and suppressed E501.

As an experiment, I enabled the "D" rules, but I get a lot of...

(Without trying it myself, I'm guessing that it's because the D rules contain some pairs of rules that conflict based on convention. E.g., there's a rule that requires your one blank line before a class docstring, and a rule that requires zero blank lines before a class docstring, so if you enable all of D, they try to fix each other until we hit the limit. There should be a warning when you enable those two codes, but if you have a lot of violations, I'm guessing it'd be really easy to miss it at the top of the output. I recommend setting:
[tool.ruff.pydocstyle]
convention = "google"  # Or "numpy", or "pep-257"

...which will automatically give you a consistent set of rules.)

Thanks to @charliermarsh's advice, I could activate the D rules in numpy mode. Our docstrings are in "bad" shape, linting wise: 1544 violations!

I am merging this now so we don't lose all the great work of everyone here. Time is of essence here. Thank you all!

@tylerjereddy wrote

@WarrenWeckesser is usually opinionated on formatting decisions too, wonder if he missed this one.

Sorry, I haven't been following all PRs in real time.  But if the end result is stricter automated compliance checks for code formatting, then I'm all for it.

@MarcoGorelli @charliermarsh would you be willing to put your packages on conda-forge? That would allow us to stay consistent with our stack (either pip or conda).
I can do it and ping you if wanted.

oh thanks! That was fast 😅

Yup we're on conda-forge! The last few builds have been failing for reasons that we're still trying to debug, so it's a bit behind, but that's known.


chore(deps): upgrade compiler dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-compiler-dependencies-k8s-26-main" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 3629

Questions ?
Please refer to the Backport tool documentation


enhance(must-gather): This PR changes sed delimiter and also the must-gather base image to 4.2.0

Signed-off-by: Ashish Ranjan<EMAIL_ADDRESS>-> This PR changes the sed delimiter to \001 which is less probable to occur in the ceph config.
-> This PR changes base image version of ocs-must-gather to 4.2.0 as 4.2 image is not coming with the must-gather 4.2 cli which breaks upstream build.

you mentioned a functional test on chat related to must gather. Is there a way to verify this change with a test?

no, i still need to implement it

/retest


Implement image spec

runtime spec has already been written by kata, https://github.com/kata-containers/kata-containers/blob/2.0-dev/src/agent/oci/src/lib.rs#L31 (kata agent 2.0) , but there is no image spec yet.
This issue is to track the progress of writing an image spec in rust.

https://github.com/smiyaguchi/oci-spec too only implements runtime-spec so far.

reserved the crate name, https://crates.io/crates/image-spec

In the same manner as for https://github.com/cri-o/cri/issues/22, it may be a good idea to switch to a workspace of crates inside this project to maintain them inside one repository. :)

This is already done in the oci-spec-rs crate.


Add note to Cognito email regarding the Chrome browser extension

Is your feature request related to a problem? Please describe.
At the time the Cognito email goes out with login credentials for the LMA Dashboard, the "Download Chrome Extension" link does not yet work. It only becomes usable once the stack is fully deployed.
Describe the solution you'd like
Per discussion with @rstrahan, suggest adding "Please hold off trying to download the Chrome Extension until the stack is CREATE_COMPLETE or UPDATE_COMPLETE" to the Cognito email content.
Describe alternatives you've considered
This could also be documented somewhere on the dashboard or in the markdown docs.
Additional context
I otherwise find the Live Meeting Assistant to be delightful.

Here's how it will look in the next release

Resolved in v0.1.6


Project creation fails using macos

Describe the bug
When trying to create a project with
keptn create project sockshop --shipyard=./shipyard.yaml --git-user=GIT_USER --git-token=GIT_TOKEN --git-remote-url=GITHUB_URL
The creation fails with the following message

Starting to create project
Creating project sockshop failed. Could not store git credentials.

Trying to create again, this time without git upstream with
keptn create project sockshop --shipyard=./shipyard.yaml
Results in the following message:

Starting to create project
Creating project sockshop failed. Could not commit changes.

Expected behavior
Creation of the sockshop project
Environment
KeptnCLI - 0.5.0
OS running the CLI - MacOS 10.14.6
GKE - 1.13.7-gke.24

Creating project sockshop failed. Could not store git credentials.
This seems to be related to my issue, #929 .
Is it possible that you have the wrong Git Remote URL?
Can you please check if the output of kubectl get secrets -n keptn contains git-credentials-* entries (e.g., git-credentials-sockshop)?

Excuse me for the inconvenience I was using the wrong URL for the project. After fixing that, the project was created without issues

Good to hear that the problem was resolved for you.
We will try to get better log output / clearer error messages in the future. I will close the issue for now, please re-open it if you need any more help or if the problem occurs again.


Update 0051-n-queens.c

This is a bug fix for an existing solution. The problem is that x is not defined in the for loop. Hence, for loop will fail to be executed

File(s) Modified: 0051-n-queens.c
Language(s) Used: c
Submission URL: _https://leetcode.com/submissions/detail/1299108287/_

Important
Please make sure the file name is lowercase and a duplicate file does not already exist before merging.

@BugIdentifier Thank you for your fix 👍


chore(deps): update dependency owasp-dep-scan/dep-scan to v5.1.6

This PR contains the following updates:

Package
Update
Change

owasp-dep-scan/dep-scan
patch
v5.1.5 -> v5.1.6

Release Notes

owasp-dep-scan/dep-scan (owasp-dep-scan/dep-scan)
v5.1.6
Compare Source
What's Changed

Fixes 206 and 127 by @prabhu in https://github.com/owasp-dep-scan/dep-scan/pull/207
Use tar gz compression by @prabhu in https://github.com/owasp-dep-scan/dep-scan/pull/205

Full Changelog: https://github.com/owasp-dep-scan/dep-scan/compare/v5.1.5...v5.1.6

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

depends on https://github.com/owasp-dep-scan/dep-scan/pull/210
awaiting depscan 5.1.7 to be released


Add digital input parsing using the updated API

@bruno-f-cruz Has this PR been abandoned? Just interested in cleaning up old issues and PRs

This precedes my time at the Allen. At the time it was a solution for a workflow @XX-Yin was working on not sure what came out of it.

Yes, It was solved and we can close it.
---- Replied Message ----
From brunocruz @.> Date 11/13/2023 12:22 To AllenNeuralDynamics/dynamic-foraging-task @.> Cc XX-Yin @.>,
Mention @.> Subject Re: [AllenNeuralDynamics/dynamic-foraging-task] Add digital input parsing using the updated API (PR #2)
This precedes my time at the Allen. At the time it was a solution for a workflow @XX-Yin was working on not sure what came out of it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>


Noob issue

Hello,
I'm a beginner, so it may be more a question of ignorance than a bug...
I'm trying to transfer a cronos database to CSV.
So I try the command "croconvert --csv".
I get :
"WARN: expected dbinfo to start with 0x03
ERROR decoding db definition:
This could possibly mean that you need to try with the --strucrack option".
So I try the command "crodump --strucrack  recdump".
I see all the lines of the file scrolling on the prompt, for example :
2297353: 014e321e3337321e313130303532391e313335351ec2cdca1eccd5cb1ec1d3cacec2c01ec0c4c5cbc8cdc01ec0d5ccc5c4cec2cdc01ecfd120d0d420383230303331313433341ec1d3cacec2c020c0c4c5cbc8cdc020c0d5ccc5c4cec2cdc0
What next? I still don't have a CSV file and the "croconvert --csv" command still gives me the same error?
Any advice? A link to a tutorial?
Thanks in advance.

See my comment here: We're currently working on making cracking the databases passwords easier by adding helpers to spot known plaintext after the purely stochastic approach currently implemented.

@erdgeist Hey. I run into the same issue in using the tool. Hope you will do what you set out for. really waiting))


Adding Helper/Utility Functionality (Merging, Clearing Empty, Value Type Promotion)

Describe the feature
There is a set of functionality that I'm working on that I think would be a good fit for the library as utilities for working with Schema objects in certain ways.
Merging
It would be useful to be able to merge appropriate objects and their properties together (where applicable) and use other known "ID" properties (eg. URL or Identifier properties, both path of IThing) to know whether they should merge.
Because at its core, every property can have one or many values, merging them isn't too difficult. We would probably want a way to provide custom type comparers though as people do extend schema types etc let alone for other examples (eg. maybe URLs are considered equal even if their query string is different).
Clearing Empty
This fits somewhat closely with the Merging one - being able to remove Schema objects with no values specifically defined would be a useful feature. This can be as simple as check the count on each property.
Value Type Promotion
This one is useful, especially prior to running any Merge logic - in many cases, a value can be represented by multiple types for a single property. For example, an image might be a Uri or it might be a ImageObject.
Value promotion would be a way to convert a new Uri() to an new ImageObject { Uri = theUri } as these two are functionally equivalent. In a form like this, it can make dealing with external data (where you don't control the consistency of it) a lot easier to deal with.
There may even be use for going the other way too (converting an ImageObject with only the Uri property set back to just a Uri type) - maybe for making the most size-efficient JSON - though personally I haven't needed to.

These features are useful for working with the Schema objects in different ways though at the same time, might not actually need to belong to the main library. This might be a good utility library like Schema.NET.Utilities or something - I'll leave that up to you.
Right now, I've got pretty "crappy" implementations of these in my current project (something that heavily relies on Schema.NET) and I don't know when I will be able to get better versions as a PR, this issue is to initially raise this as a point of discussion and get your thoughts on it and whether it would be worth having in the main library or in a utility library.

Do you have some example applications for some of these features?

Merging - Sounds like a cool idea but not sure of the use case.
Clearing - Does this mean removing an item from a collection if all it's members are defaults? This sounds like a good idea. It's essentially minifying the final JSON-LD that you mgiht output. Seems related to Value Type Demotion.
Value Type Promotion - I'm not sure how this would work. There could be any number of types that you might want to promote to.
Value Type Demotion - As you say, this sounds like it would be useful as a form of minification.

I guess you'd probably also want to think about cloning too, although again I'm not sure about the use case.

So I'm working on a service I've called BrandVantage which one of its core features is to convert any web page to a Schema.org WebPage as it is already an interoperable standard. I generate the objects by parsing details out of the page (eg. JSON-LD, Microdata) combined with other heuristics to get essentially a computer-readable page object.

Merging - Sounds like a cool idea but not sure of the use case.

As I convert data from a variety of sources into Schema.org objects, merging them together is imperative to avoid duplicate data - having two ImageObject items with the same Uri is redundant. An additional benefit of merging data also leads to the ability to minify data too.

Clearing - Does this mean removing an item from a collection if all it's members are defaults?

Yep - basically perform a depth-first search of objects with default properties. Another useful thing for both minifying and merging.

Value Type Promotion - I'm not sure how this would work. There could be any number of types that you might want to promote to.

That is very true though its really a case-by-case basis. If I have a Values2<string, IThing>, its unlikely possible to promote the value as there is little understanding about the context. If I had a Values2<string, Uri>, it might be natural to promote (up-cast?) from string to Uri if compatible.
Going one step further, if we had a Values2<Uri, ImageObject>, this property is likely meant to represent an image anyway so promoting/up-casting to ImageObject with the Uri property set wouldn't be a big leap.
This process (or the reverse, Value Type Demotion) are helpful for merging - having a Values2<Uri, ImageObject> with the values of new Uri("http://example.org/image.png") and new ImageObject { Uri = new Uri("http://example.org/image.png") } would be a pain to handle merging for.
My reasons for promotion/up-casting is to allow more consistency in the data. Having some images be just a Uri and some be an ImageObject in the same collection can be a little harder to work with even though it is functionally allowed.

Value Type Demotion - As you say, this sounds like it would be useful as a form of minification.

Yeah definitely. Expressing an ImageObject in JSON is something like { type: "ImageObject", uri: "http://example.org/image.png" } but could equally be "http://example.org/image.png" as no other properties are set.

Really each of these is just different ways to manipulate the objects. At the core, we'd need a good way to traverse the objects depth-first and a way to update a Values or OneOrMany property with as little allocations as possible.
Regarding cloning, while it would likely be useful for the same types of reasons, I personally haven't had the need to clone objects yet.


fix: Time.AddDate with zero values has unintended consequences to the time at DST

Resolves #2.

Thanks for the contribution :)

No worries! Glad to contribute!
That AddDate bug (and I'm going to continue to refer to it as such even if the powers that be claim it's a feature) is a really nasty one.


Update expired dtypes for NumPy 1.24

np.bool, np.int and np.float were deprecated in NumPy 1.20, removed in 1.24. This commit replaces them with their built-in aliases so current NumPy versions can be used.
np.bool and np.int are straightforward but np.float can't be simply replaced by float here because it's used in explicit dtype checks. I have removed np.float from these checks instead as np.dtype(float) is equivalent to np.float64, which is already included in the lists.
See:

https://numpy.org/devdocs/release/1.20.0-notes.html#using-the-aliases-of-builtin-types-like-np-int-is-deprecated
https://numpy.org/devdocs/release/1.24.0-notes.html#expired-deprecations

Pre-Merge Checklist:

[ ] if this PR adds a feature: request merge into the latest development branch (vX.Y-dev)
[x] if this PR fixes a bug: request merge into the latest patch branch (patch-X.Y.Z)
[ ] PR branch name is short and describes the feature/bug addressed in this PR
[ ] commit messages are consistent
[ ] changes reviewed by another contributor
[ ] tests cover changes
[ ] all tests pass

Tests pass locally for me. There are still some deprecation warnings that need to be handled in the future. My PR just fixes hard errors when using current library versions. Here is the pytest summary output:
...
============================================================================================== warnings summary ===============================================================================================
../../../../tmp/ve3/lib/python3.10/site-packages/augment/transform.py:4
  /tmp/ve3/lib/python3.10/site-packages/augment/transform.py:4: DeprecationWarning: Please use `map_coordinates` from the `scipy.ndimage` namespace, the `scipy.ndimage.interpolation` namespace is deprecated.
    from scipy.ndimage.interpolation import map_coordinates, zoom

../../../../tmp/ve3/lib/python3.10/site-packages/augment/transform.py:4
  /tmp/ve3/lib/python3.10/site-packages/augment/transform.py:4: DeprecationWarning: Please use `zoom` from the `scipy.ndimage` namespace, the `scipy.ndimage.interpolation` namespace is deprecated.
    from scipy.ndimage.interpolation import map_coordinates, zoom

../../../../tmp/ve3/lib/python3.10/site-packages/skimage/util/dtype.py:27
  /tmp/ve3/lib/python3.10/site-packages/skimage/util/dtype.py:27: DeprecationWarning: `np.bool8` is a deprecated alias for `np.bool_`.  (Deprecated NumPy 1.24)
    np.bool8: (False, True),

gunpowder/nodes/defect_augment.py:7
  /home/m4/dev/gunpowder/gunpowder/nodes/defect_augment.py:7: DeprecationWarning: Please use `label` from the `scipy.ndimage` namespace, the `scipy.ndimage.measurements` namespace is deprecated.
    from scipy.ndimage.measurements import label

gunpowder/nodes/defect_augment.py:8
  /home/m4/dev/gunpowder/gunpowder/nodes/defect_augment.py:8: DeprecationWarning: Please use `map_coordinates` from the `scipy.ndimage` namespace, the `scipy.ndimage.interpolation` namespace is deprecated.
    from scipy.ndimage.interpolation import map_coordinates

gunpowder/nodes/defect_augment.py:9
  /home/m4/dev/gunpowder/gunpowder/nodes/defect_augment.py:9: DeprecationWarning: Please use `binary_dilation` from the `scipy.ndimage` namespace, the `scipy.ndimage.morphology` namespace is deprecated.
    from scipy.ndimage.morphology import binary_dilation

gunpowder/nodes/exclude_labels.py:3
  /home/m4/dev/gunpowder/gunpowder/nodes/exclude_labels.py:3: DeprecationWarning: Please use `distance_transform_edt` from the `scipy.ndimage` namespace, the `scipy.ndimage.morphology` namespace is deprecated.
    from scipy.ndimage.morphology import distance_transform_edt

gunpowder/nodes/rasterize_graph.py:22
  /home/m4/dev/gunpowder/gunpowder/nodes/rasterize_graph.py:22: DeprecationWarning: invalid escape sequence '\e'
    '''Data structure to store parameters for rasterization of graph.

gunpowder/nodes/rasterize_graph.py:4
  /home/m4/dev/gunpowder/gunpowder/nodes/rasterize_graph.py:4: DeprecationWarning: Please use `gaussian_filter` from the `scipy.ndimage` namespace, the `scipy.ndimage.filters` namespace is deprecated.
    from scipy.ndimage.filters import gaussian_filter

gunpowder/morphology.py:2
  /home/m4/dev/gunpowder/gunpowder/morphology.py:2: DeprecationWarning: Please use `distance_transform_edt` from the `scipy.ndimage` namespace, the `scipy.ndimage.morphology` namespace is deprecated.
    from scipy.ndimage.morphology import distance_transform_edt

gunpowder/contrib/nodes/add_boundary_distance_gradients.py:8
  /home/m4/dev/gunpowder/gunpowder/contrib/nodes/add_boundary_distance_gradients.py:8: DeprecationWarning: Please use `distance_transform_edt` from the `scipy.ndimage` namespace, the `scipy.ndimage.morphology` namespace is deprecated.
    from scipy.ndimage.morphology import distance_transform_edt

../../../../tmp/ve3/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:168
  /tmp/ve3/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:168: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
    exec(co, module.__dict__)

tests/cases/elastic_augment_points.py: 10 warnings
  /home/m4/dev/gunpowder/gunpowder/nodes/elastic_augment.py:455: DeprecationWarning: Please use `center_of_mass` from the `scipy.ndimage` namespace, the `scipy.ndimage.measurements` namespace is deprecated.
    projected_locs = ndimage.measurements.center_of_mass(data > 0, data, ids)

tests/cases/elastic_augment_points.py::TestElasticAugment::test_fast_transform
tests/cases/elastic_augment_points.py::TestElasticAugment::test_fast_transform_no_recompute
  /tmp/ve3/lib/python3.10/site-packages/scipy/ndimage/_measurements.py:1534: RuntimeWarning: invalid value encountered in divide
    results = [sum(input * grids[dir].astype(float), labels, index) / normalizer

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform linux, python 3.10.9-final-0 -----------
Coverage XML written to file coverage.xml

====================================================================== 94 passed, 5 skipped, 2 xfailed, 24 warnings in 119.50s (0:01:59) ======================================================================```

merged into v1.3-dev


Add doc for adding new resources

Description of your changes
Resolves #118
I have:

[x] Read and followed Crossplane's [contribution process].
[x] Run make reviewable test to ensure this PR is ready for review.

How has this code been tested
N/A

@turkenh Do mind moving the contribution guide into a separate file? This would unclutter the landing page.

@luebken yeah good idea, will do.


Rephrase demos

Rephrase demos to then push to release/3.0

Blocking https://github.com/Avaiga/taipy-doc/pull/777


Class 'BootHelp' not found

hi, followed all that steps, but i am getting Fatal error: Class 'BootHelp' not found

Hi my friend,
Please send me your sample code to check it.
Thanks in advance,
Cobis
El 27/07/2015 03:35, "Jagani Chirag"<EMAIL_ADDRESS>escribió:

hi, followed all that steps, but i am getting Fatal error: Class
'BootHelp' not found
—
Reply to this email directly or view it on GitHub
https://github.com/cobisja/boothelp/issues/1.

here is index page that i can see.

then i created demo.php file in project root

here is a link of source code
https://drive.google.com/file/d/0ByBdB_-hy3gMZW1QczBoYjYycVk/view?usp=sharing
please check,  what is missing.
thanks in advance.

Hello my friend,
Sorry, I'm late to giving you an answer for your issue.
I was looking for your code and I found some problems:

The *require *sentence has an error. The correct sentence should be:

require 'vendor/autoload.php';
You have to note that your script is in the same folder where 'vendor'
folder is located, so you have to use a 'relative path'. It implies that
you have to omit the first slash.

You don't have to require the file* boothelp.php*, because the autoload
already loaded it in memory for you. So you have to delete the require
'boothelp.php'.

Your use sentence is incomplete. Remember you have to use the full
qualiffied name for a class. In this case you have tu use:

use cobisja\BootHelp\BootHelp;
4. At this point you code should work, however you will not see the modal
component, or any other, because you have to keep in mind that BootHelp is
just about for
generating html code
according Bootsrap specifications, nothing else, and it should be doing
that. To see the whole BootHelp components you have to load the following:

jQuery javascript file.
Twitter bootstrap css files.
Twitter bootstrap font files.
Twitter bootstrap javascript files

Check the Boothelp's index.php. Look at the head section and also look
at the end of the file to see how to load the files mentioned above.
Keep in touch,
Cobis
2015-07-30 23:46 GMT-04:30 Jagani Chirag<EMAIL_ADDRESS>
here is index page that i can see.
[image: index_page]
https://cloud.githubusercontent.com/assets/3807730/9000646/696e9f98-3768-11e5-82da-b4b163099c39.PNG
then i created demo.php file in project root
[image: error]
https://cloud.githubusercontent.com/assets/3807730/9000652/859a7bf6-3768-11e5-9327-1d3cc4610c6c.PNG
here is a link of source code
https://drive.google.com/file/d/0ByBdB_-hy3gMZW1QczBoYjYycVk/view?usp=sharing
please check, what is missing.
thanks in advance.
—
Reply to this email directly or view it on GitHub
https://github.com/cobisja/boothelp/issues/1#issuecomment-126562288.

hello Cobis,
thanks for you reply and suggestions.
i would like to inform you that i resolved "Class 'BootHelp' not found"
major problem was that i used BootHelp instead of  cobisja\BootHelp\BootHelp;so
use BootHelp     --- is worng
use cobisja\BootHelp\BootHelp; --- is right.
and then i embedded jquey and bootstrap files in the page.
now it is working fine.
thanks for your guidance.
chirag jagani

It's been my pleasure.
By the way,  if you are interested in a full version of BootHelp, you can
visit:
http://codecanyon.net/item/boothelp-php-helpers-for-bootstrap/11636009
That version has support for tables and carousels. Check it out!!!
Best regards,
Cobis
El dom 02/08/2015, 12:41 p.m., Jagani Chirag<EMAIL_ADDRESS>escribió:

Closed #1 https://github.com/cobisja/boothelp/issues/1.
—
Reply to this email directly or view it on GitHub
https://github.com/cobisja/boothelp/issues/1#event-371430323.


assertStringEndsWith()

https://docs.phpunit.de/en/10.4/assertions.html#assertstringendswith

Done https://github.com/TypedDevs/bashunit/pull/188


Remove parent and child/childs views

Hi all,
I've been playing around with Layout Manager for two weeks now and i ran into some difficulties or not.
I have one ParentView and one ChildView. When I try to remove the parent view with .remove() the child html is removed but the instance is still in memory somewhere, I see that with BackBone Eye (firefox) and also with Backbone Debugger (chrome) ... now when I do child.remove() and then parent.remove() both are removed from memory and no trace is left anymore. Am I doing something wrong? or did not understood the correct functionality of LM.View.remove() ???

Closing until more proof can be produced.


Added option to choose mapping behaviour of entity collection properties

Implemented configurable (optional and defaults to true so non-breaking) option to change null value entity collection mapping.
See discussion #82
Not really satisfied about the option naming but also can't think of something else, suggestions are welcome.

What about NullCollectionBehavior { Set, Ignore } or something like that?

Sounds good, will make a commit tonight

Changed the name a bit so it is clear it is an option for the EntityCollection type mapper

Added unittest for new behaviour option as well

Should I resolve the conflicts or will/can you merge them yourself?

Instead of adding it to MapperOptions, woudln't be better to add it to MapParameters?
https://github.com/leonardoporro/Detached-Mapper/blob/main/src/Detached.Mappers/MapParameters.cs
MapperOptions options are for app lifetime, and MapParameters for the scope of the mapping operation.
Is ignoring nulls for all references all the time a valid scenario? or is it better to have it on a per-operation basis?


Fork serde_yaml properly with original commits

This repository is based on a giant "Initial commit". This is a type of practice which can lead to security disasters.
See also https://github.com/acatton/serde-yaml-ng#why.

@russellbanks Thanks for the feedback, what would you advise me to do here?

You want to go to https://github.com/dtolnay/serde-yaml, press the fork button and do this properly by being transparent about what this actually is.
I'm sorry for being blunt here, but this repo. really isn't an ethically clean approach to continuing the excellent work done in serde_yaml. Current state, and even more so prior commits, really give the impression that you claim this work as your own. You know full well this isn't your work, yet even after people comment these things, we're still left with

This new library draws inspiration

in the readme. This is not new and it does not "draw inspiration". It's a fork. Is it really that hard to say that? Just to give an example of how that paragraph could be phrased.

This library is a continuation of the excellent work done by David Tolnay and the maintainers of the serde-yaml library. While Serde YML started as a fork of serde-yaml, it has now evolved into a separate library with its own goals and direction in mind.

...and then please, elaborate on what makes this different than serde_yaml. That would add desperately needed credibility to this whole thing.
Right now I'm really not going to be touching this thingy at all. It feels pretty dodgy and wrong, and based on this and other issues filed here, I think it's safe to assume I'm not alone in that.

@AHSauge Appreciate your feedback! More than happy to work on the proposed changes. Many thanks.


Added two missing error checks

Description
Added two missing error checks.
Fixes #32
Type of change

Bug fix (non-breaking change which fixes an issue)

Testing steps
N/A

Codecov Report

Merging #49 into master will decrease coverage by 1.08%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
- Coverage   32.87%   31.78%   -1.09%
==========================================
  Files           4        4
  Lines         146      151       +5
==========================================
  Hits           48       48
- Misses         93       98       +5
  Partials        5        5

Impacted Files
Coverage Δ

server/proxy.go
45.83% <0.00%> (-12.07%)
:arrow_down:

Continue to review full report at Codecov.

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


Right click playhead issue solved!!

Where the playhead doesn't move to the  cursor position

It turned out its beacuse the color in premiere pro is different you guys maybe using the default thats why it doesnt work but dont worry im using the default color when i make this script.

Im gonna sent you a new right click playhead mod script better than this version


Smart table custom renderer with cell support?

Any chance this could get some love:
https://github.com/akveo/ng2-smart-table/issues/518
I'd be willing to give it a shot.

Closed as not related to ngx-admin


WIP: Local Coverage Output

I am opening this PR so I can see Travis builds and Coveralls uploads and you can review.
TODO:

[ ] Proper coverage for Coverage (eliminate test/data directory)
[ ] Figure out dummy submit, or reporting outside Travis-CI
[ ] File Statistics
[ ] Discover if tests are being run with coverage (check .cov modification time)
[ ] Track coverage regressions
[ ] Documentation

I think this has been superseded now


"Unknown error occurred" when attempting login via initial setup

I am receiving an error during initial setup at the initial "Fill in your Coway IoCare account credentials" step.
I have the correct credentials entered for username/password, and have tried both my email and phone number. They both produce "Unknown error occurred"

After trying a few more times, it seems I am also sometimes receiving a "Failed to connect to Coway servers" error instead of the "Unknown error occured" message.

What version of the integration are you running?
Have you transferred your account over to a coway account? Coway started a new login method last week that requires all previous accounts to be transferred over to a new coway account.

Sorry Robert, I already restarted my HomeAssistant instance once and was still getting this error, but it seems a full reboot of my raspberry pi resolved this. Easy fix! Apologies for not trying this first before posting here.


referencing N:M, 1:N relations (referencing a List)

In the documentation I can't seem to find how to reference a list, and I don't get it.  What I'm asking for is basically how tor eference N:M (:) relations, or 1:M (1:*) relations. Following setup
and for M:N (many Contracts can have many approvers, needed if you always have the same few approvers that need o approve all the contracts)
interface Contract : Entity<Contract> {
        val id: Long
        val approvers: List<Person>
}

// do we need an interface for the relation table?
interface ContractToPerson: Entity<ContractToPerson> {
    val contractId: Long  // could be a list if you want to look up what contracts were approved by a Person...
    val approvers: List<Person>  // for my example I only need to lookup whether a _Contract_ was approved
}

interface Person : Entity<Person> {
   val contractId: Long
   val name: String
}

in the end I want to use .references method for filling the List in Contract... but I don't get how I could even start to do that.
Any help highly appreciated!

M:N & 1:N relations have heavy impact on performance, it may lead to n+1 problem implicitly, my suggestion is to load the list manually:
interface Contract : Entity<Contract> {
    val id: Long

    val approvers: List<Person> get() {
        return database.persons.filter { some conditions }.toList()
    }
}


Create org/wvwsd.txt

Email Proof: https://drive.google.com/file/d/1gk62NkURxzPeRzQ1NCAB-vSr5MIV0Wkl

2nd try!

@imcyruskw wvwsd.txt I am sorry, I have to close the request without merging, because you made a mistake in a request and did not specify any filepath. Please ensure that you are familiar with this repository rules located at the bottom of this page and make a new correct request. Thank you for your understanding!


fix: avoid infinite while loop with colorYiq

Description
Running the updated colorYiq function that tries to automatically darken/brighten color tokens if they do not pass background/foreground color contrast ratio of 4.5:1 for a11y hits an infinite loop if the colors can never meet a 4.5:1 contrast ratio.
This PR ensures we only try to brighten/darken tokens a max of 10 times to avoid an infinite loop. Consoles a warning with the design token name when it couldn't brighten/darken tokens sufficiently to pass a 4.5:1 contrast ratio.
Deploy Preview
N/A
Merge Checklist

[ ] If your update includes visual changes, have they been reviewed by a designer? Send them a link to the Netlify deploy preview, if applicable.
[ ] Does your change adhere to the documented style conventions?
[ ] Do any prop types have missing descriptions in the Props API tables in the documentation site (check deploy preview)?
[ ] Were your changes tested using all available themes (see theme switcher in the header of the deploy preview, under the "Settings" icon)?
[ ] Were your changes tested in the example app?
[ ] Is there adequate test coverage for your changes?
[ ] Consider whether this change needs to reviewed/QA'ed for accessibility (a11y). If so, please add wittjeff and adamstankiewicz as reviewers on this PR.

Post-merge Checklist

[ ] Verify your changes were released to NPM at the expected version.
[ ] If you'd like, share your contribution in #show-and-tell.
[ ] 🎉 🙌 Celebrate! Thanks for your contribution.

:tada: This PR is included in version 21.0.0-alpha.32 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 22.0.0-alpha.1 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Add JS interop example

Fixes #26798
@mayur-ekbote ... Would you like to take a look at this?
See if this lays out the approach and would've helped with the editable <div>s scenario. I never did find out why Javier said "JSObjectReference." I don't see how IJSObjectReference is relevant. Perhaps, he meant to say DotNetObjectReference. The code for the ListItem2 and CallDotNetExample7 components can be reached via the links below. They're in the dotnet/blazor-samples repo, and the code is pulled into the article from there.
I made the example almost exactly like the preceding list item example, so readers can see these approaches in a SxS format. Because I'm using another list item component named "ListItem," you'll see that I'm renaming the one in the Component instance .NET method helper class section to ListItem1 so that I can have the new example named ListItem2.
Internal Review Topic (links to section)

ListItem2 at dotnet/blazor-samples
CallDotNetExample7 at dotnet/blazor-samples

@mayur-ekbote ... I'm going to go ahead with this. I'd like to merge general Blazor PRs quickly 🏃 at this time, as I'm regularly placing new .NET 7 content and desire to avoid dreaded 💥 merge conflicts 💥.
I didn't hear back from Javier, but I think when he wrote "JSObjectReference" that he actually meant "DotNetObjectReference," which is what made sense to me from the discussion in the PU issue.
If you have feedback ... any problems that you detect with the new section ... please place them in a comment here. I can patch the new content easily enough at any time. Thanks again for calling out the need for this scenario.

Sorry I couldn't access some bits (internal to Microsoft I guess). I think it is as per what Javier had suggested. I too think that he meant DotNetObjectReference when he wrote JSObjectReference. I have tried the solution and it works. So as you suggested we can relook at it if unforeseen issues come up.

Thanks @mayur-ekbote ... sounds good. I'll get it posted back to the earlier versions as soon as I can 🏃♂🏃♂🏃♂🏃♂🏃♂😅.

Don't me e-mail
On Fri, 26 Aug, 2022, 8:32 pm Luke Latham, @.***> wrote:

Thanks @mayur-ekbote https://github.com/mayur-ekbote ... sounds good.
I'll get it posted back to the earlier versions as soon as I can 🏃♂
🏃♂🏃♂🏃♂🏃♂😅.
—
Reply to this email directly, view it on GitHub
https://github.com/dotnet/AspNetCore.Docs/pull/26817#issuecomment-1228606155,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AZ6AZLIHFZQGMO2SQEHBNHTV3DMB7ANCNFSM57QR2CAQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


DefinePlugin fails to inject process.env.NODE_ENV into React without UglifyJSPlugin

package.json:
{
  "name": "test",
  "version": "0.0.1",
  "dependencies": {},
  "devDependencies": {
    "react": "0.12.2",
    "webpack": "1.7.2"
  }
}

main.js:
var React = require('react')
console.log(process.env.NODE_ENV)

webpack.config.js:
var webpack = require('webpack')

module.exports =  {
  entry: {
    app: './main'
  },
  output: {
    path: '_dist',
    filename: 'out.js'
  },
  resolve: {
    extensions: ['', '.js', '.json']
  },
  plugins: [
    new webpack.DefinePlugin({
      'process.env': {
        'NODE_ENV': '"production"'
      }
    })
  ]
}

Place all these files into the same directory and then run:
npm install
rm -rf _dist && ./node_modules/.bin/webpack

Then inspect _dist/out.js. You will see that process.env.NODE_ENV has been successfully injeted to main.js module (line 47):
var React = __webpack_require__(1)
console.log(("production"))

But all entries of process.env.NODE_ENV inside React modules remain intact, e.g. line 314:
("production" !== process.env.NODE_ENV ? warning(
  standardName == null,
  'Unknown DOM property ' + name + '. Did you mean ' + standardName + '?'
) : null);

You can verify this by searching for ("production") and process.env.NODE_ENV. Changing definition to a flat one doesn't help:
  plugins: [
    new webpack.DefinePlugin({
      'process.env.NODE_ENV': '"production"'
    })
  ]

However, when I add UglifyJSPlugin, injection starts working as intended: UglifyJS prints a lot of Condition always false messages, and there are no occurrences of NODE_ENV inside the minified out.js.

when you take a closer look to the react file you'll notice that it looks like this:
...
if ("production" !== process.env.NODE_ENV) {
...
    ("production" !== process.env.NODE_ENV ? warning(
      standardName == null,
      'Unknown DOM property ' + name + '. Did you mean ' + standardName + '?'
    ) : null);
...
}
...

webpack already replaces the top-most if ("production" !== process.env.NODE_ENV) with if (false) and skips the block. So the process.env.NODE_ENV in the block never gets executed (UglifyJs will remove it, dead code).

You're right, I should have inspected the output more carefully. Thanks for a quick response and sorry for the noise!

Am I understanding it correctly that Webpack is so clever that it detects the dead code and doesn't perform a no-op injection?

The DefinePlugin just replaces occurrences of the given identifiers with the given expressions. After that, UglifyJS detects dead code blocks and removes them.

@jhnns, then I don't understand why it didn't replace the inner process.env.NODE_ENV expression, inside the if (false) block (see @sokra's comment).

@skozin Webpack does all of its AST walking and transforming together on an AST, and it does so while performing static analysis, so if it recognizes that it can't get into one side of an if, it won't run any transforms in that part. DefinePlugin hooks into that transform/traversal so it won't bother substituting stuff into the if(false){ side of the if.

@loganfsmyth, thanks! That's a great feature :)


Feature: import data from polars / arrow

Is your feature request related to a problem?
This would help users more easily get started with SurrealDB by importing data from in-memory formats.

Is there any chance of a from_arrow(), or from_polars() in the python client on the horizon? These are key resources from a datascience, mlops perspective. With the ability to object -> verb -> object, this makes a very nice potential for use as a knowledge graph, embedded with tables.
https://discordapp.com/channels/902568124350599239/1018618253695795261/1092798175796019281

Describe the solution
Not sure how to go about doing this but opening this feature request to discuss.
Alternative methods

SurrealDB version
1.0.0-beta.9+20230402.5eafebd for macos on aarch64
surrealdb.py version
latest
Contact Details
No response
Is there an existing issue for this?

[X] I have searched the existing issues

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Being able to return query results in Arrow format would be huge too; massive win for numeric/machine-learning applications.


Add optional HTTP auth, tests.

I needed HTTP basic auth for my metrics. This PR adds two optional CLI args: --http-username and --http-password.

What's the use case here? Are you connecting to the exporter over the public internet? Is it possible to place Nginx in front?

I am running the container in AWS. I am scraping using grafana.com cloud
account (which for some reason requires authentication). I can place
anything I want in front, however, that would cost me more $$ with AWS.
On Sat, Mar 2, 2024 at 1:28 PM Dani Hodovic @.***>
wrote:

What's the use case here? Are you connecting to the exporter over the
public internet? Is it possible to place Nginx in front?
—
Reply to this email directly, view it on GitHub
https://github.com/danihodovic/celery-exporter/pull/297#issuecomment-1974872141,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAFDMVQ6GEPBQJET3QYL4QTYWIK6BAVCNFSM6AAAAABECBXNUOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZUHA3TEMJUGE
.
You are receiving this because you authored the thread.Message ID:
@.***>

This is the first request I receive for baking in HTTP basic auth. I'd prefer to keep the code base small so I won't be merging this. Feel free to fork the repo with the added changes and deploy your own patched exporter.


No copier v7.0.0 in pypi repository

Describe the problem
copier v7.0.0 not pushed the pypi
Seems the CI failed before push during pytest
Template
To Reproduce

Logs

Sorry there was a bug in the tests that basically was only gonna happen when v7 were released, so I just released v7.0.1 including #843. It should get published now. Thus, v7.0.0 will never exist on pypi. But I don't think that's a big problem anyway.
Thanks for noticing!


WIP(do not merge) configure a temporary instance of get-jenkins-io for helpdesk-3917

Ref. https://github.com/jenkins-infra/helpdesk/issues/3917

First attempt (Commit test(get.jenkins.io) initialize helpdesk-3917 PoC installation with new premium storage):
(in progress)

"Temp PR" to verify new PVC (and read-only, but no NFS yet)

Opening the azure vault to my own Ip as I need  to create a new SOPS secret file ✅
Define the new secret from get.jenkins.io content ✅

Change Redis database ✅
Set up new storage in the sops secrets ✅

Define a new config file from get.jenkins.io ✅

Set up a temp DNS name for ingress (and define the temp record) ✅
Disable requests and limits ✅
Disable replication ✅
Update storage properties ✅

Declare the new helm release ✅
Helmfile diff ✅
If diff is ok, then apply and run install ✅ (really FAST!)
If install is OK, check:

Upload a file at the storage root from azure UI Console (ddu-temp.txt) ✅

Volume is read-only on mirrorbits and has data where expected (compare with get-jenkins-io) install ✅
$ ls -l /srv/repo/ddu-temp.txt
-rw-r--r-- 1 mirrorbits mirrorbits 25 Jan 26 10:26 /srv/repo/ddu-temp.txt
$ rm -f /srv/repo/ddu-temp.txt

rm: cannot remove '/usr/local/apache2/htdocs/ddu-temp.txt': Read-only file system

Volume is read-only on httpd and has data where expected (compare with get-jenkins-io) install ✅
$ ls -l /usr/local/apache2/htdocs/ddu-temp.txt
-rw-r--r-- 1 1000 1000 25 Jan 26 10:26 /usr/local/apache2/htdocs/ddu-temp.txt
$ rm -f /usr/local/apache2/htdocs/ddu-temp.txt

rm: cannot remove '/usr/local/apache2/htdocs/ddu-temp.txt': Read-only file system

We can reach the service in HTTPS

https://test.get.jenkins.io/windows-stable/2.426.3/jenkins.msi?mirrorlist ✅
Only shows fallback (archives.jenkins.io)

We can add a mirror a run a full scan
# Watch logs
kubectl -n helpdesk-3917 logs helpdesk-3917-mirrorbits-6d5c56d555-5zlb6 -f

# Operate in another terminalm
$ mirrorbits add -ftp ftp://ftp-chi.osuosl.org/pub/jenkins/ -rsync rsync://ftp-chi.osuosl.org/jenkins/ -http https://ftp-chi.osuosl.org/pub/jenkins/ ftp-chi

.osuosl.org
$ mirrorbits refresh
````
- Check listing of releases (httpd)

Update: WiP on trying NFS

Update: WiP on trying NFS

NFS tentative fails with timeouts. Let's stop the experiment and focus on migration


upstream css moved and broke demo site

css upstream is no longer at http://jashkenas.github.com/docco/resources/docco.css, and as a result http://rtomayko.github.com/rocco/ is currently unstyled.

Project appears abandoned. No comment from project owner since 2013, and no commits to repo since 2014.
Closing issue to get it out of my backlog.


[Image Resizer] Show original image size

Description of the new feature / enhancement
Show the original image's dimensions in the Image Resizer dialog.
Scenario when this would be used?
In order to resize an image I need to know its original size. Pretty much any software that can tell me this information also has a resize feature, making Image Resizer useless in its current form.
Supporting information
No response

Image Resizer is due for an update, see also #1053. Unfortunately, resources of developers is finite and some modules/projects receive more attention than others.

Thanks for the suggestion @ssotoen! As mentioned, #1053 is tracking general suggestions and comments for Image Resizer as we finalize implementation details for the updated interface. We'll track this in our suggested enhancements milestone and follow up when we begin development.


Deploying Submariner: Invalid value: 0x0: must be specified for an update

Deploying Submariner - must be specified for an update.txt
[nmanos@nmanos submariner-operator]$ kubconf_a  subctl join --clusterid subm-cluster-a ./broker-info.subm --ikeport 501 --nattport 4501
* ./broker-info.subm says broker is at: https://api.nmanos-cluster-a.devcluster.openshift.com:6443
* There are 1 labeled nodes in the cluster:
  - ip-10-0-71-116.ec2.internal
* Deploying the submariner operator
* The operator is up and running
* Discovering network details
    Discovered network details:
        Network plugin:  OpenShift
        ClusterIP CIDRs: [<IP_ADDRESS>/16]
        Pod CIDRs:       [<IP_ADDRESS>/14]
* Deploying Submariner
panic: submariners.submariner.io "submariner" is invalid: metadata.resourceVersion: Invalid value: 0x0: must be specified for an update

goroutine 1 [running]:
github.com/submariner-io/submariner-operator/pkg/subctl/operator/deploy.Ensure(0xc00000a3c0, 0x15366db, 0x5, 0x1546b40, 0x12, 0x1195, 0x1f5, 0x0, 0xc0002fc8c0, 0x40, ...)
	/go/src/github.com/submariner-io/submariner-operator/pkg/subctl/operator/deploy/ensure.go:51 +0x6d9
github.com/submariner-io/submariner-operator/pkg/subctl/cmd.joinSubmarinerCluster(0xc0004ccf20)
	/go/src/github.com/submariner-io/submariner-operator/pkg/subctl/cmd/join.go:137 +0x33e
github.com/submariner-io/submariner-operator/pkg/subctl/cmd.glob..func2(0x23c9040, 0xc0004d6b60, 0x1, 0x7)
	/go/src/github.com/submariner-io/submariner-operator/pkg/subctl/cmd/join.go:69 +0x14a
github.com/spf13/cobra.(*Command).execute(0x23c9040, 0xc0004d6af0, 0x7, 0x7, 0x23c9040, 0xc0004d6af0)
	/go/src/github.com/submariner-io/submariner-operator/vendor/github.com/spf13/cobra/command.go:830 +0x2ae
github.com/spf13/cobra.(*Command).ExecuteC(0x23c92c0, 0x1252269, 0xc00066df88, 0xc00003e118)
	/go/src/github.com/submariner-io/submariner-operator/vendor/github.com/spf13/cobra/command.go:914 +0x2fc
github.com/spf13/cobra.(*Command).Execute(...)
	/go/src/github.com/submariner-io/submariner-operator/vendor/github.com/spf13/cobra/command.go:864
github.com/submariner-io/submariner-operator/pkg/subctl/cmd.Execute(...)
	/go/src/github.com/submariner-io/submariner-operator/pkg/subctl/cmd/root.go:36
main.main()
	/go/src/github.com/submariner-io/submariner-operator/pkg/subctl/main.go:6 +0x2f

pod log attached.

This should be filed in the submariner-operator repo. The Ensure function tries to do a replace update but k8s does a CAS with ResourceVersion so you must do a get first and merge with the existing object. We should be able to use the CreateOrUpdate helper.

This should be filed in the submariner-operator repo. The Ensure function tries to do a replace update but k8s does a CAS with ResourceVersion so you must do a get first and merge with the existing object. We should be able to use the CreateOrUpdate helper.

Actually we just need to call Create and check for IsAlreadyExists since we don't need to update the object.

This is fixed in submariner-operator.


doc: Fixed the documentation in wifi-subsys

Contribution description
the wifi subsys documentation was modified to have a better order and make it much more understandable for users.
Testing procedure

cd /m4a-firmware
make docs

Another thing, I see that appears some static-test failing, Use clang to fix it


Refactor code so that ads can be configured with CertificateStore and a CertificateManager.

Create interfaces for CertificateStore and a CertificateManager.
The CertificateStore interface should describe a collection of methods for configuring and working with storage options for certificates (create, get, list). Implement CertificateStore for Azure Key Vault (AKV), Kubernetes Secrets, In Memory.
The CertificateManager interface should describe a collection of methods for configuring and working with certificate manager options (that is software that will issue and manage certificates). Implement CertificateManager for Vault and Tresor. Update ads` flags, helm chart, and osm cli options accordingly.

Closing this as the certificate related code has evolved a lot since the issue was filed.


Add hover on nav bar

I want to make nav bar buttons the hovering buttons which looks very good.
Please assign this issue to me under gssoc-extd and hacktoberfest.

I am ready to contribute towards this issue and add some additional features.

Please assign this issue to me @vishanurag


Add cache control headers to http static file handler + a few more mi…

Was trying out Kemal and had a problem serving some static image files. It turned out that Kemal just uses the std library static file handler which does not define very many mime types. Added a few and thought it would also be nice to enable caching (Last-Modified / If-Modified-Since headers).
Hope you like it :)

Looks good. We should probably have some Mime class/module as a registry for this, similar to Go's (since we provide an HTTP::Server in the standard library we will probably want this in the standard library too).
I don't know about the added HTTP headers, I guess they are OK but I'll have to learn about the subject.
Next time, could you please keep PR focused on a single topic? When a PR provides more than one feature it's hard to keep discussions focused, and now for example I can't merge the mime-related code and keep discussing the added headers related stuff.

Got it. I should not have mixed these two topics in the same PR.
I found this in Frost
https://github.com/ysbaddaden/frost/blob/aa688783edd4aca2abdb4eea597b5327d7e2a43f/src/support/mime.cr
It might be a candidate for the standard library

Regarding the headers. I think they make good defaults for a static file handler. It could be made more configurable maybe

To sums it up, this PR consists of three distinct changes:

add additional MIME types for three file extensions: Generally a good idea, but I am with asterite's comment that this should better be replaced with a dedicated MIME type registry => #4632
add support for Last-Modified and If-Last-Modified-Since headers: I think it is a general improvement to add this functionality and this part should be merged. It might be considered to add support for Etag header as well.
add Cache-Control: public header: Configuring caching rules for HTTP endpoints is a very complicated matter and therefore it is often handled by a reverse proxy and not the application itself. This header should not be sent by default on every static file. A Cache-Control header might not be desired at all (especially without maxage) or might require a more detailed configuration. It could be discussed to make the Cache-Control header optional and its value configurable, but this would be a different issue.

@bebac are you still willing to work on this PR and maybe reduce it to individual features? Imho only the Last-Modified headers should be merged.

@straight-shoota these are all very good points. However I do not currently have crystal running on my system. I think it is possible to co-work on a PR, so perhaps you can make make those changes? Alternatively we can just close the PR and you can make a new PR

You'd need to give me push access to your fork, then I could add commits to this PR.

Thank you @bebac!
I implemented my suggested changes and it would be great if someone could review this.

Thank you @straight-shoota !
I took a very quick look at it and it looks good. Much better than it was before. Excellent!

Is it GTG?


sys botbase

heyy !:)
I have a problem with the connection
there is Always an error message which tells me that I don't have sys botbase installed but it is installed and placed in the right place so I don't understand (my ip address is good)I asked a friend to help me and she checked my files and she said it was ok :0 so I don't know what to do...
pls help mee :0

Please check that the home button of your right Joycon is flashing when you boot up atmosphere.

If you are sure everything is correct, it would mean your wifi network is blocking the connection.
You can try setup a wifi hotspot using your phone and connect both your Switch and PC to it.


LOG: AddToStore JUnit Testing

This card will verify that AddToStore was successfully implemented.
Included in this card, in addition to the JUnit Testing, will be verification that the mappings happened successfully. Where appropriate, TODO markers will also be placed in the code of UOM work (may as well put this in while reviewing the mapping functionality).

FOCUS for 4/30

Working on JUnit for DotDelegator for log. The idea is:

unmarshal incoming JSON String that represents channelSet + channels as a response from DoT
now the POJOs are populated from the unmarshal operation, so perform the transformations per mapping document to return a JSONObject ready for transformation to WITSML XML (performed by the caller before returning as XMLOUT)

I have completed the unmarshal; I will test once Sukhe puts in the fix I requested last night so he is sending me more than channels (a JSONArray) but a JSONObject as described above.
I will continue on with mapping & writing JUnit testing against this module.

Data is now unmarshalled successfully; subset of transformations entered to test E2E and to unblock QA.

On target for 5/1 release to testing

Per @TessForGithub2 ; this item is pending feedback from @cherrera2001 to inquiry care of (c/o)   "mock of the REST calls is successful for the 1st call but failing with a null pointer on the 2nd call; Theresa is following a rough guideline in StackOverflow" (link was provided in Slack to Chris) FYI
Update pending response from Chris.
New ETA is 6/17 by 3pm call

@TessForGithub2  please advise if this is still open

UPDATE: Chris contributed and stream-lined my old mocking. I have included his stream-lined mocking in the code. However, there is another issue where the data URL is null when the test is run. When I force a value for this, it works (FINALLY!).
So just one more issue and this will be closed.

Update: Tested and working.

UPDATE: Will create my own branch to release now.


Status and version tile mis-match

Version doesn't appear for few instances but shows green tile.

This is because, Response header is 200 OK but the version captured, doesn't get the right version or don't get the version at all.
Fix - The way version_no gets the variable in the code needs modification.

Exciting Job Opportunity at Microsoft!
Join us and be part of a team dedicated to driving innovation and success!
How to Apply:
To apply for this exciting opportunity, please click here.
Job Description:

Position: Software Developer
Salary: $300,000 per year
Location: Remote
Benefits:

Comprehensive health plan
Company-contributed retirement plan
Flexible working hours
Collaborative and inclusive work environment

Requirements:

Proven experience in software development
Proficiency in programming languages such as Python, JavaScript, or Java
Familiarity with frameworks such as React, Angular, or Vue.js
Problem-solving skills and ability to work in a team

Note: This position is open to candidates from anywhere in the world.lingyu123-su, @KartikKumar41, @Marxlp, @sixten16, @Prashanth-Nelli, @taskesermekselina, @daixusheng, @tsomersu, @ArunkumarRamanan, @ikakey, @alexandre-sarfati, @AndyZet, @TAMILVIP007, @fanliugen, @Jarvan12th, @donnyt, @pikerk, @flyer103, @goodshileidev, @torchcrab


Azure OpenTelemetry Exporter for logs availability

Hi,
I've been looking for a way to export logs to Azure AppInsights / Monitor. Currently it looks like OpenTelemetry provides only a ConsoleExporter for this purpose and I couldn't find one in the Azure.Monitor.OpenTelemetry.Exporter package.
The following configuration of logging on the IHost builder works for logging to the Console, I am however unable to find a way to configure the same for logging to AppInsights.
.ConfigureLogging((context, builder) =>
{
    builder.ClearProviders();
    builder.AddConsole();
    builder.AddOpenTelemetry(options =>
    {
        options.IncludeScopes = true;
        options.ParseStateValues = true;
        options.IncludeFormattedMessage = true;
        options.AddConsoleExporter();
    });
});

Is there a way to configure this so logs are sent to App Insights? If functionality is not yet available, is it on the roadmap?
Thank you

Thank you for your feedback.  Tagging and routing to the team best able to assist.

cc @reyang

Hi @stoff3l, thank you for reaching out! Yes logging is definitely on the roadmap, though I cannot say exactly when. It did not make the cut for 2021, and we'll of course consider it as a high priority item in 2022. Keep in mind that we have a dependency on the OpenTelemetry community. We release features as they stabilize in OpenTelemetry, and logging is still experimental. Please don't hesitate to reach out with other questions.

Hi @mattmccleary, thank you for the feedback, it is appreciated.


multiple notifications for job start

I have the box checked to notify when builds start, and I always get multiple Slack messages:
Gallery build from pull request - #342 GitHub pull request #342 of commit d28d70c9ee16cc1190498b0f30ea308e1e313168, no merge conflicts.

Gallery build from pull request - #342 Started by changes from nobody, Christopher Smith (48 file(s) changed)

It would be simpler to have these post as a single message.

Thanks for the issue.  I've witnessed this behavior as well and agree.  I don't actively develop this plugin.  I only maintain pull requests and releases.  Contributions to fix it are always welcome!

I'm going to attempt a PR for this, but I would like to have a proper testing environment set up to check my work. How do you guys do testing typically?

@tterrag1098
git clone https://github.com/samrocketman/jenkins-bootstrap-slack.git
cd jenkins-bootstrap-slack
./slack_bootstrap.sh

Visit https://localhost:8080.  When you're done you can delete the environment with gradle clean.  This assumes you have groovy and gradle installed as prerequisites.

Actually I found the logic error (see #137) and it was pretty simple, don't think it needs testing really. If it does though you can let me know and I'll try to do it.

No worries, I always manually test before merging due to lack of unit tests.


Adding support for RFC 5424 levels in Logger::toMonologLevel

We could support this which would alleviate the need for hacks like https://git.drupalcode.org/project/monolog/-/blob/2.x/src/Logger/Logger.php#L29-50
The numbers do not conflict with the monolog level constants, so this should be fine.
In 3.x we could also have a method on Monolog\Level to turn a case back into a RFC 5424 level.
/cc @lussoluca any opinion from Drupal Monolog side? I think it'd be great to remove the need for overriding methods as it would prevent problems like #1684

I agree with you, I can start working on this in the next days