Skip to content

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

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

Merged
merged 11 commits into from
Feb 17, 2021
Merged
11 changes: 2 additions & 9 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,15 @@ jobs:
- name: Setup Miniconda
uses: conda-incubator/[email protected]
with:
activate-environment: pygmt
python-version: ${{ matrix.python-version }}
channels: conda-forge
miniconda-version: "latest"

# Install GMT and other required dependencies from conda-forge
- name: Install GMT and required dependencies
shell: bash -l {0}
run: |
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 --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
- gmt=6.1.1
- numpy
Expand All @@ -13,12 +12,14 @@ dependencies:
- packaging
- black
- 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