Skip to content

Commit

Permalink
fix: use marker and update tests to exclude regressions
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsbck committed Nov 21, 2024
1 parent 6d3d0a5 commit 2855ff7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/regression_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
else
echo "No regression test results found in main branch"
fi
pytest tests/test_regression.py
pytest -m regression
git checkout
# - name: Comment PR
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
- name: Test with pytest
run: |
pip install pytest pytest-cov
pytest tests/ -m "not runtime" --cov=jaxley --cov-report=xml
pytest tests/ -m "not regression" --cov=jaxley --cov-report=xml
2 changes: 1 addition & 1 deletion .github/workflows/update_regression_baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
NEW_BASELINE=1 pytest tests/test_regression.py
NEW_BASELINE=1 pytest -m regression
- name: Commit and push if baseline changed
if: github.event.pull_request.base.ref == 'main'
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def print_regression_report():
print("\n\n\nRegression Test Report\n----------------------\n")
if not baselines:
print(
"No baselines found. Run `git checkout main;UPDATE_BASELINE=1 pytest tests/test_regression.py; git checkout -`"
"No baselines found. Run `git checkout main;UPDATE_BASELINE=1 pytest -m regression; git checkout -`"
)
print(generate_regression_report(baselines, results))

Expand Down
14 changes: 7 additions & 7 deletions tests/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ def build_net(num_cells, artificial=True, connect=True, connection_prob=0.0):
(
# Test a single SWC cell with both solvers.
pytest.param(1, False, False, 0.0, "jaxley.stone"),
# pytest.param(1, False, False, 0.0, "jax.sparse"),
# # Test a network of SWC cells with both solvers.
# pytest.param(10, False, True, 0.1, "jaxley.stone"),
# pytest.param(10, False, True, 0.1, "jax.sparse"),
# # Test a larger network of smaller neurons with both solvers.
# pytest.param(1000, True, True, 0.001, "jaxley.stone"),
# pytest.param(1000, True, True, 0.001, "jax.sparse"),
pytest.param(1, False, False, 0.0, "jax.sparse"),
# Test a network of SWC cells with both solvers.
pytest.param(10, False, True, 0.1, "jaxley.stone"),
pytest.param(10, False, True, 0.1, "jax.sparse"),
# Test a larger network of smaller neurons with both solvers.
pytest.param(1000, True, True, 0.001, "jaxley.stone"),
pytest.param(1000, True, True, 0.001, "jax.sparse"),
),
)
@compare_to_baseline(baseline_iters=3)
Expand Down

0 comments on commit 2855ff7

Please sign in to comment.