Skip to content

Commit 657d390

Browse files
authored
Merge pull request #44 from wrightky/master
Fix and update build actions
2 parents 90d0307 + 2fe1a4c commit 657d390

File tree

5 files changed

+21
-40
lines changed

5 files changed

+21
-40
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: [ubuntu-latest, macos-latest, windows-latest]
18-
python-version: [3.7, 3.8, 3.9]
18+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1919
env:
2020
OS: ${{ matrix.os }}
2121
PYTHON: ${{ matrix.python-version }}
@@ -45,41 +45,13 @@ jobs:
4545
name: codecov-umbrella
4646
fail_ci_if_error: false
4747

48-
legacy:
49-
runs-on: ${{ matrix.os }}
50-
strategy:
51-
fail-fast: false
52-
matrix:
53-
os: [ubuntu-20.04, windows-2019]
54-
python-version: [2.7]
55-
env:
56-
OS: ${{ matrix.os }}
57-
PYTHON: ${{ matrix.python-version }}
58-
steps:
59-
- uses: actions/checkout@v2
60-
- name: Set up Python ${{ matrix.python-version }}
61-
uses: actions/setup-python@v2
62-
with:
63-
python-version: ${{ matrix.python-version }}
64-
- name: Install dependencies
65-
run: |
66-
python -m pip install --upgrade pip
67-
pip install pytest pytest-cov coveralls
68-
pip install -r requirements.txt
69-
- name: Install dorado
70-
run: |
71-
pip install -e .
72-
- name: Test with pytest
73-
run: |
74-
pytest --cov=dorado/ --cov-report=xml
75-
7648
examples:
7749
runs-on: ${{ matrix.os }}
7850
strategy:
7951
fail-fast: false
8052
matrix:
8153
os: [ubuntu-latest]
82-
python-version: [3.7]
54+
python-version: ["3.9"]
8355
env:
8456
OS: ${{ matrix.os }}
8557
PYTHON: ${{ matrix.python-version }}

conda/conda_build_config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ python:
33
- 3.6
44
- 3.7
55
- 3.8
6+
- 3.9
7+
- 3.10
8+
- 3.11

dorado/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "2.5.2"
1+
__version__ = "2.5.3"
22

33
from . import lagrangian_walker
44
from . import parallel_routing

setup.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
name = 'pydorado',
6-
version = '2.5.2',
6+
version = '2.5.3',
77
license = 'MIT',
88
description = 'dorado - Lagrangian particle routing routine via weighted random walks',
99
author = 'J. Hariharan, K. Wright, P. Passalacqua',
@@ -12,10 +12,13 @@
1212
packages = find_packages(exclude=['*.tests']),
1313
package_data = {'' : ['*.txt', '*.npz']},
1414
long_description = 'See project webpage for details: https://github.com/passaH2O/dorado',
15-
classifiers = ['Programming Language :: Python :: 2.7',
16-
'Programming Language :: Python :: 3.7',
17-
'Programming Language :: Python :: 3.8',
18-
'Programming Language :: Python :: 3.9'],
15+
classifiers = [
16+
'Programming Language :: Python :: 2.7',
17+
'Programming Language :: Python :: 3.7',
18+
'Programming Language :: Python :: 3.8',
19+
'Programming Language :: Python :: 3.9',
20+
'Programming Language :: Python :: 3.10'
21+
'Programming Language :: Python :: 3.11'],
1922
install_requires = ['numpy','matplotlib','scipy',
2023
'future','tqdm'],
2124
)

tests/test_examplecases.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ def test_few_steps_RCM(self):
5151
# check all positions and times
5252
assert all_walk_data['xinds'][0] == [16, 17, 18, 19]
5353
assert all_walk_data['yinds'][0] == [140, 141, 141, 141]
54-
assert all_walk_data['travel_times'][0] == \
55-
[0, 7007593448.337235, 10439964733.462337, 13698473384.876724]
54+
assert all_walk_data['travel_times'][0] == pytest.approx(
55+
[0, 7007593448.337235, 10439964733.462337, 13698473384.876724],
56+
rel=1e-6)
5657

5758
def test_set_time_RCM_previousdata(self):
5859
'''
@@ -76,7 +77,8 @@ def test_set_time_RCM_previousdata(self):
7677
# check all positions and times
7778
assert all_walk_data['xinds'][0] == [16, 17]
7879
assert all_walk_data['yinds'][0] == [140, 141]
79-
assert all_walk_data['travel_times'][0] == [0, 7007593448.337235]
80+
assert all_walk_data['travel_times'][0] == pytest.approx(
81+
[0, 7007593448.337235], rel=1e-6)
8082

8183
def test_set_time_RCM(self):
8284
'''
@@ -101,7 +103,8 @@ def test_set_time_RCM(self):
101103
# check all positions and times
102104
assert all_walk_data['xinds'][0] == [16, 17]
103105
assert all_walk_data['yinds'][0] == [140, 141]
104-
assert all_walk_data['travel_times'][0] == [0, 7007593448.337235]
106+
assert all_walk_data['travel_times'][0] == pytest.approx(
107+
[0, 7007593448.337235], rel=1e-6)
105108

106109

107110
class TestANUGA:

0 commit comments

Comments
 (0)