Skip to content

release.docs

The documentation site and the README of a release repository.

The pages of the Zensical site (docs/), its configuration zensical.toml and the thin README.md are rendered from the templates in sbmlsim/resources/release/docs and sbmlsim/resources/release (and the ones of the release hook of the project) with the content of the built release repository: the models, the experiment reports, the records of the adopted fits and the assessment of the credibility. The reports themselves are copied into the site by the docs workflow and are linked by the URL of the site.

PAGES module-attribute

PAGES = (
    ("index", "Home"),
    ("running", "Running the model"),
    ("models", "Models"),
    ("simulations", "Simulations"),
    ("fit", "Fit"),
    ("release-notes", "Release notes"),
)

The pages of the site with their titles, the entries of its navigation.

The page credibility of a model with an assessment of its contexts of use and the pages of the release hook come before release-notes, see pages.

ModelEntry dataclass

ModelEntry(stem, file, equations, figure)

A model of the release repository as the models page shows it.

Attributes:

Name Type Description
stem str

the name of the model file without extension.

file str

the file name of the SBML model.

equations bool

if the model has an equations file.

figure str | None

the name of the figure in the images of the site, if any.

FitRow dataclass

FitRow(pid, value, unit, interval, identifiability)

A fitted parameter as the fit page shows it.

FitEntry dataclass

FitEntry(id, rows, pdf=False)

An adopted fit as the fit page shows it.

Badge dataclass

Badge(label, image, link)

A badge of the README and of the documentation, an image with a link.

badges

badges(context)

Get the badges of the release, shown at the top of the README and the docs.

Parameters:

Name Type Description Default
context ProjectContext

the project context.

required

Returns:

Type Description
list[Badge]

The DOI, the latest release, the documentation (the status of its

list[Badge]

workflow, linked to the site), the tests, the Docker image (an image of

list[Badge]

Docker Hub only), the Python versions and the licenses of the code and of

list[Badge]

the models.

citation

citation(context)

Get the citation of the release.

Parameters:

Name Type Description Default
context ProjectContext

the project context.

required

Returns:

Type Description
str

The authors, the year, the title and the DOI of the Zenodo record.

pages

pages(context, release_path)

Get the pages of the site of a release with their titles.

Parameters:

Name Type Description Default
context ProjectContext

the project context.

required
release_path Path

the folder of the release repository.

required

Returns:

Type Description
tuple[str, str]

PAGES, with credibility if the release has the record of the

...

assessment of the contexts of use and then the pages of the release

tuple[tuple[str, str], ...]

hook (ReleaseHook.pages) before release-notes.

write_docs

write_docs(context, release_path)

Write the documentation site and the README into the release repository.

The folder docs is replaced and zensical.toml, the configuration of the site with its navigation (pages), is written. The release repository must be built, the pages are made from its models, figures, reports, fit records, assessment of the credibility and release notes, with the values of the release hook (ReleaseHook.values).

Parameters:

Name Type Description Default
context ProjectContext

the project context.

required
release_path Path

the folder of the release repository.

required

Returns:

Type Description
list[Path]

The written files: the pages, the configuration of the site, the README

list[Path]

and the images of the site.

Raises:

Type Description
ReleaseError

if the record of an adopted fit or the assessment of the contexts of use cannot be read.