-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python311Packages.nireports: init at 23.2.1 #317618
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed points
- package path fits guidelines
- package name fits guidelines
- package version fits guidelines
- package builds on x86_64-linux
-
meta.description
is set and fits guidelines -
meta.license
fits upstream license -
meta.maintainers
is set - source is fetched using the appropriate function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests on python311 fail 50% of the time, while creating different tmp files. Looks like they don't work asynchronously. Specifically test_reportlets.py
while importing templateflow
on line 34. I have NIX_BUILD_CORE = 8
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabled this test.
Also, |
20e81af
to
959c312
Compare
"test_cifti_surfaces_plot" | ||
"test_mriqc_plot_mosaic" | ||
# fails when run under pytest-xdist | ||
"test_reportlets.py" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That won't disable the test, it still being run. I think to disable all tests in a file you have to use disabledTestPaths
and specify path from repo root.
Another way this problem can be solved, is by forcing pytest-xdist to run things synchronously. Since there aren't that many tests, and they are quick, distribution is not that important. And running more test is a good thing.
I think number of processes is set by this hook:
https://github.com/NixOS/nixpkgs/blob/2d7a6fdc142af32d68d669658199926053b20d57/pkgs/development/python-modules/pytest-xdist/setup-hook.sh#L1C1-L5C2
However, specifying whole file in disabledTestPaths
is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Played around with flags and options.
Turns out that if you want to run it on 1 worker, you have to both disable the hook using dontUsePytestXdist = true;
, since it will append --numprocesses=$NIX_BUILD_CORES
overriding the one in pytestFlagsArray
.
And add a flag --numprocesses=1
to pytestFlagsArray
, to override -n auto
which is specified in their pyproject.toml
(I think).
If only one them set, test still run on amount of cores in /etc/nix/nix.conf
.
When using only 1 core, it took 89 seconds for me, so not too long.
Description of changes
Add
python311Packages.nireports
, a package for generating reports on medical image processing pipelines.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.