Skip to content

Run CI dev-tools and tests inside the conda env via conda run - #687

Open
anawas wants to merge 3 commits into
mainfrom
aw_fix_linter
Open

Run CI dev-tools and tests inside the conda env via conda run#687
anawas wants to merge 3 commits into
mainfrom
aw_fix_linter

Conversation

@anawas

@anawas anawas commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

The conda activate test_karabo calls were unreliable in the runner shell and silently fell back to the system Python 3.12, where dask/xarray are not installed. That made mypy emit spurious unused-ignore/no-any-return/ arg-type errors and broke the nightly build. Invoke every tool through conda run -n test_karabo so they always execute in the env's Python 3.10 interpreter. Also target conda install at the env explicitly and fix a tru -> true typo in the wsclean debug line.

anawas added 3 commits June 29, 2026 10:38
The `conda activate test_karabo` calls were unreliable in the runner
shell and silently fell back to the system Python 3.12, where dask/xarray
are not installed. That made mypy emit spurious unused-ignore/no-any-return/
arg-type errors and broke the nightly build. Invoke every tool through
`conda run -n test_karabo` so they always execute in the env's Python 3.10
interpreter. Also target `conda install` at the env explicitly and fix a
`tru` -> `true` typo in the wsclean debug line.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> ✅
The previous `conda run -n test_karabo` (and `conda activate`) approach
still failed: on the runner those commands silently resolve to a
different Python, so `pip install -e ".[dev]"` landed dev tools in the
wrong environment and `mypy` then ran against an interpreter without
typed dask/xarray. That made dask/xarray resolve to `Any`, producing
spurious unused-ignore / assert_never / no-any-return errors.

Reproduced locally: a byte-identical fresh env passes mypy when invoked
via `$ENV/bin/python -m mypy`, but `conda run -n <env>` picks the wrong
interpreter. Fix by calling the env's interpreter by absolute path
(`$CONDA/envs/test_karabo/bin/python -m <tool>`) for install, dev-tools
and tests. The source `# type: ignore` comments are correct and untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> 📏
`conda env update --prune` removes pip (not listed in environment.yaml),
so the absolute-path `python -m pip install` failed with "No module
named pip". Add pip to the explicit conda install step.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> 🇩🇪
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.71%. Comparing base (b431410) to head (d9e59a4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #687   +/-   ##
=======================================
  Coverage   72.71%   72.71%           
=======================================
  Files          63       63           
  Lines        6275     6275           
=======================================
  Hits         4563     4563           
  Misses       1712     1712           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant