Skip to content

manifest-schema.yml: say what the validator honours today - #140

Merged
mmcky merged 1 commit into
mainfrom
docs/validator-contract-137
Sep 7, 2026
Merged

manifest-schema.yml: say what the validator honours today#140
mmcky merged 1 commit into
mainfrom
docs/validator-contract-137

Conversation

@mmcky

@mmcky mmcky commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

The schema block header promised a reader that does not exist yet. It said the validator reads the raw file "honouring delimiter (countries.csv is semicolon-separated) and read_as (positional workbook reads)". Surfaced as the doc nit in the first verification comment on #127.

What read_raw() actually does

builders/_validate.py lines 121-131. It consults exactly three manifest keys — schema.format (a gate: any value but csv raises), schema.delimiter with a fallback to a top-level delimiter, and the datetime64 column names via datetime_columns() — and passes exactly two kwargs to read_csv, sep and parse_dates. No index_col, no keep_default_na, no dtype, no header, no sheet_name. The identifier read_as does not occur anywhere in the module.

So read_as is honoured by nothing today. It does not misread anything either, because no CSV manifest carries it — the 13 manifests that do are the non-CSV ones, which take the conformance pass alone and never reach read_raw(). The sentence was describing a validator that has not been built.

Reworded to describe the validator as shipped, and to say what read_as is for: the contract for workbook range reads once those exist, which is precisely why the non-CSV manifests are conformance-only.

Beyond the issue's scope, flagged rather than slipped in

Two comments in the same file state a count and have drifted from the corpus they describe. Counted with PyYAML over the 44 sidecars on main:

Comment Said Is
source.doi in use by 16 of 33 manifests 17 of 44
source.version in use by 10 21

Same class of defect as the sentence above — a document describing the repository incorrectly — and one line each, so they are fixed here rather than left to drift further. Say the word if you would rather they went to their own issue.

Verification

Comment-only; no field changes, no data bytes. scripts/validate_datasets.py reports 44 manifest(s): 44 pass, 0 fail; bytes-validated formats: csv; conformance-only: {'xlsx': 5, 'npy': 2, 'dta': 4, 'json': 1, 'xls': 1} under both legs of the workflow matrix (pandas 2.3.3 and 3.0.5), and --builders reports builder layer: all green.

Closes #137.

🤖 Generated with Claude Code

The `schema` block header said the validator reads the raw file "honouring
`delimiter` ... and `read_as` (positional workbook reads)". `read_raw()` in
`builders/_validate.py` honours `delimiter` only: it consults
`schema.format`, `schema.delimiter` (falling back to a top-level
`delimiter`) and the `datetime64` column names, passes exactly `sep` and
`parse_dates` to `read_csv`, and raises `NotImplementedError` for any format
but `csv`. The identifier `read_as` does not appear in the module. No CSV
manifest carries `read_as`, so nothing misreads today — the sentence
promised a reader that does not exist yet.

Reworded to describe the validator as shipped, and to say what `read_as` is
for: the contract for workbook range reads once those are built, which is
what leaves the 13 non-CSV manifests on the conformance pass alone.

Also, beyond the issue's scope but in the same family — comments that state
a count and have drifted from the corpus they describe: `source.doi` said
"in use by 16 of 33 manifests" and `source.version` "in use by 10". Counted
with PyYAML over the 44 sidecars on main: 17 and 21.

Comment-only; no field changes. `scripts/validate_datasets.py` still reports
44 manifest(s): 44 pass, 0 fail under both legs of the workflow matrix
(pandas 2.3.3 and 3.0.5), and the `--builders` layer is green.

Closes #137.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 7, 2026 08:59
@mmcky
mmcky merged commit 146581f into main Sep 7, 2026
4 checks passed
@mmcky
mmcky deleted the docs/validator-contract-137 branch September 7, 2026 09:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is documentation-only and the updated statements match the current validator implementation and manifest corpus counts.

Pull request overview

Updates manifest-schema.yml documentation to accurately describe what the current manifest-driven validator actually reads/honours today, avoiding promises of reader behavior that is not implemented.

Changes:

  • Corrects the schema block header comment to match builders/_validate.py:read_raw() behavior (CSV-only, delimiter, parse_dates for datetime64, no index_col).
  • Updates the “in use by …” counts for source.doi and source.version to reflect the current manifest corpus.
File summaries
File Description
manifest-schema.yml Documentation-only corrections to align the schema header/comments with the shipped validator behavior and current manifest usage counts.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

manifest-schema.yml: say what the validator honours today

2 participants