pypi sbmlsim 0.65.0

one hour ago

Release notes for sbmlsim 0.65.0

sbmlsim

This is a breaking release. The data of a model package can have a license of its own, e.g. CC BY 4.0 for the machine perfusion data of pkdb_models (#817). ReleaseSettings.data_license is a required field, and a release and the factory refuse a web app whose licenses do not name the data license. The web app of a model vendors sbmlsim-web 0.11.1 (#818). See Migration for what a framework and a model package do.

Breaking

  • ReleaseSettings.data_license: License | None is required, without a default, so every ReleaseSettings(...) must state it (a construction without it raises a TypeError). None states that the package has no separately licensed data and is no missing field of missing(). Only License.CC_BY_4_0 and License.CC_BY_SA_4_0 are allowed (DATA_LICENSES of sbmlsim.release.settings); any other value raises a ValueError, MIT (a license of software, which speaks of "the Software", needs a copyright line and is already the file mit.txt of the code) and a string such as "cc-by-4.0" included.
  • A web app must name the data license. With a data license, prepare_release refuses a declared app (Project.app) whose licenses do not name it, before the build, with a ReleaseError, and the factory (webapp.assets.write_assets, i.e. Project.create_models) refuses every app it writes with a ValueError, the app of Project.default_app included, in place and in a rebuild. The message names the label, the licenses of the app, the entry to add (e.g. Data: CC BY 4.0) and where to add it (app_license_problem of sbmlsim.release.settings). An entry of CC BY-SA 4.0 for the models satisfies a data license of CC BY-SA 4.0. A framework which overrides Project.default_app passes licenses=self.default_app_licenses() (the ReleaseSettings.app_licenses of the release, none without a release).
  • .zenodo.json always carries notes, HTML which lists the license of every part of the release (source code MIT, documentation and models CC BY-SA 4.0, and the data when the package has a data license), so the file of every release changes. license stays MIT: the deposit metadata of Zenodo has one license for every file of a record and no field for a second one.

Migration

  • pkpdsim first: its override of Project.default_app passes licenses=self.default_app_licenses(), otherwise the factory of a model package with a data license raises.
  • Then every model package sets data_license= in its ReleaseSettings (a License of DATA_LICENSES or None) and, with a data license, names it in the licenses of a declared app, e.g. "Data: CC BY 4.0" (ReleaseSettings.app_licenses gives the entries of every part).
  • Run the factory again: the committed web app of a model package (<name>_app.html) changes in the version of sbmlsim-web it names (and of sbmlsim), nothing else of it.

Added

  • License.CC_BY_4_0 with its legal text (resources/licenses/cc-by-4.0.txt, byte for byte the legalcode.txt of creativecommons.org, as the CC BY-SA 4.0 text is), and License.label (e.g. CC BY 4.0) and License.url.
  • ReleaseSettings.licenses, the licensed parts of a release (LicensedPart, PART_LICENSES, with Data appended when a data license is set), which the badges, the README, the index of the docs and the Zenodo notes read, and ReleaseSettings.app_licenses, the same as the entries of the footer of an app ("<part>: <license>"), which Project.default_app_licenses() gives an override of default_app.
  • With a data license the build writes its text beside the other licenses of the release (from the resources of sbmlsim, unless the factory wrote that file, e.g. CC BY-SA 4.0), and the README and the index of the docs show the badge Data license: CC BY 4.0 after the badge of the model license and the line * Data: [CC BY 4.0](...) under the licenses. The COMBINE archive is unchanged, since the data are not in it. Without a data license the README and the docs are the ones of before.

The web app

  • sbmlsim-web 0.11.1 is vendored (#818), whose CDN snippets and example are on sbmlsim-core 0.62.0 and whose AppPanelHead.columns is typed number | null. Only the version and the integrity of the package in VERSION.json change: the script the web app embeds (sbmlsim-web.iife.js) is byte for byte the one of 0.11.0, so a web app written again differs only in the version of sbmlsim-web it names.

Documentation

  • docs/release.md: the data license, the check of the licenses of an app and app_licenses; docs/licenses.md: the parts, their licenses and where every license text comes from and goes; docs/webapp.md: the licenses of an override of default_app.

Don't miss a new sbmlsim release

NewReleases is sending notifications on new releases.