Skip to content

Commit cb54bd0

Browse files
authored
dev: uses now mamba to build actions environment. (#228)
build: removed developer and testing dependencies from YML and requirements.txt, but specified them in requirements_dev.txt
1 parent a9910ee commit cb54bd0

File tree

6 files changed

+57
-59
lines changed

6 files changed

+57
-59
lines changed

.github/workflows/build-sphinx-no-deploy.yml

+9-10
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v2
16-
- uses: conda-incubator/setup-miniconda@v2
16+
- uses: mamba-org/setup-micromamba@v1
1717
with:
18-
python-version: '3.10'
19-
activate-environment: csep-dev
20-
channels: conda-forge
21-
22-
- name: Install dependencies
23-
run: |
24-
conda env update --file requirements.yml
25-
conda info -a
26-
conda list
18+
generate-run-shell: true
19+
environment-file: requirements.yml
20+
create-args: >-
21+
python=3.10
22+
pillow
23+
sphinx
24+
sphinx-gallery
25+
sphinx-rtd-theme
2726
2827
- name: Install pyCSEP
2928
run: |

.github/workflows/build-sphinx.yml

+9-10
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v2
16-
- uses: conda-incubator/setup-miniconda@v2
16+
- uses: mamba-org/setup-micromamba@v1
1717
with:
18-
python-version: '3.10'
19-
activate-environment: csep-dev
20-
channels: conda-forge
21-
22-
- name: Install dependencies
23-
run: |
24-
conda env update --file requirements.yml
25-
conda info -a
26-
conda list
18+
generate-run-shell: true
19+
environment-file: requirements.yml
20+
create-args: >-
21+
python=3.10
22+
pillow
23+
sphinx
24+
sphinx-gallery
25+
sphinx-rtd-theme
2726
2827
- name: Install pyCSEP
2928
run: |

.github/workflows/build-test.yml

+21-26
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ name: tests
33
on:
44
push:
55
branches-ignore:
6-
- 'v*'
6+
- 'v*'
77
pull_request:
88

99
jobs:
1010
build:
11-
if: github.repository == 'SCECCode/pycsep'
11+
if: github.repository == 'SCECcode/pycsep'
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
fail-fast: false
@@ -20,30 +20,25 @@ jobs:
2020
shell: bash -l {0}
2121

2222
steps:
23-
- uses: actions/checkout@v2
24-
- uses: conda-incubator/setup-miniconda@v2
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
activate-environment: csep-dev
28-
channels: conda-forge
23+
- uses: actions/checkout@v2
24+
- uses: mamba-org/setup-micromamba@v1
25+
with:
26+
generate-run-shell: true
27+
environment-file: requirements.yml
28+
create-args: >-
29+
python=${{ matrix.python-version }}
2930
30-
- name: Install dependencies
31-
run: |
32-
conda env update --file requirements.yml
33-
conda info -a
34-
conda list
31+
- name: Install pyCSEP
32+
run: |
33+
pip install --no-deps -e .
34+
python -c "import csep; print('Version: ', csep.__version__)"
3535
36-
- name: Install pyCSEP
37-
run: |
38-
pip install --no-deps -e .
39-
python -c "import csep; print('Version: ', csep.__version__)"
36+
- name: Test with pytest
37+
run: |
38+
pip install vcrpy==4.3.1 pytest pytest-cov
39+
pytest --cov=./ --cov-config=.coveragerc
4040
41-
- name: Test with pytest
42-
run: |
43-
conda install pytest-cov
44-
pytest --cov=./ --cov-config=.coveragerc
45-
46-
- name: Upload coverage
47-
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
48-
run: |
49-
bash <(curl -s https://codecov.io/bash) || echo 'Codecov failed to upload'
41+
- name: Upload coverage
42+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
43+
run: |
44+
bash <(curl -s https://codecov.io/bash) || echo 'Codecov failed to upload'

requirements.txt

-7
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ cartopy
66
obspy
77
pyproj
88
python-dateutil
9-
pytest
10-
vcrpy
11-
pytest-cov
129
shapely
13-
sphinx
14-
sphinx-gallery
15-
sphinx-rtd-theme
16-
pillow
1710
mercantile
1811

requirements.yml

-6
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,7 @@ dependencies:
1111
- pyproj
1212
- obspy
1313
- python-dateutil
14-
- pytest
1514
- cartopy
1615
- shapely
17-
- sphinx
18-
- sphinx-gallery
19-
- sphinx_rtd_theme
20-
- pillow
21-
- vcrpy
2216
- mercantile
2317

requirements_dev.txt

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
numpy
2+
scipy
3+
pandas
4+
matplotlib
5+
cartopy
6+
obspy
7+
pyproj
8+
python-dateutil
9+
pytest
10+
vcrpy
11+
pytest-cov
12+
shapely
13+
sphinx
14+
sphinx-gallery
15+
sphinx-rtd-theme
16+
pillow
17+
mercantile
18+

0 commit comments

Comments
 (0)