diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 89c944f2fea..6f5caf0db1d 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -69,22 +69,15 @@ jobs: - name: Setup Miniconda uses: conda-incubator/setup-miniconda@v2.0.1 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 + - name: Install 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 diff --git a/MAINTENANCE.md b/MAINTENANCE.md index ecc9a2c600f..cebcf471e78 100644 --- a/MAINTENANCE.md +++ b/MAINTENANCE.md @@ -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 diff --git a/environment.yml b/environment.yml index 85df40af694..98960605f85 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,7 @@ channels: - conda-forge - defaults dependencies: - - python=3.8 + # Required dependencies - pip - gmt=6.1.1 - numpy @@ -11,14 +11,17 @@ dependencies: - xarray - netCDF4 - packaging + # Development dependencies - black - blackdoc + - codecov - coverage[toml] - docformatter - flake8 - ipython - isort>=5 - jupyter + - make - matplotlib - nbsphinx - pylint diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 9b9e10bed0c..00000000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,19 +0,0 @@ -# Requirements for development using conda -black -blackdoc -coverage[toml] -docformatter -flake8 -ipython -isort>=5 -jupyter -matplotlib -nbsphinx -pylint -pytest-cov -pytest-mpl -pytest>=6.0 -sphinx -sphinx-copybutton -sphinx-gallery -sphinx_rtd_theme==0.4.3 diff --git a/requirements.txt b/requirements.txt index 7d82cb1dd8f..ffdf6724f8e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -# Requirements for installing with conda +# Required packages numpy pandas xarray