Datasets:
AGENTS.md
Guidance for agents and contributors adding a source and cutting a release. Read this before opening a PR — several recent contributions added data but skipped the doc/version bump, forcing a maintainer cleanup release.
How the docs are actually maintained
src/make_docs.py is a scaffolding/assembly helper, not a round-trip source
of truth. It regenerates the README source table + release totals, LICENSE,
a CHANGELOG stub, and template datasheets — but it does not reproduce the
committed docs on its own:
- It iterates
SOURCESinsrc/sources.py; any source indata/but missing fromSOURCESis silently dropped from the table and totals. - It stamps every regenerated datasheet's "Added" with the single global
ADDEDconstant, overwriting real per-source add dates. - It cannot reproduce hand-written README narrative (audit notes, policy notes, the phrase-frequency section).
So datasheets and the README narrative are hand/contributor-maintained.
Never run make_docs.py and commit the result blind — git diff first and
restore anything it dropped or restamped.
Add a source
- Produce the artifact under
data/<key>/:<key>.parquet— built bysrc/build_dynaword.py(LFS-tracked automatically).<key>.stats.json— doc/token/char counts (drives all totals).<key>.md— datasheet (see below).
- Add the ingestion script:
src/fetch_<key>.pyorsrc/clean_<key>.py, so the source is reproducible.build_source(build_dynaword.py) expects a<file_key|speakleash_key>.jsonl.zstintermediate. - Register the source in
src/sources.py(SOURCES) — required, or make_docs never sees it. Copy an existing entry's shape:pretty,license,license_spdx,traceable,upstream,domain,created,is_ocr, and thespeakleash_key/file_key. If the datasheet is hand-authored (rich provenance or a fixed add date), add"custom_datasheet": Trueso make_docs leaves it alone. - Add a contract test:
src/test_<key>_contract.py(canonical schema, non-empty text, positive token counts, uniform source/license, stats-file consistency). Runpython3 -m pytest src/before committing.
Cut the release (the part that gets skipped)
- In
src/make_docs.py: bumpVERSIONandRELEASE_DATE. Add a row for the new version to the version table and a row for yourself to the Contributors table (both are literal rows in the template). - Regenerate the phrase-frequency report and charts (registry-independent — it
globs
data/*/*.parquet):
Writespython3 src/pattern_frequency_report.pyartifacts/pattern_frequency_hf_snippet.md+ 10 PNGs. Splice the tables and chart embeds into the README "Results" section by hand. - Update
README.mdby hand: header totals, version table, source table row, Contributors row. The document/token totals must equal the sum of the per-sourcestats.jsonfiles. - Prepend the release notes to
CHANGELOG.mdunder a new## vX.Y.Z (date)heading. History is append-only — never rewrite earlier releases.
Do not commit
*.log (fetch/build logs), .DS_Store, src/__pycache__/. Only logs/ is in
.gitignore — root-level logs and OS cruft are not, so check git status
before staging. *.parquet is LFS-tracked; commit the pointer, not the blob.
Known drift / cleanup opportunities
biblioteka_nauki,europeana,parlamint_plare inSOURCESbut have nodata/shard (make_docs skips them with! no stats). Intentional placeholders or stale — confirm before relying onbuild_dynaword.py --all.- The global
ADDEDdatasheet stamp is a footgun: give datasheets a per-source add date (orcustom_datasheet) before making make_docs regenerate them.