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

Move requirements-dev.txt dependencies to environment.yml #812

Merged
merged 11 commits into from
Feb 17, 2021
Merged
10 changes: 1 addition & 9 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,7 @@ jobs:
# Install GMT and other required dependencies from conda-forge
- name: Install GMT and required dependencies
weiji14 marked this conversation as resolved.
Show resolved Hide resolved
shell: bash -l {0}
run: |
weiji14 marked this conversation as resolved.
Show resolved Hide resolved
requirements_file=full-conda-requirements.txt
cat requirements.txt requirements-dev.txt > $requirements_file
cat << EOF >> $requirements_file
gmt=6.1.1
make
codecov
EOF
conda install --yes --file $requirements_file
run: conda env update --name test --file environment.yml

# Show installed pkg information for postmortem diagnostic
- name: List installed packages
Expand Down
2 changes: 1 addition & 1 deletion MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The main advantages of this are:

We use GitHub Actions continuous integration (CI) services to
build and test the project on Linux, macOS and Windows.
They rely on the `requirements.txt` file to install required dependencies using
They rely on the `environment.yml` file to install required dependencies using
conda and the `Makefile` to run the tests and checks.

### GitHub Actions
Expand Down
3 changes: 2 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ channels:
- conda-forge
- defaults
dependencies:
- python=3.8
Copy link
Member Author

Choose a reason for hiding this comment

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

What about adding a few comment lines to group the dependencies into:

  1. required dependencies
  2. dev dependencies
  3. CI-specific dependencies (codecov, and make?)

Copy link
Member

Choose a reason for hiding this comment

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

Ok. But should we consider make a CI dependency, or a dev dependency? I feel as though make here might help on Windows, see #914 (comment).

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps just do required and dev dependencies (see the Suggested Changes I made below). codecov is a tiny 16.4kb wheel. make is 6.0MB on Windows but could be considered a dev dependency too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks good.

- pip
weiji14 marked this conversation as resolved.
Show resolved Hide resolved
- gmt=6.1.1
- numpy
Expand All @@ -13,12 +12,14 @@ dependencies:
- packaging
- black
weiji14 marked this conversation as resolved.
Show resolved Hide resolved
- blackdoc
- codecov
- coverage[toml]
- docformatter
- flake8
- ipython
- isort>=5
- jupyter
- make
- matplotlib
- nbsphinx
- pylint
Expand Down
19 changes: 0 additions & 19 deletions requirements-dev.txt

This file was deleted.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Requirements for installing with conda
# Required packages
numpy
pandas
xarray
Expand Down