ontometer_corpus.release¶
The table release a corpus directory holds, and the table format this package reads.
A corpus directory names its release in release.toml::
release = "corpus-2026-08.1" # the git tag that cuts it
crawl = "2026-08" # month of the crawl the tables derive from
format = 1 # layout of the tables
A release is tagged corpus-YYYY-MM after the month of its crawl, and
corpus-YYYY-MM.N for a later derivation of the same crawl. format changes
whenever a table, column or meaning changes in a way an older reader would misread;
the table readers refuse any format but :data:TABLES_FORMAT.
Attributes¶
TABLES_FORMAT = 1
module-attribute
¶
RELEASE_FILE = 'release.toml'
module-attribute
¶
RELEASE_TAG = re.compile('^corpus-(?P<crawl>\\d{4}-(0[1-9]|1[0-2]))(\\.(?P<n>[1-9]\\d*))?$')
module-attribute
¶
Classes¶
ReleaseError
¶
Release
dataclass
¶
What release.toml declares.
Source code in ontometer_corpus/release.py
Functions:¶
parse_release(text, source)
¶
Parse and check the content of a release.toml; source names it in errors.
Raises:
| Type | Description |
|---|---|
ReleaseError
|
a field is missing or malformed, or the name and crawl disagree. |
Source code in ontometer_corpus/release.py
read_release(corpus_dir)
¶
The release corpus_dir declares.
Raises:
| Type | Description |
|---|---|
ReleaseError
|
there is no |
Source code in ontometer_corpus/release.py
release_at_tag(corpus_dir, tag)
¶
The release git tag tag cuts, once its release.toml names that same tag.
Raises:
| Type | Description |
|---|---|
ReleaseError
|
the tag has no |
Source code in ontometer_corpus/release.py
require_readable(corpus_dir)
¶
The release of corpus_dir, once its table format is the one this package reads.
Raises:
| Type | Description |
|---|---|
ReleaseError
|
no release is declared, or its format differs from TABLES_FORMAT. |