Skip to content

Add dev requirements file - #4916

Merged
eteq merged 9 commits into
astropy:masterfrom
eteq:add-dev-reqs
Jun 2, 2016
Merged

eteq merged 9 commits into
astropy:masterfrom
eteq:add-dev-reqs

Conversation

@eteq

@eteq eteq commented May 14, 2016

Copy link
Copy Markdown
Member

(Note: This PR should be merged after #4915, as it's build on top of it.)

In #4915 I discussed a possible need for a pip requirements file for the docs build. It occurred to me that this might also be a good solution for how to list the "developer" requirements (i.e. all the packages that are used anywhere as optional or build-required dependencies). So this PR adds just such a file.

This is also partly inspired by @mwcraig and @bsipocz's discussion about a conda container package along the lines of astropy-dev. Would it make sense to add this and then have that just auto-build from this list of package names?

@eteq eteq mentioned this pull request May 15, 2016
@pllim pllim added the Docs label May 16, 2016
@eteq eteq added this to the v1.2.0 milestone May 16, 2016
Comment thread dev-pip-requirements Outdated
scipy
pandas
h5py
bs4

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you want beautifulsoup4 here instead. bs4 gets you to here: https://pypi.python.org/pypi/bs4/

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

good point! will fix

@astrofrog

Copy link
Copy Markdown
Member

If we go ahead with this, I would suggest renaming the files to pip-requirements-... to make sure that they appear together alphabetically.

@eteq

eteq commented May 25, 2016

Copy link
Copy Markdown
Member Author

Good point @astrofrog - done.

No opinions have been issued thus far as to whether we should do this at all.. @mwcraig @astrofrog, @taldcroft @bsipocz, @adrn, do any of you have opinions?

FWIW, I think this is useful to have, and might make the "astropy-dev" conda install a bit easier to implement...?

Also note that this no longer requires #4915, as it turns out there's a different way to convince travis to do the right thing there. So this is now purely "information".

@mwcraig

mwcraig commented May 25, 2016

Copy link
Copy Markdown
Member

Not strong feelings...as noted here, I have created an astropy-dev conda environment to kick the tires on, installable with conda env create mwcraig/astropy-dev-py3.

I've opened an issue (https://github.com/conda/conda-env/issues/243) on the conda env tracker to address the fact that it seems impossible to upload an environment to an anaconda account unless you are logged in as are logged in as that user (which makes uploading to an organization hard)

@adrn

adrn commented May 26, 2016

Copy link
Copy Markdown
Member

No strong feelings either -- I think it could be useful, so, sure?

@eteq

eteq commented May 26, 2016

Copy link
Copy Markdown
Member Author

Just to be clear, the possible downside of this is that if the astropy-dev conda environment and RTD requirement file currently duplicate this information, so we have two different sets of requirements. Personally I think the best thing is, going forward, to call the files in this list the "official" requirements, and consider the others "derived" (even if they aren't strictly automatic). But there's still the risk of divergence.

@mwcraig

mwcraig commented May 26, 2016

Copy link
Copy Markdown
Member

Sure, but that will always be the case. Right now what complicates generating the conda environment a little bit are two things:

  • The need to separate the dependencies (and their dependencies) into conda-installable and pip-only.
  • Some conda packages are required for specific platforms but not others, so a little care is needed to generate cross-platform environments.

The first one will get easier as packages continue to be added to conda-forge; once all of the dependencies are in there we can auto-generate the environment.

Comment thread docs/development/codeguide.rst Outdated
...

In the astropy core package, such optional dependencies should be recorded in
the ``dev-pip-requirements`` file in the root of the repository.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

pip-requirements-dev

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

good catch, thanks

@taldcroft

Copy link
Copy Markdown
Member

Along the lines that @mwcraig mentioned, what seems slightly confusing about this approach is that many of the requirements are currently conda-installable. It isn't quite clear to me how a typical (or new) developer should actually use these requirement files. The changes to the docs in this PR just describe how to maintain the files but not how to use them.

Overall I'm definitely 👍 on capturing these requirements somehow and making it easier for developers to set up their environment.

@eteq

eteq commented May 27, 2016

Copy link
Copy Markdown
Member Author

@taldcroft @mwcraig - I agree that what I would likely do is look at the list, try to conda install <x> for each of them, and then only after I'd done that, I'd pip install -r pip-requirements-dev. That's what I basically do now anyway, but I have to remember in my head all the things that are in that file now.

Should I update the PR to include that as a recommendation? My thinking of the scope of this PR is not to update the installation instructions (for dev or otherwise), but rather to just establish the authoritative place for this information. It could be in some other format if someone has a preference, but this seems convenient if only because pip install -r <file> works at least at some level in most python environments.

@bsipocz

bsipocz commented May 29, 2016

Copy link
Copy Markdown
Member

This looks good to me, too.

Also the dev docs contain detailed information how to set up virtualenvs using pip only, and if anyone prefers that over conda (like me), then having the pip-requirements-dev list can be useful.

@mwcraig

mwcraig commented May 29, 2016

Copy link
Copy Markdown
Member

@eteq -- agree that this PR is limited in scope, so just adding this without adding anything about conda is fine.

@taldcroft

Copy link
Copy Markdown
Member

👍

1 similar comment
@astrofrog

Copy link
Copy Markdown
Member

👍

@eteq

eteq commented Jun 2, 2016

Copy link
Copy Markdown
Member Author

looks like it's got the A-OK, so will merge

@eteq
eteq merged commit d2955bd into astropy:master Jun 2, 2016
@eteq
eteq deleted the add-dev-reqs branch June 2, 2016 22:54
@astrobot

astrobot commented Jun 2, 2016

Copy link
Copy Markdown

@eteq - thanks for merging this! However, I noticed the following issue with this pull request:

  • Changelog entry not present (or pull request number missing) and neither the Affects-dev nor the no-changelog-entry-needed label are set

Would it be possible to fix this? Thanks!

This is an experimental bot being written by @astrofrog - let me know if the message above is incorrect!

astrofrog pushed a commit that referenced this pull request Jun 3, 2016
Add developer pip-style requirements files
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.

8 participants