Skip to content

Commit 841d45e

Browse files
committed
test on oldest supported versions during end-to-end CI
1 parent 0402aab commit 841d45e

File tree

8 files changed

+41
-31
lines changed

8 files changed

+41
-31
lines changed

.github/workflows/arviz_compat.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
- name: Cache conda
2828
uses: actions/cache@v1
2929
env:
30-
# Increase this value to reset cache if environment-dev-py38.yml has not changed
30+
# Increase this value to reset cache if environment-dev-py39.yml has not changed
3131
CACHE_NUMBER: 0
3232
with:
3333
path: ~/conda_pkgs_dir
3434
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
35-
hashFiles('conda-envs/environment-dev-py38.yml') }}
35+
hashFiles('conda-envs/environment-dev-py39.yml') }}
3636
- name: Cache multiple paths
3737
uses: actions/cache@v2
3838
env:
@@ -47,18 +47,18 @@ jobs:
4747
hashFiles('requirements.txt') }}
4848
- uses: conda-incubator/setup-miniconda@v2
4949
with:
50-
activate-environment: pymc3-dev-py38
50+
activate-environment: pymc3-dev-py39
5151
channel-priority: strict
52-
environment-file: conda-envs/environment-dev-py38.yml
52+
environment-file: conda-envs/environment-dev-py39.yml
5353
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
5454
- name: Install pymc3
5555
run: |
56-
conda activate pymc3-dev-py38
56+
conda activate pymc3-dev-py39
5757
pip install -e .
5858
python --version
5959
- name: Install latest arviz
6060
run: |
61-
conda activate pymc3-dev-py38
61+
conda activate pymc3-dev-py39
6262
pip uninstall arviz -y
6363
pip install git+git://github.com/arviz-devs/arviz.git
6464
- name: Run tests

.github/workflows/pytest.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ jobs:
7070
- name: Cache conda
7171
uses: actions/cache@v1
7272
env:
73-
# Increase this value to reset cache if environment-dev-py39.yml has not changed
73+
# Increase this value to reset cache if environment-dev-py37.yml has not changed
7474
CACHE_NUMBER: 0
7575
with:
7676
path: ~/conda_pkgs_dir
7777
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
78-
hashFiles('conda-envs/environment-dev-py39.yml') }}
78+
hashFiles('conda-envs/environment-dev-py37.yml') }}
7979
- name: Cache multiple paths
8080
uses: actions/cache@v2
8181
env:
@@ -90,18 +90,18 @@ jobs:
9090
hashFiles('requirements.txt') }}
9191
- uses: conda-incubator/setup-miniconda@v2
9292
with:
93-
activate-environment: pymc3-dev-py39
93+
activate-environment: pymc3-dev-py37
9494
channel-priority: strict
95-
environment-file: conda-envs/environment-dev-py39.yml
95+
environment-file: conda-envs/environment-dev-py37.yml
9696
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
9797
- name: Install-pymc3
9898
run: |
99-
conda activate pymc3-dev-py39
99+
conda activate pymc3-dev-py37
100100
pip install -e .
101101
python --version
102102
- name: Run tests
103103
run: |
104-
conda activate pymc3-dev-py39
104+
conda activate pymc3-dev-py37
105105
python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
106106
- name: Upload coverage to Codecov
107107
uses: codecov/codecov-action@v1

.github/workflows/windows.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
- name: Cache conda
2727
uses: actions/cache@v1
2828
env:
29-
# Increase this value to reset cache if conda-envs/environment-dev-py37.yml has not changed
29+
# Increase this value to reset cache if conda-envs/environment-dev-py38.yml has not changed
3030
CACHE_NUMBER: 0
3131
with:
3232
path: ~/conda_pkgs_dir
3333
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
34-
hashFiles('conda-envs/environment-dev-py37.yml') }}
34+
hashFiles('conda-envs/environment-dev-py38.yml') }}
3535
- name: Cache multiple paths
3636
uses: actions/cache@v2
3737
env:
@@ -46,15 +46,15 @@ jobs:
4646
hashFiles('requirements.txt') }}
4747
- uses: conda-incubator/setup-miniconda@v2
4848
with:
49-
activate-environment: pymc3-dev-py37
49+
activate-environment: pymc3-dev-py38
5050
channel-priority: strict
51-
environment-file: conda-envs/environment-dev-py37.yml
51+
environment-file: conda-envs/environment-dev-py38.yml
5252
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
5353
- name: Install-pymc3
5454
run: |
55-
conda activate pymc3-dev-py37
55+
conda activate pymc3-dev-py38
5656
pip install -e .
5757
python --version
5858
- run: |
59-
conda activate pymc3-dev-py37
59+
conda activate pymc3-dev-py38
6060
python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ repos:
4242
name: Check no tests are ignored
4343
pass_filenames: false
4444
- id: conda-env-sort
45-
additional_dependencies: [pyyaml]
45+
additional_dependencies: [ruamel.yaml]
4646
entry: python scripts/sort_conda_envs.py
4747
files: ^conda-envs/
4848
language: python
@@ -51,7 +51,7 @@ repos:
5151
- id: pip-from-conda
5252
additional_dependencies: [pyyaml]
5353
entry: python scripts/generate_pip_deps_from_conda.py
54-
files: ^conda-envs/
54+
files: ^conda-envs/environment-dev-py37\.yml$
5555
language: python
5656
name: Generate pip dependency from conda
5757
- id: no-relative-imports

conda-envs/environment-dev-py37.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies:
88
- libblas=*=*mkl
99
- mkl-service
1010
- nbsphinx>=0.4
11+
- numpy=1.13.0
1112
- numpydoc>=0.9
1213
- pre-commit>=2.8.0
1314
- pytest-cov>=2.5

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
h5py>=2.7
55
ipython>=7.16
66
nbsphinx>=0.4
7+
numpy==1.13.0
78
numpydoc>=0.9
89
pre-commit>=2.8.0
910
pytest-cov>=2.5

scripts/sort_conda_envs.py

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,24 @@
77

88
import argparse
99

10-
import yaml
10+
from pathlib import Path
11+
from typing import Optional, Sequence
1112

12-
if __name__ == "__main__":
13+
import ruamel.yaml
14+
15+
yaml = ruamel.yaml.YAML()
16+
17+
18+
def main(argv: Optional[Sequence[str]] = None) -> None:
19+
"""Sort dependencies in conda environment files."""
1320
parser = argparse.ArgumentParser()
14-
parser.add_argument("files", nargs="*")
15-
args = parser.parse_args()
16-
for file_ in args.files:
17-
with open(file_) as fd:
18-
doc = yaml.safe_load(fd)
19-
doc["dependencies"].sort()
20-
with open(file_, "w") as fd:
21-
yaml.dump(doc, fd, sort_keys=False)
21+
parser.add_argument("paths", nargs="*", type=Path)
22+
args = parser.parse_args(argv)
23+
for path in args.paths:
24+
doc = yaml.load(path)
25+
doc["dependencies"].sort()
26+
yaml.dump(doc, path)
27+
28+
29+
if __name__ == "__main__":
30+
main()

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,4 @@ def get_version():
8585
python_requires=">=3.7",
8686
install_requires=install_reqs,
8787
tests_require=test_reqs,
88-
test_suite="nose.collector",
8988
)

0 commit comments

Comments
 (0)