Run CI dev-tools and tests inside the conda env via conda run - #687
Open
anawas wants to merge 3 commits into
Open
Run CI dev-tools and tests inside the conda env via conda run#687anawas wants to merge 3 commits into
conda run#687anawas wants to merge 3 commits into
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
conda activate test_karabocalls 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 throughconda run -n test_karaboso they always execute in the env's Python 3.10 interpreter. Also targetconda installat the env explicitly and fix atru->truetypo in the wsclean debug line.✅