Skip to content
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

deeptools: init at 3.3.1 #70995

Merged
merged 4 commits into from Nov 4, 2019
Merged

Conversation

scalavision
Copy link
Contributor

Motivation for this change
Things done
  • [x ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • [x ] NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • [ x] Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • [ x] Ensured that relevant documentation is up to date
  • [ x] Fits CONTRIBUTING.md.
Notify maintainers

cc @

@scalavision
Copy link
Contributor Author

deepTools have a lot of small, very useful tools for manipulating bam files etc.

@jonringer
Copy link
Contributor

do you mind rebasing on top of master? you got conflicts now :(

@jonringer
Copy link
Contributor

Also, to be compliant with CONTRIBUTING.md, you should have roughly 1 commit relate to one package

pkgs/applications/science/biology/deeptools/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pybigwig/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pybigwig/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/py2bit/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/py2bit/default.nix Outdated Show resolved Hide resolved
pkgs/applications/science/biology/deeptools/default.nix Outdated Show resolved Hide resolved
}:

buildPythonPackage rec {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your help on this @jonringer.

I've removed most of the blank lines I hope. Is there any guidelines for this? I seem to always want more blank lines than necessary.

I kept the package within the biology folder. Any special reason you want to move it to science? It is a bioinformatic tool alongside samtools, bedtools etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reasoning behind moving it from python-packages, is that it's meant to be used a standalone application and not imported by other python packages. It's to avoid the situation in which someone will try to do propagatedBuildInputs = [ deeptools ]; in another python packages, which is probably not what you want.

Another reason for doing this, is that some applications have very specific package versions which may deviate greatly from what's available in python-modules, #71797 for example

@scalavision
Copy link
Contributor Author

scalavision commented Oct 30, 2019

Thanks again for helping me out with this one @jonringer . I've added python3 as a parameter, and used with to retrieve back the python dependencies in the build. Hope this was what you meant ?

I also wonder if I should do something like this:

{ lib
, python
}:
let
  py = python.pkgs;
in
py.buildPythonApplication rec {
 /* .. */
}

Or if that is too much? Anyways, learned a lot playing around with this :-)

@jonringer
Copy link
Contributor

Yea, since you're only referencing pythonPackages, I would be fine with a top-level with python.pkgs; but if you also needed native inputs, then I would do something very similar to what you did. Since you already did a lot of tedious work, I would say just keep as is. (at least for python.pkgs usage)

@scalavision
Copy link
Contributor Author

of course, I didn't think about that. Will do that next time :-) this have been a great journey!

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To adhere to contributing guidelines, do you mind breaking each package addition into it's own commit, it should follow:

pythonPackages.deeptoolsintervals: init at 0.1.9
.....

and so on for the git log history

@scalavision
Copy link
Contributor Author

scalavision commented Oct 31, 2019

Trying again :-) I have to work on my git skill I think, this was really good practice. I also changed, so that I use with python.pkgs at the top of the function body of deeptools. That also seems to work pretty well. Just let me know if there are more things that could be improved :-)

Just hope I did everything correctly here!

@jonringer
Copy link
Contributor

to help you out in the future, you can use git add --patch to iterate over what changes you want to stage, discard, edit, etc.

Generally when doing multiple packages, I iterate over the whole change set in un-staged. Then when im making the commits, I'll just git add path/to/fil and use git add -p python-modules/all-packages to select the smaller changes that I want.

For editing a particular commit in a series, you should use git rebase -i, which will allow for you go to to a commit, make changes, then re apply the other commits on top of it

@scalavision
Copy link
Contributor Author

Thanks again @jonringer, I've used git rebase -i extensively during this PR, and it was really helpful also for work, hehe. Will look into the other things you mention. Probably very helpful too :-)

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nix-review passes on NixOS
diff LGTM
deeptools seems to wokr

[15 built, 1 copied (7.8 MiB), 2.1 MiB DL]
https://github.com/NixOS/nixpkgs/pull/70995
10 package were build:
deeptools python27Packages.deeptoolsintervals python27Packages.py2bit python27Packages.pybigwig python37Packages.deeptoolsintervals python37Packages.py2bit python37Packages.pybigwig python38Packages.deeptoolsintervals python38Packages.py2bit python38Packages.pybigwig

@jonringer
Copy link
Contributor

@GrahamcOfBorg build deeptools python27Packages.deeptoolsintervals python27Packages.py2bit python27Packages.pybigwig python37Packages.deeptoolsintervals python37Packages.py2bit python37Packages.pybigwig python38Packages.deeptoolsintervals python38Packages.py2bit python38Packages.pybigwig

@jonringer jonringer merged commit d9b40f6 into NixOS:master Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants