Skip to content

release.settings

The release metadata of a model: what its package does not know.

A model package sets sbmlsim.project.Project.release to a ReleaseSettings. The module uses the standard library only, so importing the project of a model package stays light.

Author dataclass

Author(name, orcid=None, affiliation=None)

An author of the citation of a model.

Attributes:

Name Type Description
name str

the name as "Family, Given", as Zenodo wants it.

orcid str | None

the ORCID of the author.

affiliation str | None

the affiliation of the author.

citation_name property

citation_name

The name with the initial of the given name, "Family, G.".

display_name property

display_name

The name as "Given Family".

ReleaseSettings dataclass

ReleaseSettings(
    *,
    title,
    repository,
    doi,
    authors,
    keywords,
    docker_image,
    funding,
    description,
    exclude=("TODO.md", "literature", "thesis"),
    first_year,
    framework="sbmlsim",
    core_libraries=("sbmlsim", "sbmlutils"),
    archive=None,
    library_owner="matthiaskoenig",
    hook=None,
)

The metadata of the release of a model.

All fields are keyword-only; the sequences are stored as tuples, so a list can be passed and the settings are hashable.

Attributes:

Name Type Description
title str

the title of the release: the Zenodo record, the citation, the README and the docs site.

repository str

the GitHub repository as owner/name.

doi str

the concept DOI of Zenodo.

authors Sequence[Author]

the authors of the citation, in order.

keywords Sequence[str]

the keywords of the Zenodo record.

docker_image str

the Docker image of the model.

funding str

the funding text.

description str

one paragraph about the model.

exclude Sequence[str]

paths of the model folder which are not released.

first_year int

the year of the first release, the start of the copyright.

framework str

the package the model package is built with, e.g. sbmlsim or a framework on top of it: the lock of the release must contain it, the manifest and the release notes record its version and a build may take it from a local checkout instead of the registry, which the release cannot publish.

core_libraries Sequence[str]

the libraries whose release notes the release notes summarize, in their order; the lock of the release must contain them.

archive str | None

the COMBINE archive the factory writes, a path relative to the root of the project; the build copies it into the release, the models page links it and the GitHub release attaches it, which a release without one is not published with.

library_owner str

the owner of the GitHub repositories of the core libraries, named as their package, whose release notes the notes of a release summarize.

hook object

what a framework adds to the release, a sbmlsim.release.hooks.ReleaseHook or a reference module:attribute to one, see sbmlsim.project.Project.release_hook; None for the release of sbmlsim alone.

owner property

owner

The owner of the repository.

repo_name property

repo_name

The name of the repository.

site_url property

site_url

The URL of the docs site on GitHub pages.

author_names property

author_names

The authors as "Given Family", the last joined with and.

raw_url property

raw_url

The base URL of the raw files of the main branch.

missing

missing()

Get the names of the fields a release lacks, sorted.

A field is missing if it is empty; exclude (everything is released), core_libraries, archive and hook may be empty, first_year is missing unless it is a positive int.