Skip to content

DEV: add a conda environment.yml with all development dependencies#18659

Merged
charris merged 3 commits intonumpy:mainfrom
rgommers:add-conda-yaml
Mar 31, 2021
Merged

DEV: add a conda environment.yml with all development dependencies#18659
charris merged 3 commits intonumpy:mainfrom
rgommers:add-conda-yaml

Conversation

@rgommers
Copy link
Copy Markdown
Member

@rgommers rgommers commented Mar 21, 2021

There are enough dependencies now that it's too hard to remember. This set is comprehensive, so a single
conda env create -f environment.yml gives you everything in a fresh environment named numpy-dev.

Copy link
Copy Markdown
Member

@mattip mattip left a comment

Choose a reason for hiding this comment

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

Using conda could be mentioned in the documentation:

and maybe even describe conda in describing virtualenvs

How do we keep the versions synced with the requirements.txt files? Does dependabot see this file?

@rgommers
Copy link
Copy Markdown
Member Author

and maybe even describe conda in describing virtualenvs

I think that's the one place I'd like to update.

How do we keep the versions synced with the requirements.txt files? Does dependabot see this file?

Dependabot doesn't see it AFAIK. There's only a few pins, which are easy enough to update by hand if any test fails. I don't expect that to happen often, probably only once a year or less.

There are enough dependencies now that it's too hard to remember.
This set is comprehensive, so a single
`conda env create -f environment.yml` gives you everything in a fresh
environment named numpy-dev.

[ci skip]
@bashtage
Copy link
Copy Markdown
Contributor

Should this be included in CI to make sure it doesn't get out of date?

@rgommers
Copy link
Copy Markdown
Member Author

Should this be included in CI to make sure it doesn't get out of date?

I think that's a good idea, however I'd like to file a follow-up issue for that. Adding an environment file is a useful enhancement in itself, and I don't have the bandwidth to switch some CI jobs to conda right now.

@charris
Copy link
Copy Markdown
Member

charris commented Mar 28, 2021

This could use a release note, probably under new_feature. I wonder if this and the various *_requirements.txt files should be included in the source distribution? We include runtests.py and tox.ini.

@charris charris added the 56 - Needs Release Note. Needs an entry in doc/release/upcoming_changes label Mar 28, 2021
@rgommers
Copy link
Copy Markdown
Member Author

This could use a release note, probably under new_feature. I wonder if this and the various *_requirements.txt files should be included in the source distribution? We include runtests.py and tox.ini.

I think yes, they should. Not that they'll be used much that way (the only way to do so is to manually download the tarball and go from there), but an sdist is also a snapshot of a release with archiving/historical value. I'll update this.

@rgommers
Copy link
Copy Markdown
Member Author

I fixed the MANIFEST.in includes. setup.cfg was missing too. Changed to include *.* followed by excluding things, that way if we make a mistake we include a little too much which is better than including too little.

Decided against a release note. This is not a user-accessible feature from a release artifact, so it only belongs in the developer docs.

@rgommers rgommers removed the 56 - Needs Release Note. Needs an entry in doc/release/upcoming_changes label Mar 31, 2021
Not only environment.yml is added, setup.cfg was missing too. Current
result of `ls -a` in the top-level directory of the unpacked sdist:

```
.                     LICENSE.txt              pytest.ini                site.cfg.example
..                    linter_requirements.txt  README.md                 test_requirements.txt
benchmarks            MANIFEST.in              release_requirements.txt  THANKS.txt
doc                   numpy                    runtests.py               tools
doc_requirements.txt  pavement.py              setup.cfg                 tox.ini
environment.yml       PKG-INFO                 setup.py                  versioneer.py
INSTALL.rst.txt       pyproject.toml
```
@charris charris merged commit 87eff15 into numpy:main Mar 31, 2021
@charris
Copy link
Copy Markdown
Member

charris commented Mar 31, 2021

Thanks Ralf.

@rgommers rgommers deleted the add-conda-yaml branch March 31, 2021 14:23
@rgommers rgommers added this to the 1.21.0 release milestone Mar 31, 2021
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.

4 participants