Milestone 1 of 8
Inspect and verify aligned fields
Load the supplied records and prove that each ID, sensor, observation, and reading still describes the same source row.
Begin with the source boundary. Before using a generator or changing record order, make sure the four fields still describe the same rows.
Goal
Load the supplied valid records and manifest, construct four aligned arrays,
and record enough evidence to trace two rows by record_id before any
reordering.
Inputs
Use the read-only data/valid_records.csv and
data/dataset_manifest.json. If you imported DATA-01's artifacts, first check
that their dataset and schema revisions match the version required by this
project. The CSV contains the source columns record_id, sensor,
observation, and reading.
The manifest supplies the expected dataset identity and row count. It is evidence to compare with the CSV, not a replacement for reading the CSV.
Deliverables
Implement a loader that returns the four columns in source order and records:
- dataset and schema identity;
- the number of source records;
- the shape and useful dtype of each array;
- two source-linked examples showing an ID with its sensor, observation, and reading.
Do not shuffle, sort, rename, or independently convert one column. Preserve the source IDs and keep the first axis as the record axis.
Checks
Check that the CSV and manifest agree on identity and count, every required column is present once, all four arrays have the same first-axis length, IDs are non-empty and unique, and the numerical fields are finite. Check that the two examples can be found at the same positions in every array.
The checker may use a small alternate valid fixture and a fixture with one missing or repeated ID. Equal shapes alone are not enough evidence of alignment.
Workspace
Use src/aligned_data.py for loading and checking the four fields. Keep the
source files read-only. Record the contract and the two traces in the report;
do not create a new artifact just for a temporary printout.
Hints
HintCheck the boundary before the values
HintOne position means one record
record_id[4] names one row, then sensor[4], observation[4], and reading[4] must describe that same row.Review
Read both traces against the CSV. Make sure no conversion removed the original ID or changed the source order. Explain why a matching shape does not prove that two arrays are aligned.
How to check your work
Checks compare the loader and traces with the version-matched reference fixture. The supplied fixture demonstrates the boundary checks; it is not a reason to skip reading the supplied files.