Skip to content

Commit ccd7c30

Browse files
authored
Merge pull request #74 from dwhswenson/back-to-green
Fix CI problems
2 parents b430d8b + e7f4149 commit ccd7c30

18 files changed

+61
-59
lines changed

.github/workflows/test-suite.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424
strategy:
2525
matrix:
2626
CONDA_PY:
27-
- 3.9
28-
- 3.8
29-
- 3.7
27+
- "3.11"
28+
- "3.10"
29+
- "3.9"
3030
INTEGRATIONS: [""]
3131
include:
32-
- CONDA_PY: 3.9
32+
- CONDA_PY: "3.11"
3333
INTEGRATIONS: 'all-optionals'
3434

3535
steps:
@@ -70,6 +70,8 @@ jobs:
7070
run: |
7171
python -c "import paths_cli"
7272
py.test -vv --cov --cov-report xml:cov.xml
73-
- uses: codecov/codecov-action@v2
73+
- uses: codecov/codecov-action@v4
7474
with:
7575
files: ./cov.xml
76+
env:
77+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

paths_cli/tests/commands/test_md.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
make_1d_traj, CalvinistDynamics
1313

1414
class TestProgressReporter(object):
15-
def setup(self):
15+
def setup_method(self):
1616
self.progress = ProgressReporter(timestep=None, update_freq=5)
1717

1818
@pytest.mark.parametrize('timestep', [None, 0.1])
@@ -38,7 +38,7 @@ def test_report_progress(self, n_steps, force, capsys):
3838
assert out == ""
3939

4040
class TestEnsembleSatisfiedContinueConditions(object):
41-
def setup(self):
41+
def setup_method(self):
4242
cv = paths.CoordinateFunctionCV('x', lambda x: x.xyz[0][0])
4343
vol_A = paths.CVDefinedVolume(cv, float("-inf"), 0.0)
4444
vol_B = paths.CVDefinedVolume(cv, 1.0, float("inf"))

paths_cli/tests/compiling/_gendocs/test_docs_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from paths_cli.compiling.core import CategoryCompiler
1010

1111
class TestDocsGenerator:
12-
def setup(self):
12+
def setup_method(self):
1313
self.required_parameter = Parameter(
1414
name="req_param",
1515
loader=None,

paths_cli/tests/compiling/test_core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def mock_named_object_factory(dct):
2525

2626

2727
class TestParameter:
28-
def setup(self):
28+
def setup_method(self):
2929
self.loader = Mock(
3030
return_value='foo',
3131
json_type='string',
@@ -131,7 +131,7 @@ class TestInstanceCompilerPlugin:
131131
def _builder(req_param, opt_default=10, opt_override=100):
132132
return f"{req_param}, {opt_default}, {opt_override}"
133133

134-
def setup(self):
134+
def setup_method(self):
135135
identity = lambda x: x
136136
self.parameters = [
137137
Parameter('req_param', identity, json_type="string"),
@@ -227,7 +227,7 @@ def test_call(self):
227227

228228

229229
class TestCategoryCompiler:
230-
def setup(self):
230+
def setup_method(self):
231231
self.compiler = CategoryCompiler(
232232
{'foo': mock_named_object_factory},
233233
'foo_compiler'

paths_cli/tests/compiling/test_cvs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
class TestMDTrajFunctionCV:
18-
def setup(self):
18+
def setup_method(self):
1919
self.ad_pdb = data_filename("ala_small_traj.pdb")
2020
self.yml = "\n".join([
2121
"name: phi", "type: mdtraj", "topology: " + self.ad_pdb,

paths_cli/tests/compiling/test_engines.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
import mdtraj as md
1313

1414
class TestOpenMMEngineBuilder(object):
15-
def setup(self):
15+
def setup_method(self):
1616
self.cwd = os.getcwd()
1717
self.yml = "\n".join([
1818
"type: openmm", "name: engine", "system: system.xml",
1919
"integrator: integrator.xml", "topology: ad.pdb",
2020
"n_steps_per_frame: 10", "n_frames_max: 10000"
2121
])
2222

23-
def teardown(self):
23+
def teardown_method(self):
2424
os.chdir(self.cwd)
2525

2626
def _create_files(self, tmpdir):

paths_cli/tests/compiling/test_plugins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from unittest.mock import Mock
44

55
class TestCompilerPlugin:
6-
def setup(self):
6+
def setup_method(self):
77
self.plugin_class = Mock(category='foo')
88
self.plugin = CategoryPlugin(self.plugin_class)
99
self.aliased_plugin = CategoryPlugin(self.plugin_class,

paths_cli/tests/compiling/test_root_compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_canonical_name(input_name):
5858

5959

6060
class TestCategoryCompilerProxy:
61-
def setup(self):
61+
def setup_method(self):
6262
self.compiler = CategoryCompiler(None, "foo")
6363
self.compiler.named_objs['bar'] = 'baz'
6464
self.proxy = _CategoryCompilerProxy('foo')

paths_cli/tests/compiling/test_volumes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from paths_cli.compiling.volumes import *
1515

1616
class TestBuildCVVolume:
17-
def setup(self):
17+
def setup_method(self):
1818
self.yml = "\n".join(["type: cv-volume", "cv: {func}",
1919
"lambda_min: 0", "lambda_max: 1"])
2020

@@ -90,7 +90,7 @@ def test_build_cv_volume(self, inline, periodic):
9090

9191

9292
class TestBuildCombinationVolume:
93-
def setup(self):
93+
def setup_method(self):
9494
from openpathsampling.experimental.storage.collective_variables \
9595
import CollectiveVariable
9696
self.cv = CollectiveVariable(lambda s: s.xyz[0][0]).named('foo')

paths_cli/tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
class TestOpenPathSamplingCLI(object):
10-
def setup(self):
10+
def setup_method(self):
1111
def make_mock(name, helpless=False, return_val=None):
1212
if return_val is None:
1313
return_val = name

0 commit comments

Comments
 (0)