Skip to content
Alpha: see what works today →
Menu

The Bridge specification's tests

The newest run on main of the tests of cascade-bridge-spec, read as a tree of package, capability and situation, each with what it is for and each case linked to its source. Failures come first within a capability, and the levels that hold one are open.

All 1547 cases pass · commit 228b760 · · 210.32 s · the run 1547 passed 0 skipped

pytest over the specification's files, the adapter profile and the compatibility tool. For an agent: cascade-bridge-spec.ctrf.json.

The Bridge specification's own tests: what the vectors an engine must reproduce, an adapter package, and the compatibility tool are held to. Each heading names the files it is about.

Glossary
accounting (source accounting, accountings)
a Turtle file in which an adapter says, path by path, what becomes of each element and attribute of a source record.
action (actions, start action)
a reusable step of a GitHub workflow, kept in a folder of this repository; the start action is `.github/actions/start`.
adapter (adapters, adapter package)
here, a package of data for one XML or JSON source format, with no code in it: queries, schemas, sample inputs and what converting them must give.
allowlist (allowlists)
a list of what is permitted, so that anything not on it is refused.
annotation (annotations, Web Annotation)
a note about one thing, written in the W3C Web Annotation model: a body, a target and a motivation; a finding is one.
arrival (arrivals)
the node of a document's graph that says how one version arrived: from which document and where in it, in which import, and with the version and update time the source itself gave the record.
artifact (artifacts)
a named bundle of files a CI run keeps after it ends, which a person or a later job downloads by that name.
attachment (attachments)
an element or property of a source record that holds a file's bytes, such as the data of an HL7 V3 `ED` (encapsulated data) element, usually written in base64.
base64
a way of writing bytes as letters, digits, `+`, `/` and `=`, which a Bridge decodes to text when the attachment is of a text media type.
blank node (blank nodes)
a node of a graph with no IRI, so that it can be told from another only by what is stated of it.
body (bodies)
the part of a finding that says what kind of finding it is, as an IRI.
Bridge (Bridges)
a program that runs adapters: it reads a source document, runs the adapter's queries over it and writes records in the Cascade vocabulary, with findings.
Bridge vocabulary
`vocab/bridge.ttl`: the terms this specification defines, under `https://ns.cascadeprotocol.org/bridge/v1-draft#`, as distinct from the Cascade vocabulary a person's records are written in.
C-CDA
Consolidated Clinical Document Architecture: HL7's standard for the XML summary documents patient portals hand out.
canonical content
a version's statements written one to a line and sorted, with the placeholder standing for the version itself; the SHA-256 of these bytes is the version's name.
census (census finding, census findings)
what a Bridge reports of every path of a record that the accounting has no entry for.
checkout (checkouts)
a copy of a repository's files at one commit, placed in a folder.
clock (clocks)
in a benchmark result, a measurement of time: the kind of result that carries its samples and their range.
concept map (concept maps)
a table from a source's own values (each a notation) to Cascade terms, written as a SKOS concept scheme.
conversion (conversions)
one test of an adapter: an input, the envelope it arrives in, and the graph and findings converting it must give.
counterpart (counterparts)
a repository a run tests the repository under test with: for an engine an adapter, for an adapter an engine.
crate (crates)
an adapter's `ro-crate-metadata.json`, a file in the RO-Crate format that describes every file of the package; its root entity is the adapter itself.
CTRF
Common Test Report Format, an open JSON format for test results (ctrf.io).
cycle (cycles, cycle member)
pull requests that name each other on `Depends-On:` lines, directly or through others, and so must merge together.
digest (digests)
the SHA-256 hash of some bytes; in a name it follows `ni:///sha-256;`, written in base64url without padding.
domain
in RDF Schema, the kind of thing a term is stated of; a term with no domain may be stated of anything.
dotfile (dotfiles)
a file whose name begins with a dot, such as `.gitignore`.
EARL
the W3C's vocabulary for test results; a report in it gives each test one of five outcomes: passed, failed, cannot tell, inapplicable, untested.
engine (engines)
here, a Bridge as a compatibility run meets it: a repository that builds the program which runs adapters.
entity (entities)
in XML, a name written between `&` and `;` that stands for some text, such as `&` for an ampersand.
entry (entries, path entry)
one line of an accounting: a source path, its verdict, and what the verdict requires beside it; in a test manifest, one item of its list, which is a test, or an input-only entry.
envelope (envelopes)
one outer form a source document takes around its records, such as a set of records or one record alone.
envelope skeleton (skeleton test, skeleton tests)
the lift of a whole document with each record kept only in outline, which is all an adapter's detect query sees; a skeleton test is a vector of it.
expected findings
the findings a conversion must produce, as a Turtle file the test names.
expected graph (expected graphs)
the records a conversion must produce, as a Turtle file the test names.
facts (supplied facts)
statements about an input document that the document cannot make itself (who it came from, when it was imported), supplied to a Bridge with it.
failure kind (failure kinds)
one of the named ways a call on an engine's library fails, such as `bridge:documentFailure` for a document that cannot be read.
fake engine
`fixtures/fake-engine/engine.py`: a small program that offers an engine's three commands and is no Bridge, for testing the tools that run engines.
fault (faults)
one line a failing check prints: what was wanted and where it was not met.
finding (findings)
a note a Bridge writes about one node of one input: something not carried, a schema rule broken, a value outside a map.
findings query (findings queries)
a SPARQL CONSTRUCT an adapter names that writes findings about the record being converted.
fixture (fixtures)
here, a sample package the specification carries to test with, such as `fixtures/synthetic-adapter/`.
focus node (focus nodes)
in SHACL, a thing a shape is checked against.
gap (gaps)
a named reason that something in a source is not carried into the Cascade vocabulary.
gap scheme (gap schemes)
the SKOS concept scheme an adapter keeps its gaps in.
graph (graphs)
a set of RDF statements, each a subject, a predicate and an object; what a lift, a mapping or a whole conversion writes is one.
harness (benchmark harness)
a program that times an engine on the benchmark inputs and writes the results file `bench/result.schema.json` describes.
hold (holds, held)
of a report, to be one the judge finds no fault in.
host (hosts)
one way an engine or runtime is built and run, such as natively or under Node; `compatibility.json` gives each a name, a setup and a command.
identity relation test
a test over several conversions that says whether they must give the same record.
import
one run of a Bridge over one document, written in the document's graph as a node of its own that says which document it used and which adapter it applied.
input-only entry (input-only entries)
a manifest entry that only supplies an input to others, and so must not be reported as a test.
IRI (IRIs)
a web-style identifier, such as `https://ns.cascadeprotocol.org/cascade#Record`; every term and every record is named by one.
JSON Pointer (JSON pointer, JSON pointers)
a way of naming one value in a JSON document by the path to it, such as `/entry/0/resource`.
JSONPath
a language for picking values out of a JSON document, such as `$.entry[*]`.
judge (judges, judged, judging)
the part of the compatibility tool that reads an EARL report and the adapter's test manifest and prints the faults it finds, or none; `engine/faults-of-a-report.rq` is the query it asks.
label (labels, labelled)
a short name written for a thing, such as `rdfs:label` or `skos:prefLabel`; in a query, the name written after `_:` for a blank node.
library
what a program that loads an engine calls: describe, load, ask, convert and test, each taking bytes and returning bytes (`engine/library.md`).
library case (library cases)
a list of calls on an engine's library, in order, and what each must return or fail with, listed in `fixtures/library/manifest.ttl`.
lift (lifted)
the first step of a conversion: the source record written as statements, element by element, before any mapping runs.
literal (literals)
a value written in a statement as text with a datatype, such as `"2.00"^^xsd:decimal`, as distinct from an IRI that names a thing.
local run
a run on a developer's machine, outside CI: it reads no pull request and uses the checkouts beside it.
lone surrogate (surrogate)
in a JSON string, one half of the pair of numbers written with a u escape that stands for a single character; alone it stands for no character.
lookup (lookups, looked up)
an entry's statement that its path's values are found in a concept map, and which gap a value outside the map opens.
lowercasing (lowercased)
writing a value in lower-case letters; SPARQL does it letter by letter, where Unicode case folding goes further.
manifest (manifests, test manifest)
here, a list of test cases, a Turtle file in the W3C's test vocabulary: an adapter's, which its crate names, or the one in each folder of vectors.
mapped graph (mapped graphs)
what a mapping wrote for one source record, before a Bridge names its versions.
mapping (mappings)
a SPARQL CONSTRUCT an adapter names that writes records in the Cascade vocabulary from a lifted source record.
merge gate
the check `ready-to-merge`, which passes a pull request only once those it names have merged or are ready with it.
N-Triples
a W3C text format for writing statements, one to a line, with no abbreviations.
name shorthand
in a JSONPath, `.name` written for `['name']`, the short way to select a member.
named pull request (named pull requests)
a pull request reached from the one under test by `Depends-On:` lines, each a line of a description giving another pull request's address.
namespace (namespaces)
the common beginning of a vocabulary's IRIs, such as `https://ns.cascadeprotocol.org/cascade#`.
naming rule (naming rules)
a query the vocabulary publishes that gives the name of a thing from what it is made from, such as a record's name from its address on a server.
nested node (nested nodes)
a part of a version with an IRI of its own, the version's IRI followed by `#` and a fragment; it is renamed with its version.
notation (notations)
in SKOS, the code a concept is known by; in a concept map, a source's value.
ontology file (ontology files)
a Turtle file under `ontologies/` that declares terms.
outcome (outcomes)
what an EARL report says of one test: `passed`, `failed`, `cantTell`, `inapplicable` or `untested`.
output (outputs)
a named value an action gives back to the workflow that ran it, which a later step can read.
placeholder
`urn:cascade:this-version`, which stands for a version in its own canonical content, since the version's name is not known until that content is hashed.
pod (pods)
one person's records, and what that person has said about them, kept as files in one folder.
profile
the set of requirements an adapter package is validated against, under `adapter/profile/`.
pull request (pull requests)
a proposed change to a repository on GitHub, which is reviewed and then merged.
rdflib
the Python library that reads Turtle for the specification's checks.
record (records, source record, source records)
here, one repeated item of a source document, such as one `ExampleRecord` element of a set; a Bridge converts a document record by record. What a mapping writes for it is called a record too, and a naming rule names it; where the two must be told apart the item is the source record.
record path (record paths)
the JSONPath by which an envelope of a JSON adapter selects each record of a document, such as `$.entry[*]`; only `$`, `.name`, `['name']` and `[*]` may be used.
reference lift
`tests/specification/json_lift.py`: a JSON lift written from `engine/sparql.md` alone and sharing no code with any Bridge, which every JSON vector is run through.
refinement (refined)
the second half of a selector: a path from a record to one node inside it.
release
here, a build of an engine published on GitHub as `build-<commit>`, which an adapter's run uses instead of building the engine.
repository under test
the repository whose pull request or branch a run was started for.
results directory
the folder a compatibility run writes into: `record.json`, `table.md`, the EARL reports under `earl/`, and the case report. The start action uploads it.
rocrate-validator
the program that checks an adapter package against RO-Crate 1.2 and the profile, running each file under `adapter/profile/must/` as one requirement.
run (runs)
one execution of `scripts/compatibility.py` over a repository, in CI or locally.
run record
the file a run writes of each repository it used, its commit and how it was picked.
runtime (runtimes)
software that reads and writes pods as the vocabulary requires.
same content
two versions of a record whose canonical content is byte for byte alike, so that they get the one name.
selector (selectors, record selector)
the part of a finding's target that picks a node of the input: an XPath for XML, a JSON Pointer for JSON.
severity
how serious a finding is, one of `sh:Info`, `sh:Warning` and `sh:Violation`.
shapes (Bridge shapes)
here, the specification's requirements on a crate, a manifest, a findings file, a file of facts or an accounting, written in SHACL, the W3C language for checking data.
sibling (siblings)
a checkout in the folder beside the one a local run is given.
SKOS
the W3C's vocabulary for lists of named concepts, which a gap scheme and a concept map are written in.
source path (source paths)
a path from a record's element to one element or attribute under it, with no positions, as an accounting writes it.
SPARQL
the W3C query language for data written as statements, as Turtle writes them. https://www.w3.org/TR/sparql11-query/
stand-in (stand in, stand-ins)
a made-up value written where a real one was removed, such as `Bench Hospital` for a hospital's name.
summary page (run's summary)
the page GitHub shows for a workflow run, to which a step may append Markdown; the compatibility table is appended there.
superclass (superclasses, subclass)
in RDF Schema, a class that another class is a kind of; a property defined for the superclass applies to the subclass.
Synthea
a program that invents people and writes health records for them, from which the benchmark inputs are made.
synthetic adapter (synthetic adapters)
`fixtures/synthetic-adapter/` (XML) and `fixtures/synthetic-json-adapter/` (JSON): made-up adapters that pass the profile, to copy and to test with.
synthetic vocabularies
`fixtures/synthetic-vocabularies/`: an invented stand-in for a checkout of the Cascade vocabulary, holding the ontology file and shapes the synthetic adapters name.
table row (row, rows, table rows)
one line of the table a run writes, for one repository the run used.
term (terms)
here, one word a vocabulary defines, named by an IRI; `bridge:` terms are the specification's, others are the Cascade vocabulary's.
triple (triples)
one statement of a graph: a subject, a property and a value.
Turtle
a W3C text format for writing statements in the vocabulary's terms. https://www.w3.org/TR/turtle/
vector (vectors, versioning vector, versioning vectors)
a worked example an engine must reproduce: an input file and the output expected from it, listed in a manifest.
verdict (verdicts)
what an entry says becomes of its path, one of six: carried, carried in part, redundant with another path, consumed, no home, ignored.
version (versions)
what a record says at one time; when a source changes a record, the pod keeps the old version and adds a new one. cascade:version
vocabulary (vocabularies, Cascade vocabulary)
cascade-vocabulary, the project that defines the words health data is written in, the requirements every pod meets, and a set of ready-made questions. https://ns.cascadeprotocol.org/cascade#
vouch (vouches, vouched)
to give the digest of a file in a release's notes, saying the file is what it should be.
well formed (well-formed)
written by XML's own rules of syntax, whether or not it also meets a schema.
whitespace
characters that show nothing between words; XML counts only the space, tab, carriage return and line feed, where Unicode counts more, such as the no-break space.
XPath (XPaths)
the W3C language for picking nodes out of an XML document, such as `/ExampleRecord/Status`.
XSD (XML Schema)
the W3C's XML Schema language, in which a source's rules for an XML document are written, in `.xsd` files.
Zuul
a system that tests the changes of several repositories merged together, as this tool does for the pull requests a description names.
Build and packaging 167 passed