Skip to content

Commit 3811453

Browse files
cailmdaleyclaude
andcommitted
felt: cleanup constitution (rho-stats/stile removal + candide job scripts)
Constitution to shuttle to Codex: two PRs (not merged) — remove the obsolete in-shapepipe rho-stats/stile path (superseded by sp_validation, for Martin's review) and modernize the candide PBS job scripts to run via the container (tested on candide; canfar left untouched). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 31932a0 commit 3811453

1 file changed

Lines changed: 114 additions & 0 deletions

File tree

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
name: 'ShapePipe cleanup: remove obsolete rho-stats/stile; modernize candide job scripts'
3+
status: open
4+
tags:
5+
- shapepipe
6+
- cleanup
7+
- constitution
8+
created-at: 2026-05-30T21:45:50.977369486+02:00
9+
outcome: |-
10+
Two independent cleanups, each delivered as its own PR (NOT merged to develop): (1) remove the obsolete in-shapepipe rho-stats/stile path — Martin confirmed it's superseded by sp_validation/cosmo_val — opened for Martin's review; (2) modernize the candide PBS job scripts to run via the container instead of a personal conda env, tested on candide (this host is c03=candide). The canfar job scripts are explicitly left untouched (can't verify them) and that's noted in the PR. Shuttled to Codex.
11+
---
12+
13+
## Desired State
14+
15+
Two separate, reviewable PRs against `develop`**opened, not merged.** This is
16+
cleanup someone else (Martin) should sign off on; the worker's job is to land
17+
the change on a branch and open the PR, not to merge it.
18+
19+
### Deliverable 1 — remove the obsolete rho-stats / stile path (PR for Martin)
20+
21+
The in-ShapePipe rho-statistics path is dead code. Martin confirmed on #657
22+
(2026-04-22): *"the rho stats within shapepipe are obsolete, and have been
23+
superseded by sp_validation / cosmo_val, which uses shear_psf_leakage."* The
24+
stack division is: ShapePipe **produces** catalogues, `sp_validation`
25+
**validates**. So this path should be deleted, not migrated or preserved
26+
"just in case."
27+
28+
Done state:
29+
- The rho-stats modules are gone: `modules/mccd_plots_runner.py`,
30+
`modules/mccd_package/mccd_plot_utilities.py`, and the random-catalogue
31+
null-test path (`modules/random_cat_package/`, `modules/random_cat_runner.py`)
32+
**after confirming** `random_cat` is only used for rho-stats nulls (it
33+
appears in `example/cfis/config_Rc.ini`; check it isn't load-bearing for any
34+
non-rho clustering use before deleting).
35+
- Whatever pulls `stile` is removed (`stile` is *not* a declared dependency in
36+
`pyproject.toml`/`uv.lock` and isn't directly imported in those modules — so
37+
first find what actually references it; it may already be vestigial. Remove
38+
any real reference; don't invent one).
39+
- The **9 example configs** that name `mccd_plots_runner` in their `MODULE =`
40+
line — including `example/cfis_simu/config_tile_Sx_exp_mccd.ini` (the sim
41+
config) — no longer reference it: drop it from the `MODULE` lists and remove
42+
the now-orphaned `[MCCD_PLOTS_RUNNER]` sections. Same for `random_cat_runner`
43+
/ `[RANDOM_CAT_RUNNER]` if random_cat goes. Per Martin's note, assume the
44+
`RHO_STATS_STYLE = UNIONS` path is also not load-bearing.
45+
- `docs/source/random_cat.md` (and any rho-stats doc) is removed/updated to match.
46+
- The in-image test suite stays green — the structural tier (config-parse,
47+
imports, runner-metadata) will flag a broken config or dangling import.
48+
49+
### Deliverable 2 — modernize candide job scripts (PR, tested here)
50+
51+
`example/pbs/candide_smp.sh` and `candide_mpi.sh` activate a personal conda env
52+
(`module load intelpython/3; source activate $HOME/.conda/envs/shapepipe`) and
53+
call `$SPENV/bin/shapepipe_run`. Convert them to run the pipeline through the
54+
**container** (apptainer, the published `ghcr.io/cosmostat/shapepipe` image)
55+
instead — no conda. **This host is c03 = candide, so test the converted script
56+
here** (at minimum, the apptainer invocation runs `shapepipe_run` on the example
57+
config; a full PBS submission if practical).
58+
59+
The **canfar** scripts (`scripts/sh/job_sp_canfar*.bash`,
60+
`init_run_exclusive_canfar.sh`, etc.) are **out of scope** — they target a
61+
different cluster we can't verify here. Leave them untouched and say so in the PR
62+
description.
63+
64+
## Context
65+
66+
- **Why rho-stats is dead:** see the memory note (Martin #657 comment) and the
67+
stack division — `sp_validation`/`cosmo_val` owns PSF-systematics validation
68+
now via `shear_psf_leakage`. Don't preserve the UNIONS rho path out of caution.
69+
- **Files in the rho path:** `modules/mccd_plots_runner.py`,
70+
`modules/mccd_package/mccd_plot_utilities.py`, `modules/random_cat_package/`,
71+
`modules/random_cat_runner.py`.
72+
- **Configs to edit** (grep `mccd_plots_runner` / `random_cat_runner` in
73+
`example/`): `config_Rc.ini`, `config_MsPl_psfex.ini`,
74+
`config_valjoint_Pl_mccd.ini`, `config_exp_mccd.ini`, `config_MsPl_stars.ini`,
75+
`config_Pl_mccd.ini`, `config_MsPl_mccd.ini`, `cfis/defunct/…`, and
76+
`example/cfis_simu/config_tile_Sx_exp_mccd.ini`.
77+
- **CI:** the only gate is `pytest` inside the dev image (`deploy-image.yml`);
78+
run it in the image to verify (`docker run --rm ghcr.io/cosmostat/shapepipe:develop pytest`).
79+
- **Container for the candide scripts:** the runtime image
80+
(`:develop-runtime`) is the slim target for batch jobs; see
81+
`docs/source/container.md` and `docs/source/installation.md` for the apptainer
82+
invocation pattern.
83+
84+
## Skills
85+
86+
`felt`. Verify empirically — run the in-image suite for D1; run the converted
87+
candide script via apptainer on c03 for D2.
88+
89+
## Evidence
90+
91+
```bash
92+
# D1: nothing references the removed rho path
93+
grep -rIn "mccd_plots_runner\|random_cat_runner\|MCCD_PLOTS_RUNNER" src/ example/
94+
# D1: suite still green in the image
95+
docker run --rm ghcr.io/cosmostat/shapepipe:develop pytest -rX
96+
# D2: the converted candide script runs the pipeline via the container, no conda
97+
grep -rn "conda\|source activate\|SPENV" example/pbs/candide_*.sh # → none
98+
```
99+
100+
Done = two PRs open against develop (rho-stats removal; candide scripts), CI
101+
green on each, neither merged, canfar untouched-and-noted.
102+
103+
## Scope
104+
105+
- **In:** the rho-stats/stile code + its config references + docs; the candide
106+
PBS scripts.
107+
- **Out:** merging (open PRs only — Martin reviews); the canfar scripts (note,
108+
don't touch); the broader test-suite work (separate, done); any
109+
scientific-algorithm change.
110+
111+
## Open Questions
112+
113+
- Is `random_cat` truly rho-stats-only, or does any non-rho config/use depend on
114+
it? Confirm before deleting it (vs. just `mccd_plots_runner`).

0 commit comments

Comments
 (0)