Skip to content

Release service

consortium.server.services.release_service

ReleaseService(release_json_file)

release cached property

Loads and returns the release information from the release JSON file.

The result is cached after the first access so the file is only read once. Because the property is cached, a failure here occurs on first access rather than at construction: a caller only sees it at the point the release information is first used.

Returns:

Type Description
ReleaseModel

A parsed model containing the release metadata (e.g. version).

Raises:

Type Description
ReleaseFileSystemError

If the release JSON file cannot be opened or read from disk.

ReleaseFileEncodingError

If the release JSON file's content cannot be decoded as UTF-8 text.

ReleaseFileJSONError

If the release JSON file does not contain valid JSON.

ReleaseFileSchemaError

If the parsed JSON does not match the ReleaseModel schema.