The data sources are https://github.com/metanorma/bipm-data-outcomes and https://github.com/metanorma/bipm-si-brochure.
Those datasets shoudl be places in bipm-data-outcomes and bipm-si-brochure directiries respectively.
crawler.rb clones them itself (along with rawdata-bipm-metrologia), skipping any
directory that is already present, so reruns work against an existing local checkout;
delete a directory to force a fresh clone. Do not commit a crawler with those clones
disabled — CI starts from a bare checkout and fails immediately without them
(spec/crawler_sources_spec.rb guards this).
This repository is used by Relaton-BIPM to represent known BIPM publications.
Data is stored in Relaton YAML format.
crawler.rb publishes two indexes (both zipped and committed by CI):
-
index-v2— the pubid-backed runtime index (_type: pubid:bipm:*) thatRelaton::Bipmconsumes. Built byRelaton::Bipm::DataFetcher; the curatedstatic/docs are appended viaBipmIndexBuilder.add_static_to_index_v2. -
index-v1— the legacy bespoke{group,type,number,year}hash index, kept for backward-compatible consumers. Built byBipmIndexBuilder.build_index_v1over everydata/andstatic/record using the retainedRelaton::Bipm::Idparser.
Both builders warn-and-skip an identifier their parser can’t handle rather than aborting the crawl.
crawler.rb stays the source of truth for data/, but it needs
RELATON_CI_PAT and hours of metanorma builds, so it only runs in CI. When the
records are already current and only index-v2 must be rewritten — after a
Pubid::Bipm change that alters the serialized rows — rebuild it from the
committed records alone:
bundle exec ruby rebuild_index.rbIt rewrites index-v2.yaml and index-v2.zip, then prints the number
coverage per identifier type. index-v1 is left alone: it is built with the
bespoke Relaton::Bipm::Id, so a pubid change cannot affect it.
Relaton::Index narrows a lookup by binary-searching the index on the
identifier’s number, so a row without one keys to the empty string. Exactly
seven rows are number-less by design — the six ordinal-less committee
declarations (data/**/[year]-00.yaml) and the journal-level
data/metrologia.yaml. spec/index_coverage_spec.rb holds that line.