Skip to content

foundation: sources split into inherited child tables by UT date and SCA, loaded by COPY (sources-children) - #158

Merged
RussLaher merged 1 commit into
mainfrom
sources-children
Nov 4, 2026
Merged

RussLaher merged 1 commit into
mainfrom
sources-children

Conversation

@RussLaher

Copy link
Copy Markdown
Collaborator

What

  • decisions.md: the ruling decision-sources-children (Russ Laher, 2026-11-04).
  • foundation.md: the rule, under "Published rows name their job".

sources keeps its rows in child tables that inherit it, one per UT day of mjdobs and SCA, named sources_<yyyymmdd>_<sca>, as dev does. The parent holds no rows. The publisher makes each child through create_catalog_child and loads it by bulk COPY. Departures from dev, stated on the page:

  • children are logged;
  • each child has a CHECK on its date and SCA;
  • children have no foreign key to jobs.

Why

Russ asked for dev's scheme on rebuild: child tables by observation date and SCA, inheriting the parent, loaded by bulk COPY. xsources follows with the same scheme in its own change.

Code

The rapid PR that implements this (link to follow in a comment) carries the schema, the publisher, the SMDC migration database/2026-11-04-sources-children.sql and the tests.

Testing

Run locally in a Python 3.12 container: sphinx-build -W builds clean, scripts/acceptance.sh passes, and scripts/check-public-safety.sh is clean. The external link check was not run.

🤖 Generated with Claude Code

… and SCA, inheriting the parent, loaded by COPY (sources-children)

The ruling on decisions.md and the rule on foundation.md: one child table
per UT day of mjdobs and SCA, sources_<yyyymmdd>_<sca>, LIKE the parent
then INHERIT, as dev's loaders make them, loaded by bulk COPY, logged,
each with a CHECK on its date and SCA; the parent holds no rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RussLaher

Copy link
Copy Markdown
Collaborator Author

Code: Caltech-IPAC/rapid#522

@RussLaher
RussLaher merged commit f5ecfc5 into main Nov 4, 2026
2 checks passed
@RussLaher
RussLaher deleted the sources-children branch November 4, 2026 16:24
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