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

Include more packages in separate requirements files #24

Open
mdpiper opened this issue Jun 21, 2022 · 3 comments
Open

Include more packages in separate requirements files #24

mdpiper opened this issue Jun 21, 2022 · 3 comments
Labels

Comments

@mdpiper
Copy link
Member

mdpiper commented Jun 21, 2022

Should we expand the set of requirements files for this repository? I'm thinking about four separate files.

requirements.txt -- packages needed to install with pip install -e .

  • numpy
  • scipy
  • pyyaml
  • bmipy

requirements-dev.txt -- developer packages used with the repo Makefile

  • make
  • build
  • twine
  • flake8
  • black
  • isort

requirements-testing.txt -- packages used for running tests

  • coveralls
  • pytest
  • pytest-cov
  • six
  • bmi-tester

requirements-examples.txt -- packages used for running examples

  • notebook
@mcflugen
Copy link
Member

Yes, but they should also go in the pyproject.toml file as something like,

[project.optional-dependencies]
dev = [
  "black",
  "flake8",
  "isort",
]
testing = [
  "coveralls",
  "pytest",
  "bmi-tester"
]
examples = [
  "notebook",
]

This allows users to pip install like, pip install -e ".[dev]". The requirements files are really only there for mamba users who want to do mamba install --file=requirements-testing.txt but having requirements in two locations isn't great. For other projects, I include a requirements.py script that extracts requirements from pyproject.toml that can be use to create the various requirements files.

I'm not totally sure what to do with dependencies like make that aren't pip-installable or available on all platforms. In the case of make, I think I would lean toward just dropping it as a dependency. If someone wants to use the Makefile, they should know they need to install make.

six should not be a dependency. We should remove it in a separate pull request.

@mdpiper
Copy link
Member Author

mdpiper commented Jun 21, 2022

This is super helpful, thank you!

@mdpiper
Copy link
Member Author

mdpiper commented Jun 23, 2022

As a note to myself, a recent example of removing six: csdms/pymt#159.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants