Skip to content

Fix after merging #156. Skips nightly tests.#157

Merged
arokem merged 1 commit into
tractometry:mainfrom
arokem:fix_after_156
Jan 21, 2026
Merged

Fix after merging #156. Skips nightly tests.#157
arokem merged 1 commit into
tractometry:mainfrom
arokem:fix_after_156

Conversation

@arokem

@arokem arokem commented Jan 21, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings January 21, 2026 01:21
@arokem
arokem merged commit fd9e56e into tractometry:main Jan 21, 2026
2 of 11 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the test workflow for publishing to PyPI to skip nightly tests by adding pytest marker exclusions and coverage reporting options to the test command.

Changes:

  • Modified the pytest command in the sdist testing step to exclude all nightly test variants using marker expressions
  • Added coverage reporting options (--cov-report and --cov=AFQ) to the test run
  • Added --durations=0 flag to report all test durations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

run: pip install pytest
- name: Run tests
run: pytest -v --pyargs AFQ
run: pytest -v --pyargs AFQ --cov-report term-missing --cov=AFQ -m "not nightly and not nightly_basic and not nightly_custom and not nightly_anisotropic and not nightly_slr and not nightly_reco and not nightly_reco80" --durations=0

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The marker exclusion list includes "nightly_slr", but this marker is not defined in the pyproject.toml pytest.ini_options.markers configuration. While pytest will still run, it will issue a warning about the unknown marker. Either add "nightly_slr" to the markers list in pyproject.toml, or remove it from the exclusion list if no tests actually use this marker.

Suggested change
run: pytest -v --pyargs AFQ --cov-report term-missing --cov=AFQ -m "not nightly and not nightly_basic and not nightly_custom and not nightly_anisotropic and not nightly_slr and not nightly_reco and not nightly_reco80" --durations=0
run: pytest -v --pyargs AFQ --cov-report term-missing --cov=AFQ -m "not nightly and not nightly_basic and not nightly_custom and not nightly_anisotropic and not nightly_reco and not nightly_reco80" --durations=0

Copilot uses AI. Check for mistakes.
run: pip install pytest
- name: Run tests
run: pytest -v --pyargs AFQ
run: pytest -v --pyargs AFQ --cov-report term-missing --cov=AFQ -m "not nightly and not nightly_basic and not nightly_custom and not nightly_anisotropic and not nightly_slr and not nightly_reco and not nightly_reco80" --durations=0

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pytest command line has become quite long with all the marker exclusions. Consider using a pytest configuration file option or defining a custom marker for "fast" or "not_nightly" tests to improve maintainability. For example, you could use pytest.ini or pyproject.toml to create a marker combination, or use the addopts configuration to set default test exclusions.

Suggested change
run: pytest -v --pyargs AFQ --cov-report term-missing --cov=AFQ -m "not nightly and not nightly_basic and not nightly_custom and not nightly_anisotropic and not nightly_slr and not nightly_reco and not nightly_reco80" --durations=0
env:
PYTEST_ADDOPTS: >-
-v --pyargs AFQ --cov-report term-missing --cov=AFQ
-m "not nightly and not nightly_basic and not nightly_custom and not nightly_anisotropic and not nightly_slr and not nightly_reco and not nightly_reco80"
--durations=0
run: pytest

Copilot uses AI. Check for mistakes.
@@ -45,7 +45,7 @@ jobs:
- name: Install pytest
run: pip install pytest

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pytest command includes coverage reporting options (--cov-report and --cov=AFQ), but pytest-cov is not installed as a dependency. The workflow only installs pytest on line 46. This will cause the test run to fail with an error like "unrecognized arguments: --cov-report term-missing --cov=AFQ". You should add "pip install pytest-cov" after installing pytest.

Suggested change
run: pip install pytest
run: pip install pytest
- name: Install pytest-cov
run: pip install pytest-cov

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants