Skip to main content

Worked example: add an intblock

This walkthrough shows how to add a new organization record. Use it together with the checklist in contribute.md. A compact real record to copy from is data/intblocks/military/AUKUS.yaml (3 members, sourced description, provenance, last_verified).

Do not invent membership. If the official roster is not in hand, stop and leave includes empty only when you also set membership_applicability: not_applicable.

1. Confirm it belongs​

Read intblock-inclusion-policy.md. Standing IGOs, treaties with parties, durable forums, and named geographic sets are in scope. Ad-hoc news coalitions and socioeconomic rankings are not. Discovery catalogues and roster authorities are listed in intblock-sources.md — do not invent membership. How to search and improve records: discovery.md.

Pick:

  • id — uppercase official acronym (AUKUS, NATO). See id rules in the inclusion policy. Filename stem must match id exactly.
  • Directory — data/intblocks/<primary-blocktype>/. The folder name is the primary blocktype and must already exist in data/blocktypes/blocktypes.yaml. Additional types go in the blocktype list.
  • scope_category — igo | treaty_body | policy_forum | reference_enumeration | intergovernmental_body | non_state_organization. The category describes the entity, not a country's role in includes.

2. Create the YAML​

data/intblocks/military/AUKUS.yaml

Minimum fields: id, name, blocktype, status. Then add:

FieldWhy
includes[].idAuthoritative country alpha-2 (quote 'NO' for Norway)
includes[].statusKey from data/schemas/includes_status.yaml
includes[].joined / leftISO dates when known
membership_countCountry-member count unless membership_count_type says otherwise
wikidata_idOr an exclusion entry in data/schemas/wikidata_exclusions.yaml
topicsKeys from data/schemas/topics.yaml
provenanceAt least four field-level entries
last_verifiedYYYY-MM-DD of the source check (12-month advisory SLA)

3. Validate​

python scripts/validate_intblocks.py --json

Exit codes: 0 = no errors (warnings allowed); 1 = errors, or warnings with --fail-on-warning. CI runs with --fail-on-warning, so fix every errors[] and warnings[] item; use fix_hint when present. Only the date-based staleness warnings (last_verified and provenance age) do not fail it.

Also run:

python scripts/validate_countries.py --json
python scripts/builder.py build
python scripts/check_generated_artifacts.py
pytest tests/
ruff check internacia_builder/ scripts/ tests/
python scripts/check_doc_counts.py
python scripts/check_markdown_links.py

Update current-count documentation and affected cookbook expectations for the new record so those checks pass.

4. Changelog and PR​

Add a changelog.d/<slug>.md fragment with an ### Added entry (new intblock = MINOR when released); do not edit CHANGELOG.md and do not write running totals such as "(1304 intblocks)" (see changelog.d/README.md). In the PR: cite the official membership source and do not hand-edit data/datasets/. Run the full build; a new record normally leaves data/datasets/ clean, because build manifests and datapackage.json are not committed. CI rebuilds and checks the committed descriptors against its own staging directory.

If the change needs a new blocktype, a schema field, or an id rename, stop and open an OpenSpec proposal first (openspec-quickstart.md).