Skip to content

feat(bernese): stage GEN/SESSIONS.SES in prepare_campaign (RH-003) - #39

Merged
alfieprojectsdev merged 3 commits into
docs/bernese-training-notesfrom
feat/rh-003-gen-sessions
Jul 2, 2026
Merged

feat(bernese): stage GEN/SESSIONS.SES in prepare_campaign (RH-003)#39
alfieprojectsdev merged 3 commits into
docs/bernese-training-notesfrom
feat/rh-003-gen-sessions

Conversation

@alfieprojectsdev

Copy link
Copy Markdown
Owner

RH-003 — prepare_campaign() stages GEN/SESSIONS.SES (readiness gap #2)

Stacked on #38 (branched off docs/bernese-training-notes); base retargets to main once #38 merges.

Problem

_SUBDIRS omitted GEN, and prepare_campaign() generated no session table. BPE reads GEN/SESSIONS.SES to map a processed session id to its epoch window — without it the run aborts early. This is the exact stall hit during the NAMRIA training week (had to be created by hand).

Change

  • Add GEN to _SUBDIRS.
  • campaign_builder.generate_sessions_ses() returns the stock daily ???0 session table (one session, whole UTC day 00:00:0023:59:59) — verbatim from $X/SUPGUI/PAN/SESSIONS.SES and every campaign GEN/SESSIONS.SES on the verified T420 install.
  • stage_sessions_ses(gen_dir, template=None) writes it into the campaign GEN/. Copies an explicit install template when given (exact match to the installed Bernese version); never clobbers a pre-existing hand-tuned SESSIONS.SES.
  • prepare_campaign() writes SESSIONS.SES unconditionally — independent of CampaignConfig, since BPE needs it regardless of whether station files are generated. New sessions_template= passthrough arg.

Tests

test_campaign_builder.py +5 (daily-template content, GEN in _SUBDIRS, no-config write, template copy, preserve-existing). 80 pass, ruff clean. (mypy: one pre-existing requests import-stub note in download_blq, unrelated to this change.)

Scope note

Other GEN/ general files (ANTENNA_I20.PCV, OBSERV.SEL, SINEX_RNX2SNX.SKL) are also needed for a full run but are separate reference-file staging — out of scope here.

Workflow

First ticket developed under the new git-worktree protocol (.trees/rh-003-gen-sessions), and opened via scripts/open_pr.sh (also added in #38).

_SUBDIRS omitted GEN and no session table was generated, so BPE aborted
early — the exact stall hit during the NAMRIA training week. Closes
readiness gap #2.

- Add GEN to _SUBDIRS.
- campaign_builder: generate_sessions_ses() returns the stock daily '???0'
  session table (whole UTC day, verbatim from $X/SUPGUI/PAN/SESSIONS.SES);
  stage_sessions_ses() writes it into campaign GEN/, copying an explicit
  install template when given and never clobbering a hand-tuned existing
  SESSIONS.SES.
- prepare_campaign() writes SESSIONS.SES unconditionally (independent of
  CampaignConfig) since BPE needs it regardless; new sessions_template= arg.
- test_campaign_builder.py +5. 80 pass, ruff clean.

Developed in worktree .trees/rh-003-gen-sessions off branch
feat/rh-003-gen-sessions.
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 65da48db-d394-46f5-9cb4-664c4416555d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rh-003-gen-sessions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

# Conflicts:
#	docs/project_documentation/ticket_backlog.md
…o feat/rh-003-gen-sessions

# Conflicts:
#	services/bernese-workflow/src/bernese_workflow/backends.py
@alfieprojectsdev
alfieprojectsdev merged commit 5ca696e into docs/bernese-training-notes Jul 2, 2026
1 check passed
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