Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions project/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
RAPID is developed in the open. The pipeline's contribution guidelines
and code of conduct live with the code, in the pipeline repository:

- [Contributing to the pipeline](https://github.com/Caltech-IPAC/rapid/blob/rebuild/CONTRIBUTING.md)
- [Code of conduct](https://github.com/Caltech-IPAC/rapid/blob/rebuild/CODE_OF_CONDUCT.md)
- [Contributing to the pipeline](https://github.com/Caltech-IPAC/rapid/blob/main/CONTRIBUTING.md)
- [Code of conduct](https://github.com/Caltech-IPAC/rapid/blob/main/CODE_OF_CONDUCT.md)

The code of conduct applies to this site and its repository as well.

Expand Down
23 changes: 11 additions & 12 deletions project/day-one.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ them. Three repositories are involved:

| Repository | Holds | Visibility |
|---|---|---|
| [Caltech-IPAC/rapid](https://github.com/Caltech-IPAC/rapid/tree/rebuild) | the pipeline, on branch `rebuild` | public |
| [Caltech-IPAC/rapid](https://github.com/Caltech-IPAC/rapid) | the pipeline, on branch `main` | public |
| [Caltech-IPAC/rapid_docs](https://github.com/Caltech-IPAC/rapid_docs) | this site | public |
| `IPAC-SW/rapid_systems` | the SMDC infrastructure, the `rapid` command and the team's access files | private, in the IPAC-SW organization |

Expand Down Expand Up @@ -38,12 +38,11 @@ runbook's `$PY` is its `python3`.

## The pipeline checkout

The pipeline's default branch is `dev`, the pre-rebuild pipeline. The
rebuild and its quickstart exist only on `rebuild`, so clone that branch
by name:
The pipeline's default branch is `main`; `dev` and `commissioning` hold
the pre-rebuild pipeline and are frozen. Clone the default branch:

```sh
git clone -b rebuild git@github.com:Caltech-IPAC/rapid.git
git clone git@github.com:Caltech-IPAC/rapid.git
cd rapid
git config core.hooksPath .githooks # the public-safety check, before your first push
```
Expand All @@ -53,7 +52,7 @@ contents of past versions of a file only when a command needs them, so
it is faster to make:

```sh
git clone --filter=blob:none -b rebuild git@github.com:Caltech-IPAC/rapid.git
git clone --filter=blob:none git@github.com:Caltech-IPAC/rapid.git
```

## One epoch on your workstation
Expand All @@ -63,7 +62,7 @@ laptop: the image pull below is granted to RAPID hosts through their
instance roles.

The README's
[Getting started](https://github.com/Caltech-IPAC/rapid/blob/rebuild/README.md)
[Getting started](https://github.com/Caltech-IPAC/rapid/blob/main/README.md)
takes one HLWAS epoch through every stage, inside the pipeline image,
against a throwaway PostgreSQL 18. It takes about five minutes and needs
16 GB of memory. It needs two inputs, and the README says how to get
Expand All @@ -80,9 +79,9 @@ each one:

## Your first pull request

[Contributing to the pipeline](https://github.com/Caltech-IPAC/rapid/blob/rebuild/CONTRIBUTING.md)
holds the rule. Branch from `rebuild`, open the pull request to
`rebuild`, and merge once CI is green. A pull request names the page on
[Contributing to the pipeline](https://github.com/Caltech-IPAC/rapid/blob/main/CONTRIBUTING.md)
holds the rule. Branch from `main`, open the pull request to
`main`, and merge once CI is green. A pull request names the page on
this site that it implements or corrects, and a page is corrected before
the code that disagrees with it. One review by a named maintainer will
be required once the team names one; until then, green CI and the
Expand All @@ -93,9 +92,9 @@ doc-first rule are the gate. Changes to this site follow

The loop page's [Starting a night](../system/loop.md#starting-a-night)
is the recipe. A night runs against the team's database and the Batch
queue, from a checkout of `rebuild` on a RAPID host. The runbook's
queue, from a checkout of `main` on a RAPID host. The runbook's
Current procedure, in the pipeline repository's
[`docs/foundation-smdc-step.md`](https://github.com/Caltech-IPAC/rapid/blob/rebuild/docs/foundation-smdc-step.md),
[`docs/foundation-smdc-step.md`](https://github.com/Caltech-IPAC/rapid/blob/main/docs/foundation-smdc-step.md),
holds the environment and the checks.

## What needs Project-Admin today
Expand Down
2 changes: 1 addition & 1 deletion project/why-the-rebuild.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Why the rebuild

The rebuild is `dev`'s science on a new operating foundation, on the
pipeline repository's `rebuild` branch, which becomes `main`. The
pipeline repository's `main` branch. The
reference and difference stages carry the algorithms in `dev`'s order:
awaicgen and SExtractor build and catalog the reference; SFFT makes the
published difference, with ZOGY's kept as a diagnostic. The shipped settings carry `dev`'s defaults, with
Expand Down
2 changes: 1 addition & 1 deletion system/difference.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ the naive subtraction runs as `dev` runs it but makes no PSF-fit catalog
`pipeline/awsBatchSubmitJobs_runSingleSciencePipeline.py`, refreshed to
`dev` at d6aac515, under the foundation's `run(job)` contract:
`rapidpipe/stages/difference.py` and `rapidpipe/science/difference/` on
the pipeline repository's `rebuild` branch. The [foundation](foundation)
the pipeline repository's `main` branch. The [foundation](foundation)
page states the records it works within, and the
[stage contract](stage-contract) page what a stage is.

Expand Down
4 changes: 2 additions & 2 deletions system/foundation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

This page states how RAPID records what it made and which of it is
official, and the narrow chain of stages built on that record, from
stored images to alert packets. It is the design the `rebuild` branch
stored images to alert packets. It is the design the `main` branch
of the pipeline repository implements: `database/schema.sql`, the
package `rapidpipe.foundation`, the stages `intake`, `import`, `psf`,
`reference`, `difference` and `packet`, the loop, the quality gate, the
Kafka publication, the reader `scripts/read_packets.py`, the run
validation `scripts/validate_run.py`, the check script
`scripts/check_run.sh` and the queries in `database/queries.sql`.
The schema's entity diagram,
[`database/schema.svg`](https://github.com/Caltech-IPAC/rapid/blob/rebuild/database/schema.svg),
[`database/schema.svg`](https://github.com/Caltech-IPAC/rapid/blob/main/database/schema.svg),
is drawn from `schema.sql` by `scripts/schema_diagram.py`.
The [stage contract](stage-contract) page states what a stage is under
it, and the [decisions](decisions) page records the rulings it rests
Expand Down
4 changes: 2 additions & 2 deletions system/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ repository's history. The rebuild starts from this page.
| [`intake.md`](intake) | current | The `intake` stage on `run(job)`: one SOC L2 ASDF file under the run's source root, the conversion ported from `dev`, the check that its science PSF was made from the file's own ePSF reference, the declared `l2files` row and the `exposures` row of the one SCA that expects it, with the `expid` the loop resolved for the exposure's name and the check of it, its settings (the reader, the DQ mask, the guide-window ghost box, the WCS translation and re-derivation) and the Gaia-offset metric, and what the ramp measured |
| [`psf.md`](psf) | DRAFT | The `psf` stage on `run(job)`: the CRDS ePSF reference a file names, fetched by that name; the fixed reduction to a pipeline PSF; the science kind it declares and the `EPSFREF` the intake checks; its settings; the F146 comparison with `dev`'s copied PSF and the job's measurements; the position, the reference PSF rule and a reference part in the key, not yet decided |
| [`photometry.md`](photometry) | current | Forced photometry: the alert-driven measurement inside the `packet` stage, and `dev`'s standalone `forcedPhotometryForField.py`, not ported |
| [`tool.md`](tool) | current | The command-line tool `rapidpipe`: every command it has on `rebuild` with its flags, what it does not have and what to use instead, its exit codes, and the environment it reads |
| [`tool.md`](tool) | current | The command-line tool `rapidpipe`: every command it has on `main` with its flags, what it does not have and what to use instead, its exit codes, and the environment it reads |
| [`loop.md`](loop) | current | The loop, `rapidpipe loop`: the selection as arguments with the passes, one pass's order from the psf submission and hold through intake to the Kafka recovery sweep with the listing by the selection, no field chains, the submission cap and the Spot queue, the Batch reconcile, pending with one automatic rerun, failed and drained, the reference bound and held fields, the per-field chains' history, its exit codes and what it measured, six filters at once among it; it replaces the run model's processing-date loop |
| [`exposure-id.md`](exposure-id) | current | The exposure id as a serial the database hands out, with the producer's name for the exposure beside it, unique within a dataset: how the 18 SCAs agree on one id, where the loop assigns it, the selection without arithmetic on it, what scopes, prefixes, `import`, the packet and the scripts do with it, each reader's name, the refusal it retires; the changes by file, the test contracts and the landing |
| [`drift.md`](drift) | current | The nightly drift gate: one injected HLWAS epoch run daily at the newest `rapid-rebuild` revision, its six columns judged against the spread recorded from runs 152, 167, 168 and 170, red to the alert topic |
| [`operations.md`](operations) | DRAFT | Operations proposals the team has not yet ruled on: what they assume about the mission, three shapes of the run model and the recommended named stream of batch runs, replacement scope and the chain switch, batch cadence against the latency requirement, a proposed production check policy, reference eligibility and selection, staged inputs of a production run, capacity lanes |
| [`throughput.md`](throughput) | current | The throughput report, `scripts/throughput_report.py`: the per-job fields it reads (steps, S3 bytes, CPU against wall, the host), job vCPU-hours by the stage timers and by the steps, host-hours split by time-weighted co-tenancy, queue wait, fixed against per-source cost, the critical path of one exposure and the ranked leads; its output on runs 187, 188 and 216 |
| [`observability.md`](observability) | DRAFT | The `rapidpipe` log line and where it goes, the record of an attempt with and without CloudWatch, monitoring with `rapidpipe` alone, queue, execution and orchestration time per Batch job, profiling a stage, and today's job-duration baseline against a 30-minute target |
| [`backups.md`](backups) | DRAFT | The database's pgBackRest repository read against pgBackRest 2.60 and the S3 documentation: bucket versioning and the noncurrent expiry, the WAL valve with and without asynchronous archiving and what the alarms see when it drops, with the ruling owed, and retention as what the policy keeps, what the repository holds and what has been restored |
| [`migration.md`](migration) | DRAFT | For a team member who knows `dev`: where each of `dev`'s scripts, settings, stages and terms went on `rebuild`, with the reason a page or ruling records; `dev`'s tables mapped to the rebuild's schema; what has no counterpart; the questions for the team's first week |
| [`migration.md`](migration) | DRAFT | For a team member who knows `dev`: where each of `dev`'s scripts, settings, stages and terms went on `main`, with the reason a page or ruling records; `dev`'s tables mapped to the rebuild's schema; what has no counterpart; the questions for the team's first week |

```{toctree}
:hidden:
Expand Down
2 changes: 1 addition & 1 deletion system/intake.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ owns every byte from the raw file to the packet. The
the [stage contract](stage-contract) page what a stage is.

The stage is `rapidpipe/stages/intake.py` on the pipeline repository's
`rebuild` branch. Its conversion, `rapidpipe/science/intake.py`, is
`main` branch. Its conversion, `rapidpipe/science/intake.py`, is
ported from `dev`'s `pipeline/ingestL2Files.py` with `dev`'s logic
unchanged.

Expand Down
4 changes: 2 additions & 2 deletions system/loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ source root and reference bound, that run made live for its survey and
dataset, the dataset's catalog copies (Gaia, NED, NED-LVS) and the solar-system
predictions' root (`ss`) imported under it, and a job
definition revision whose image runs the run's revision. The commands
below run from the top of a checkout of `rebuild`, in the rapid conda
below run from the top of a checkout of `main`, in the rapid conda
environment, against the team's database. The environment is the
commented block of the
[repository README](https://github.com/Caltech-IPAC/rapid/blob/rebuild/README.md)'s
[repository README](https://github.com/Caltech-IPAC/rapid/blob/main/README.md)'s
Getting started section,
with `RAPIDPIPE_OUTPUTS_ROOT` an `s3://` prefix the Batch job role
writes. The example is HLWAS F146, pointing `001_0001`, SCA 8, with
Expand Down
12 changes: 6 additions & 6 deletions system/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This page is for a team member who knows `dev` and reads notes, scripts
or queries written against it. It says where each thing they used went
on `rebuild`, why where a page records the reason, and what has no
on `main`, why where a page records the reason, and what has no
counterpart. The [foundation](foundation) page states the design these
rows summarise; this page states no rule of its own.

Expand Down Expand Up @@ -105,12 +105,12 @@ page or ruling states why.
| exit codes 64 and above are errors | `rapidpipe/exitcodes.py`: 0, 1, 2, 64, 65, 69, 70, 75; a tool's nonzero exit fails the job with 70; a transient failure exits 75; `loop` exits 1 for a failed or refused job and 64 when its first pass admits nothing | changed | {ref}`a tool's nonzero exit fails the job <decision-tool-exit-checked>`; [stage contract](stage-contract.md#exit-codes) |
| per-stage `.out` log files in `/work` | one `rapidpipe.log` line shape to stderr, in UTC, which Batch sends to CloudWatch | changed | no recorded reason; [observability](observability.md#the-line) |
| test entries per date (`dev/*_tests.rst`) | `tests/unit`, `tests/db`, `tests/cli`; `scripts/validate_run.py` and `scripts/check_run.sh` per run | changed | no recorded reason |
| branch from `dev`, pull request to `dev` | branch from `rebuild`, pull request to `rebuild`, green CI; a `ported-from:` pin on every ported module, and `scripts/science-drift.sh` listing unported `dev` commits | changed | {ref}`the dev-to-rebuild science flow <decision-science-flow>` |
| branch from `dev`, pull request to `dev` | branch from `main`, pull request to `main`, green CI; a `ported-from:` pin on every ported module, and `scripts/science-drift.sh` listing unported `dev` commits | changed | {ref}`the dev-to-rebuild science flow <decision-science-flow>` |

## What has no counterpart

The rebuild does none of the following. Each is a thing `dev` does
that no stage, script or table on `rebuild` does today.
that no stage, script or table on `main` does today.

| `dev` | What it did | Why the rebuild does not |
|---|---|---|
Expand All @@ -122,12 +122,12 @@ that no stage, script or table on `rebuild` does today.

## Schema

Every product table on `rebuild` adds `job` and `dataset`; the rows
Every product table on `main` adds `job` and `dataset`; the rows
below do not repeat them. `dev`'s side is `rapidOpsTables.sql`,
`rapidOpsSourcesTable.sql`, its migrations and the tables its scripts
create per field; `rebuild`'s is `database/schema.sql` and the dated
create per field; `main`'s is `database/schema.sql` and the dated
files beside it. Where `dev` applies its migrations by hand as the
database owner, a dated file on `rebuild` is applied by whoever merges
database owner, a dated file on `main` is applied by whoever merges
the pull request that adds it, from their own workstation, in one
command in a rapid_systems checkout:
`cloudformation/apply-dated-sql.sh <path to the dated file>`. It runs
Expand Down
2 changes: 1 addition & 1 deletion system/observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ existing `rapid_read` login.

## Where a job's time goes

On `rebuild`, a job's steps, its S3 reads and writes, its CPU against wall and its host are `job_metrics` fields, and the [throughput report](throughput) ranks a run's hours from them; this section describes the run model's timings.
On `main`, a job's steps, its S3 reads and writes, its CPU against wall and its host are `job_metrics` fields, and the [throughput report](throughput) ranks a run's hours from them; this section describes the run model's timings.

The pipeline sees four timestamps in a Batch job's life: attempt
allocation (`attempts.started`) and Batch's job creation, start and
Expand Down
2 changes: 1 addition & 1 deletion system/psf.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ the calibration's PSF and what flight data will carry
({ref}`ruling <decision-psf-from-epsf>`); a simulation's rendering PSF
is not a product. The reduction from the ePSF to a pipeline PSF is new
science with no `dev` original. The stage is `rapidpipe/stages/psf.py`
on the pipeline repository's `rebuild` branch. The
on the pipeline repository's `main` branch. The
[foundation](foundation) page states the records it works within, the
[stage contract](stage-contract) page what a stage is, and the
[loop](loop) page when a job of it is submitted.
Expand Down
2 changes: 1 addition & 1 deletion system/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ publisher. It runs `dev`'s reference
pipeline (`ppid` 12, `pipeline/referenceImageSubs.py`) in `dev`'s order
under the foundation's `run(job)` contract: `rapidpipe/stages/reference.py`
and `rapidpipe/science/reference/` on the pipeline repository's
`rebuild` branch. The [foundation](foundation) page states the records
`main` branch. The [foundation](foundation) page states the records
it works within, and the [stage contract](stage-contract) page what a
stage is.

Expand Down
2 changes: 1 addition & 1 deletion system/specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ Part 1 is partly done: the schema, glue and build recipe live in
connection helper and the logging were already ported; three small
carry-overs landed as rapid PRs 563 to 565; the branch is deleted); the
issue triage against this specification remains open. Parts 2 through 8 are prototypes
on the `rebuild` branch, documented here:
on the `main` branch, documented here:

| Part | Scope | Pages |
|---|---|---|
Expand Down
2 changes: 1 addition & 1 deletion system/tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

`rapidpipe` is the team's single command-line tool, shipped in the
pipeline repository and the image's entrypoint. This page lists the
commands it has on the `rebuild` branch, as `rapidpipe --help` and each
commands it has on the `main` branch, as `rapidpipe --help` and each
command's `--help` print them; the [foundation](foundation) page's "The
verbs" section says what each does to runs, jobs and bindings, and the
[loop](loop) page covers `loop`. A command not on this page does not
Expand Down