Skip to content

feat(audit): attach _sources to every TOML; delete license ratchet (#175) - #196

Merged
gerchowl merged 2 commits into
mainfrom
feature/175-license-audit
May 6, 2026
Merged

gerchowl merged 2 commits into
mainfrom
feature/175-license-audit

Conversation

@gerchowl

@gerchowl gerchowl commented May 6, 2026

Copy link
Copy Markdown
Contributor

Summary

One-time #175 audit. Every material node in src/pymat/data/*.toml now carries a _sources._default placeholder; the .github/license-ratchet.txt is deleted so the #174 CI gate now covers the full data corpus.

The placeholder is honest, not fabricated — license = "proprietary-reference-only", ref text explicitly says values are aggregate curation history pre-#175. Future per-source PRs (#158-#173) overwrite individual entries with verifiable citations.

Tooling: scripts/audit_attach_sources.py is stdlib-only, idempotent, and appends new sections at file end (preserves all existing formatting and comments).

Audit count: 132 _default entries added across 7 TOML files

  • ceramics.toml: 13
  • electronics.toml: 16
  • gases.toml: 14
  • liquids.toml: 6
  • metals.toml: 39
  • plastics.toml: 25
  • scintillators.toml: 19

Test plan

  • python scripts/check_licenses.py passes without ratchet
  • LICENSES-DATA.md regenerated (still empty — no CC-BY sources yet)
  • Full pytest passes (582 passed, 11 skipped)
  • ruff check / ruff format clean
  • Audit script idempotent (re-run reports 0 added, 132 already-defaulted)

Closes #175

)

One-time audit per ADR-0003 §4. Every material node in src/pymat/data/*.toml
now carries a _sources._default placeholder pointing at py-mat's aggregate
curation history. The license CI gate (#174) is now active over the full
corpus — the ratchet file self-deletes as the audit completes.

Provenance is honest, not fabricated: each placeholder declares
license = "proprietary-reference-only" and ref-text that explicitly says
"py-mat curation history; values from handbook/vendor/Wikidata aggregate
(pre-#175 audit)". Future per-source PRs (#158-#173) sweep through and
overwrite individual entries with verifiable citations (Wikidata QIDs,
NIST datasets, vendor URLs, etc.).

Audit summary:
  ceramics.toml      13 materials
  electronics.toml   16 materials
  gases.toml         14 materials
  liquids.toml        6 materials
  metals.toml        39 materials
  plastics.toml      25 materials
  scintillators.toml 19 materials
  --
  TOTAL             132 _default entries added across 7 TOML files

Tooling: scripts/audit_attach_sources.py (stdlib-only, idempotent — safe
to re-run; appends new sections to file end so existing formatting and
comments are preserved).

Verification:
  - python scripts/check_licenses.py passes (no ratchet)
  - LICENSES-DATA.md regenerated (still empty: no CC-BY sources yet)
  - Full pytest passes (582 passed, 11 skipped)
  - ruff check / ruff format clean

Closes #175
@gerchowl
gerchowl enabled auto-merge (squash) May 6, 2026 21:07
@gerchowl
gerchowl merged commit 7ef7c73 into main May 6, 2026
20 checks passed
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.

One-time audit: classify existing TOML sources by license

1 participant