What is promised¶
What a program that uses the library can build on, and where each promise is written down. The binding text is the spec, in German (specs/bibliothek.md, specs/sdb-werkzeug.md); this page is its summary for developers.
Promised¶
What |
The promise |
Rule |
|---|---|---|
The exported names |
The names the package |
BIB-1 |
A stored sheet |
A sheet stored with |
BIB-21 |
A file is read by its content |
|
BIB-2 |
Stored texts |
A text stored with |
BIB-3 |
Stage versions |
|
BIB-4, BIB-5 |
Message codes |
The codes and the names of their values are part of the interface. The library lists them ( |
BIB-10 |
Language |
The language of a sentence is the one the caller names, German by default. It is never taken from the machine. |
BIB-11 |
No decision by wording |
The library never decides by the sentence of a message, and a caller need not either. |
BIB-12 |
The output’s description |
What |
SDW-16 |
The choice among sheets |
|
BIB-6 to BIB-9 |
What the regulation expects |
|
BIB-25 |
No clock |
The library does not read the date. What depends on today takes it as an argument, |
BIB-19 |
The output’s schema |
The schema is part of the promise, not only a description: a change that makes a formerly valid record invalid, or drops a key, is breaking. |
BIB-15 |
Each of these has tests that fail when it is broken. The tests name the rule they hold, and a test of the specs fails when a rule has none.
Not promised¶
Submodules. What is reached only through a submodule, such as
sdb_reader.parserorsdb_reader.layout, can change without notice. That includes the parts that ask a language model (BIB-1).Sentences. The wording of a message can change with any release. Only its code and values are fixed.
The report of
show. Whatsdb-reader showprints is written for people: its wording and its layout can change with any release (SDW-41). A program takes the record ofread.What a sheet reads as. The reading of a given PDF can change when a stage version rises: that is what the versions are for. A release that changes what the same file gives says so in the changelog.
Text recognition. A sheet read by
tesseractdepends on the version of that program on the machine. It is not part ofextraction_stage().
How the library changes¶
Versions (BIB-13). From version 1.0 on, versions follow semantic versioning:
Part |
Rises with |
|---|---|
major |
a breaking change to an exported name, a message code or its values, the JSON schema, or the command line’s options and exit codes |
minor |
an addition, and every rise of |
patch |
a fix that changes no reading |
Before 1.0 a minor version may break. The changelog says so under “Breaking”.
The rise of a stage version is not a breaking change: no code has to change, only texts or readings kept from before have to be made again. The changelog names it under “Read again”. Nor is a reading that changes: what a sheet reads as is not promised (see above), and the changelog names it under “Changed” or “Fixed”.
Notice (BIB-14). An exported name that is to go stays for one minor
version and warns with DeprecationWarning when it is used, before the next
major version removes it.
Python (BIB-16). Every Python version that is still maintained at the
time of a release is supported, from 3.12 on: at present 3.12 to 3.15. A
version leaves when its maintenance ends and a new one joins when it is
released; neither is a breaking change. The package names the oldest in
requires-python and each in its classifiers, and the tests run with every
one of them.
Fixes (BIB-17). Only the newest release gets fixes. An older one is not maintained; a program that needs it stays on the tag it builds on.
The changelog (BIB-18). Releases are tags of the repository. CHANGELOG.md says for each one what changes for someone who uses the command or the library. It names every breaking change under “Breaking” and every rise of a stage version under “Read again”, with what to do about readings and texts kept from before. What came since the last release stands under “Unreleased”; before the first release that section says what the first version offers and which stage versions it reads with.
Releases (BIB-23). A release is a tag v<version> of the repository,
and the package of that version on the Python Package Index is built from
it by the repository’s own workflow, never by hand. The first published
version is 0.9.0.
Documentation (BIB-22). The documentation is at
https://foerdebaumarkt.github.io/sdb-reader/, one edition per released
version: latest/ is the newest, <version>/ the one of a version, and
versions.html lists them. An edition holds these pages, the changelog and
the reference of the exported names, built from its tag,
and does not change afterwards.
Pin the version you build on, and read the changelog before moving to another.