Skip to content

Step 8: Labels, provenance, NOTICE #22

Description

@craig-dt

From PLAN.md step 8. Spec: docs/spec.md. Phase 1.

Parallel-safe — touches files no other concurrent step touches.

Files: src/flabel/labels.py, src/flabel/provenance.py, src/flabel/notice.py, tests/test_labels.py, tests/test_provenance.py

Changes: Build SourceEntry values, deriving label_basis from source class and carrying admission_basis and licence. Canonical serialisation per spec §10. Assemble the run block including every loss-condition field. Emit NOTICE for sources that actually asserted a label.

Test that proves it: canonical output is byte-identical across two serialisations of the same data, and the labels array sorts by (ts_first, uid) regardless of input order. Required-fields check: every SourceEntry carries every field the spec §4 table demands — this is the automated form of Goal 1, with no "where applicable" escape. ioc-name sources yield indicator-reference; all other labelling classes yield direct. NOTICE lists a GPL/CC-BY source that asserted a label and omits a source that asserted none. Every loss-condition field exists in the run block.

Depends on: 2. Parallel with: 7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    plan-stepOne step from PLAN.md

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions