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
Add python packages: pyensembl and its dependencies, gffutils #89213
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.
please add yourself as a maintainer for all packages that you're adding.
please attempt to sort the package entries in python-packages
|
||
checkPhase = '' | ||
# sh gffutils/test/data/download-large-annotation-files.sh | ||
# nosetests |
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.
why no test suite?
# nosetests | |
# nosetests |
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.
The tests fail inside the nix environment
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.
general consensus is to just ignore test cases that fail due to sandbox environment. But some test failures may be indications that the package is in an actual broken state.
tests are also very useful for verifying that dependency bumps don't cause regressions.
checkInputs = [ ]; | ||
propagatedBuildInputs = [ ]; | ||
|
||
checkPhase = '' | ||
${python.interpreter} -c 'import tinytimer' | ||
''; | ||
|
||
# Tests require extra dependencies | ||
doCheck = true; | ||
|
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.
checkInputs = [ ]; | |
propagatedBuildInputs = [ ]; | |
checkPhase = '' | |
${python.interpreter} -c 'import tinytimer' | |
''; | |
# Tests require extra dependencies | |
doCheck = true; | |
pythonImportsCheck = [ "tinytimer" ]; |
pkgs/top-level/python-packages.nix
Outdated
typechecks = callPackage ../development/python-modules/typechecks { }; | ||
|
||
datacache = callPackage ../development/python-modules/datacache { }; | ||
|
||
memoized-property = callPackage ../development/python-modules/memoized-property { }; | ||
|
||
gtfparse = callPackage ../development/python-modules/gtfparse { }; | ||
|
||
serializable = callPackage ../development/python-modules/serializable { }; | ||
|
||
tinytimer = callPackage ../development/python-modules/tinytimer { }; | ||
|
||
pyensembl = callPackage ../development/python-modules/pyensembl { }; | ||
|
||
gffutils = callPackage ../development/python-modules/gffutils { }; | ||
|
||
scikit-plot = callPackage ../development/python-modules/scikit-plot { }; | ||
|
||
pybedtools = callPackage ../development/python-modules/pybedtools { }; |
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.
please attempt to sort these
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.
I don't get the sorting schema of this file. It appears to be somewhat alphabetically, but not as a whole but rather for a set regions within the file.
Wouldn't it make more sense to sort the file "entirely" from time to time?
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.
it has been evolving over time... some people grouped similar packages, some people just dropped them anywhere. At the very least, random listings should be avoided
Thank you for your comments @jonringer! I have simplified all the files and added myself as maintainer. Please let me know if something still requires improvements. |
@jonringer After having applied all the requested changes, I wanted to da a final rebase on master so I did
This resulted in a merge commit and now the PR is blown up with 370 commits. Is this an issue and if yes, would you mind telling me what went wrong? |
with --rebase, there shouldn't be a merge commit. And it looks like you pulled in master. Assuming the merge is the main culprit, you could do If all else failes, you could cherry pick the commits into a new branch and just push that |
7d8f1ba
to
32da240
Compare
Indeed trashing the merge commit seemed to have fixed it. So no cherry-picking-in-new-branch required. I noticed that two packages failed to build because of failing tests, even though checkPhase was not set (it seems that it is set to some default python test runner). I explicitly disabled tests for them using I'm anyways surprised that this wasn't detected by the @GrahamcOfBorg bot, which showed green for all tests. |
if you still want to get this into nixpkgs, you can break this up into smaller PRs, just adding a package at a time. It will be a lot less time intensive than having to cover all of it. |
Dear @jonringer, thanks for the response. I'll transition to adding these packages into my overlays and close this PR as there are definitely more important PRs (from me and others) for the moment. Still, I am kind of missing some kind of strategy for pypi packages. In a conversation on the nixos-discourse, I got the notion that it is not desired to add the majority of pypi packages to nixpkgs. However it is really cumbersome to build a derivation for each single python package, when you're working in a non-mainstream field. Is there some kind of vision for this issue? |
In general the preference is to have python packages available which enable an application, and less so to "just have the package".
You can use nix with venv to bring in missing python packages. I got a video about it https://www.youtube.com/watch?v=jXd-hkP4xnU , and some docs here: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.section.md#how-to-consume-python-modules-using-pip-in-a-virtual-environment-like-i-am-used-to-on-other-operating-systems If you still want a pure nix way to do it, I would look at |
Motivation for this change
Replaces PR #87551
Both pyenseml and gffutils are commonly used python packages (> 100 stars on GitHub), so I added them to nix packages.
Things done
nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
) (only pyensembl has a supplemental binary)nix path-info -S
before and after)