File tree Expand file tree Collapse file tree 8 files changed +41
-31
lines changed Expand file tree Collapse file tree 8 files changed +41
-31
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,12 @@ jobs:
27
27
- name : Cache conda
28
28
uses : actions/cache@v1
29
29
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
31
31
CACHE_NUMBER : 0
32
32
with :
33
33
path : ~/conda_pkgs_dir
34
34
key : ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
35
- hashFiles('conda-envs/environment-dev-py38 .yml') }}
35
+ hashFiles('conda-envs/environment-dev-py39 .yml') }}
36
36
- name : Cache multiple paths
37
37
uses : actions/cache@v2
38
38
env :
@@ -47,18 +47,18 @@ jobs:
47
47
hashFiles('requirements.txt') }}
48
48
- uses : conda-incubator/setup-miniconda@v2
49
49
with :
50
- activate-environment : pymc3-dev-py38
50
+ activate-environment : pymc3-dev-py39
51
51
channel-priority : strict
52
- environment-file : conda-envs/environment-dev-py38 .yml
52
+ environment-file : conda-envs/environment-dev-py39 .yml
53
53
use-only-tar-bz2 : true # IMPORTANT: This needs to be set for caching to work properly!
54
54
- name : Install pymc3
55
55
run : |
56
- conda activate pymc3-dev-py38
56
+ conda activate pymc3-dev-py39
57
57
pip install -e .
58
58
python --version
59
59
- name : Install latest arviz
60
60
run : |
61
- conda activate pymc3-dev-py38
61
+ conda activate pymc3-dev-py39
62
62
pip uninstall arviz -y
63
63
pip install git+git://github.com/arviz-devs/arviz.git
64
64
- name : Run tests
Original file line number Diff line number Diff line change @@ -70,12 +70,12 @@ jobs:
70
70
- name : Cache conda
71
71
uses : actions/cache@v1
72
72
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
74
74
CACHE_NUMBER : 0
75
75
with :
76
76
path : ~/conda_pkgs_dir
77
77
key : ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
78
- hashFiles('conda-envs/environment-dev-py39 .yml') }}
78
+ hashFiles('conda-envs/environment-dev-py37 .yml') }}
79
79
- name : Cache multiple paths
80
80
uses : actions/cache@v2
81
81
env :
@@ -90,18 +90,18 @@ jobs:
90
90
hashFiles('requirements.txt') }}
91
91
- uses : conda-incubator/setup-miniconda@v2
92
92
with :
93
- activate-environment : pymc3-dev-py39
93
+ activate-environment : pymc3-dev-py37
94
94
channel-priority : strict
95
- environment-file : conda-envs/environment-dev-py39 .yml
95
+ environment-file : conda-envs/environment-dev-py37 .yml
96
96
use-only-tar-bz2 : true # IMPORTANT: This needs to be set for caching to work properly!
97
97
- name : Install-pymc3
98
98
run : |
99
- conda activate pymc3-dev-py39
99
+ conda activate pymc3-dev-py37
100
100
pip install -e .
101
101
python --version
102
102
- name : Run tests
103
103
run : |
104
- conda activate pymc3-dev-py39
104
+ conda activate pymc3-dev-py37
105
105
python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
106
106
- name : Upload coverage to Codecov
107
107
uses : codecov/codecov-action@v1
Original file line number Diff line number Diff line change @@ -26,12 +26,12 @@ jobs:
26
26
- name : Cache conda
27
27
uses : actions/cache@v1
28
28
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
30
30
CACHE_NUMBER : 0
31
31
with :
32
32
path : ~/conda_pkgs_dir
33
33
key : ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
34
- hashFiles('conda-envs/environment-dev-py37 .yml') }}
34
+ hashFiles('conda-envs/environment-dev-py38 .yml') }}
35
35
- name : Cache multiple paths
36
36
uses : actions/cache@v2
37
37
env :
@@ -46,15 +46,15 @@ jobs:
46
46
hashFiles('requirements.txt') }}
47
47
- uses : conda-incubator/setup-miniconda@v2
48
48
with :
49
- activate-environment : pymc3-dev-py37
49
+ activate-environment : pymc3-dev-py38
50
50
channel-priority : strict
51
- environment-file : conda-envs/environment-dev-py37 .yml
51
+ environment-file : conda-envs/environment-dev-py38 .yml
52
52
use-only-tar-bz2 : true # IMPORTANT: This needs to be set for caching to work properly!
53
53
- name : Install-pymc3
54
54
run : |
55
- conda activate pymc3-dev-py37
55
+ conda activate pymc3-dev-py38
56
56
pip install -e .
57
57
python --version
58
58
- run : |
59
- conda activate pymc3-dev-py37
59
+ conda activate pymc3-dev-py38
60
60
python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
Original file line number Diff line number Diff line change 42
42
name : Check no tests are ignored
43
43
pass_filenames : false
44
44
- id : conda-env-sort
45
- additional_dependencies : [pyyaml ]
45
+ additional_dependencies : [ruamel.yaml ]
46
46
entry : python scripts/sort_conda_envs.py
47
47
files : ^conda-envs/
48
48
language : python
51
51
- id : pip-from-conda
52
52
additional_dependencies : [pyyaml]
53
53
entry : python scripts/generate_pip_deps_from_conda.py
54
- files : ^conda-envs/
54
+ files : ^conda-envs/environment-dev-py37\.yml$
55
55
language : python
56
56
name : Generate pip dependency from conda
57
57
- id : no-relative-imports
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ dependencies:
8
8
- libblas=*=*mkl
9
9
- mkl-service
10
10
- nbsphinx>=0.4
11
+ - numpy=1.13.0
11
12
- numpydoc>=0.9
12
13
- pre-commit>=2.8.0
13
14
- pytest-cov>=2.5
Original file line number Diff line number Diff line change 4
4
h5py >= 2.7
5
5
ipython >= 7.16
6
6
nbsphinx >= 0.4
7
+ numpy == 1.13.0
7
8
numpydoc >= 0.9
8
9
pre-commit >= 2.8.0
9
10
pytest-cov >= 2.5
Original file line number Diff line number Diff line change 7
7
8
8
import argparse
9
9
10
- import yaml
10
+ from pathlib import Path
11
+ from typing import Optional , Sequence
11
12
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."""
13
20
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 ()
Original file line number Diff line number Diff line change @@ -85,5 +85,4 @@ def get_version():
85
85
python_requires = ">=3.7" ,
86
86
install_requires = install_reqs ,
87
87
tests_require = test_reqs ,
88
- test_suite = "nose.collector" ,
89
88
)
You can’t perform that action at this time.
0 commit comments