test: Tier 0-2 scaffolding (shell syntax, imports, entrypoints, runner metadata)#708
test: Tier 0-2 scaffolding (shell syntax, imports, entrypoints, runner metadata)#708cailmdaley wants to merge 4 commits into
Conversation
|
CI caught more failures than the local pre-#702 container did — all expected, all now xfailed. Filed issues for follow-up:
These are all pre-existing on develop — the scaffolding exposed them. Each xfail carries a `reason=` pointing at the issue so the linkage stays visible. `strict=True` auto-flips to XPASSED when any of these get fixed. |
48724c5 to
51492bc
Compare
…trypoints, runner metadata
- tests/unit/test_shell_syntax.py: bash -n over every scripts/sh/*.{sh,bash}
- tests/unit/test_config_parse.py: configparser over example/**/*.ini
- tests/unit/test_imports.py: import every shapepipe.* submodule
- tests/unit/test_entrypoints.py: invoke -h on every [project.scripts] entry
- tests/unit/test_runner_metadata.py: every *_runner.py exports a @module_runner
Pre-existing failures tracked as xfail so the suite lands green and the
issues remain discoverable (strict=True auto-notifies once fixed):
- stile v0.1 imports removed treecorr.corr2 → breaks mccd_plots_runner,
random_cat_runner, plus their packages
- summary_run -h treats '-h' as the 'patch' positional and mkdirs it
Also:
- Fix stale testpaths (pyproject.toml) — was "shapepipe" from the old
pre-src-layout era, so pytest never discovered anything new
- New CI workflow ci-dev.yml gates PRs to develop using the published
ghcr.io/cosmostat/shapepipe:develop image (ci-release.yml stays as-is
for main/master)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The fresh CI container reveals more pre-existing issues than our older local container did. Mark them strict-xfail with reasons; GH issues track the actual fixes. New xfails: - shapepipe.canfar.canfar_monitor + shapepipe.canfar_run: IndentationError in canfar_monitor.py:55 (docstring at 7 spaces, body at 8) - mask + mask_runner: astroquery not in develop Docker image - ngmix + ngmix_runner: numba not in develop Docker image - split_exp + split_exp_runner: pkg_resources removed in newer setuptools - uncompress_fits + uncompress_fits_runner: fitsio not installed - canfar_submit_job, canfar_monitor, canfar_monitor_log entry points: transitive on the canfar_monitor.py IndentationError Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Committed inadvertently via `git add -A`. The file is a local Claude-Code-specific instruction sheet, not meant for the repo. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
#716 (merged 2026-04-24) removed sip_tpv from shapepipe, which was the transitive source of split_exp.py's pkg_resources import chain. On the post-merge develop container, both split_exp entries now import cleanly: - shapepipe.modules.split_exp_package.split_exp - shapepipe.modules.split_exp_runner Also dropped the matching runner_metadata entry. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
51492bc to
fbc7314
Compare
|
Rebased onto current develop. The xfail list is unchanged — it'll need trimming once #714 and #719 land:
Total 21 → 6 after both PRs merge. The remaining 6 are all stile-related and should be tracked as a separate fiber/issue. Marking xfails as `strict=True` means they'll start XPASSing on this branch as soon as the upstream fixes land, so the cleanup is mechanical. |
|
Superseded. The Tier 0–2 scaffolding here was restored directly onto — Claude on behalf of Cail |
Summary
Scaffold a cheap, broad test suite that gates PRs to
develop. The goal is to catch the kind of bugs we've hit repeatedly in recent reviews — bash syntax errors (#706 `init_run_v2.0.sh`), module-level import of optional deps that makes a `try/except` unreachable (#699 `coverage_map_builder.py`), broken `[project.scripts]` entry points, runners missing `@module_runner` metadata, docker image upstream drift (#707 skyproj/PROJ).What's covered
Each test is parametrized one-case-per-file, so the CI output names exactly which script/module/runner is at fault.
Pre-existing failures
These surfaced when the suite first ran on `develop`. Tracked as `xfail(strict=True)` so the PR lands green and the failure re-surfaces as a loud `XPASSED` once fixed:
Plumbing fixes
Local run
Inside the shapepipe container:
```
pytest tests/unit/ -v --no-cov -p no:warnings
196 passed, 3 skipped, 7 xfailed in 5.16s
```
(The 3 skips are `canfar_*` commands absent from an older local container; present in the CI image.)
Test plan
🤖 Generated with Claude Code