Skip to content

Commit

Permalink
dev: uses now mamba to build actions environment. (#228)
Browse files Browse the repository at this point in the history
build: removed developer and testing dependencies from YML and requirements.txt, but specified them in requirements_dev.txt
  • Loading branch information
pabloitu authored May 30, 2023
1 parent a9910ee commit cb54bd0
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 59 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/build-sphinx-no-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
- uses: mamba-org/setup-micromamba@v1
with:
python-version: '3.10'
activate-environment: csep-dev
channels: conda-forge

- name: Install dependencies
run: |
conda env update --file requirements.yml
conda info -a
conda list
generate-run-shell: true
environment-file: requirements.yml
create-args: >-
python=3.10
pillow
sphinx
sphinx-gallery
sphinx-rtd-theme
- name: Install pyCSEP
run: |
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
- uses: mamba-org/setup-micromamba@v1
with:
python-version: '3.10'
activate-environment: csep-dev
channels: conda-forge

- name: Install dependencies
run: |
conda env update --file requirements.yml
conda info -a
conda list
generate-run-shell: true
environment-file: requirements.yml
create-args: >-
python=3.10
pillow
sphinx
sphinx-gallery
sphinx-rtd-theme
- name: Install pyCSEP
run: |
Expand Down
47 changes: 21 additions & 26 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: tests
on:
push:
branches-ignore:
- 'v*'
- 'v*'
pull_request:

jobs:
build:
if: github.repository == 'SCECCode/pycsep'
if: github.repository == 'SCECcode/pycsep'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -20,30 +20,25 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
activate-environment: csep-dev
channels: conda-forge
- uses: actions/checkout@v2
- uses: mamba-org/setup-micromamba@v1
with:
generate-run-shell: true
environment-file: requirements.yml
create-args: >-
python=${{ matrix.python-version }}
- name: Install dependencies
run: |
conda env update --file requirements.yml
conda info -a
conda list
- name: Install pyCSEP
run: |
pip install --no-deps -e .
python -c "import csep; print('Version: ', csep.__version__)"
- name: Install pyCSEP
run: |
pip install --no-deps -e .
python -c "import csep; print('Version: ', csep.__version__)"
- name: Test with pytest
run: |
pip install vcrpy==4.3.1 pytest pytest-cov
pytest --cov=./ --cov-config=.coveragerc
- name: Test with pytest
run: |
conda install pytest-cov
pytest --cov=./ --cov-config=.coveragerc
- name: Upload coverage
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
run: |
bash <(curl -s https://codecov.io/bash) || echo 'Codecov failed to upload'
- name: Upload coverage
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
run: |
bash <(curl -s https://codecov.io/bash) || echo 'Codecov failed to upload'
7 changes: 0 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ cartopy
obspy
pyproj
python-dateutil
pytest
vcrpy
pytest-cov
shapely
sphinx
sphinx-gallery
sphinx-rtd-theme
pillow
mercantile

6 changes: 0 additions & 6 deletions requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ dependencies:
- pyproj
- obspy
- python-dateutil
- pytest
- cartopy
- shapely
- sphinx
- sphinx-gallery
- sphinx_rtd_theme
- pillow
- vcrpy
- mercantile

18 changes: 18 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
numpy
scipy
pandas
matplotlib
cartopy
obspy
pyproj
python-dateutil
pytest
vcrpy
pytest-cov
shapely
sphinx
sphinx-gallery
sphinx-rtd-theme
pillow
mercantile

0 comments on commit cb54bd0

Please sign in to comment.