Skip to content

Unify experiment layout; reorganize hpc/config/; add plots and sweeper improvements - #10

Merged
juliendrapeau merged 5 commits into
devfrom
sync
May 22, 2026
Merged

juliendrapeau merged 5 commits into
devfrom
sync

Conversation

@juliendrapeau

Copy link
Copy Markdown
Owner

Summary

  • Consolidate data/, results/, and sweeps/ under experiments/<stage>/<exp>/ to keep all per-experiment artifacts co-located.
  • Reorganize hpc/ config files into hpc/config/; replace hardcoded CLUSTER_ROOTS dict with a clusters.yaml file that users copy from a template.
  • Add workflow/plots/ matplotlib style infrastructure (common utilities + 4 mplstyles: default, one-column, two-column, presentation).
  • Add use_hash option and duplicate-path detection to ConfigSet.slugify_all.

Changes

experiments/ directory structure

data/, results/, and sweeps/ are replaced by a unified experiments/ tree:

experiments/<stage>/<exp>/
  sweeps/          ← sweep scripts and summary.csv (tracked example)
  data/            ← per-job outputs (gitignored)
  results/         ← aggregated CSVs (gitignored)

Updated Snakefile, rules, workflow_example.yaml, docs, and all template snippets. The old data/ and results/ root directories remain gitignored for backward compat.

hpc/config/ reorganization

hpc/config_example.yaml and hpc/submit_example.yaml move to hpc/config/. A new hpc/config/clusters_example.yaml replaces the hardcoded CLUSTER_ROOTS dict in lifecycle.py: users copy it to hpc/config/clusters.yaml (gitignored) and fill in their SSH host aliases and scratch paths. The --profile hpc flag in run_snakemake.sh is updated to --profile hpc/config.

workflow/plots/ matplotlib style infrastructure

New workflow/plots/ package with common.py (use_style, read_results_csv, style constants) and four mplstyles: default, one_column, two_column, and presentation.

ConfigSet.slugify_all improvements

  • use_hash=True uses each config's content hash as the directory name instead of a human-readable slug — guarantees uniqueness when slugs would collide.
  • After assigning paths, duplicate detection raises ValueError listing all collisions.
  • Both options are threaded through generate_and_save.

Version

Bumped to 0.5.0.

Adds workflow/plots/ package: common.py with use_style(),
read_results_csv(), and style constants; four mplstyles (default,
one_column, two_column, presentation).
- use_hash=True uses each config's content hash as the directory name
  instead of a human-readable slug, guaranteeing uniqueness regardless
  of slugify_structure.
- After assigning paths, raises ValueError listing all duplicate
  short_paths so collisions are caught at sweep-generation time rather
  than silently overwriting configs.
Both options threaded through generate_and_save.
- Move config_example.yaml and submit_example.yaml into hpc/config/.
- Add hpc/config/clusters_example.yaml — users copy to clusters.yaml
  (gitignored) and fill in SSH host → scratch-root mappings.
- Replace hardcoded CLUSTER_ROOTS dict in lifecycle.py with
  _load_cluster_roots() that reads from hpc/config/clusters.yaml,
  so cluster paths are no longer baked into tracked code.
- Update run_snakemake.sh: --profile hpc → --profile hpc/config.
All per-experiment artifacts now live under experiments/<stage>/<exp>/:
  sweeps/   sweep scripts and summary.csv (tracked example)
  data/     per-job outputs (gitignored)
  results/  aggregated CSVs (gitignored)

Updated Snakefile, rules, workflow_example.yaml, sweep scripts, docs,
template snippets, and .gitignore. Old data/ and results/ root dirs
remain gitignored for backward compat.
@github-actions

Copy link
Copy Markdown

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
59 55 93% 90% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: b79d035 by action🐍

@juliendrapeau
juliendrapeau merged commit 2c89111 into dev May 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant