Skip to content

0.7.0

Latest

Choose a tag to compare

@github-actions github-actions released this 01 Oct 09:54
· 1 commit to develop since this release
7686c81

Release notes for libsbgnpy 0.7.0

This release follows the latest SBGN specifications (PD L1V2.1, ER L1V2.0, AF L1V1.2) and validates documents against the rules of the specifications: the rules the schema cannot express, and the schematron rules of the SBGN languages, as the Java library libSBGN does.

Added

  • Schematron validation (#101): validate_schematron checks a document against the schematron rules of libSBGN, e.g., that a consumption arc starts at an entity pool node, and returns every broken rule as an Issue with its severity, rule id, message and the id of the offending glyph or arc. Every map is checked on its own with the rules of its language; 0.1 and 0.2 documents are upconverted first. The results are the ones of the Java library: the rules are packaged with three XPath 2.0 expressions rewritten for the XSLT 1.0 processor of lxml, see libsbgnpy/schema/README.md. Some reference maps of the current specifications break the partly outdated rules, so the issues are kept apart from validate (#103).
  • libsbgnpy.specification (#100): the SBGN specifications as data, SPECIFICATIONS (language, level, version, year and DOI of every map version), LATEST, the glyph and arc classes of every language (GLYPH_CLASSES, ARC_CLASSES) and the deprecated glyph classes. map_language and language_of take the language of a map from its version, falling back to the deprecated language.
  • check_map and check_sbgn check what SBGN-ML 0.3 requires but the schema cannot express: a map declares a version or a language, both name the same language, and every glyph and arc has a class of the language of the map. Deprecated classes are logged as warnings.
  • validate validates against the schema and adds the errors of check_sbgn; validate_xsd is unchanged.
  • The documentation has a page on the SBGN specifications, with the citations, the map versions and the glyph and arc classes of every language.

Fixed

  • Maps of PD L1V2.0, which SBGN-ML 0.3 lists, and of the latest PD L1V2.1 are valid: the packaged schema allows both versions, which the schema of libSBGN lacks, and they are read as MapVersion members instead of plain strings.
  • A description of a returned value spanning several lines is rendered as one entry in the API reference instead of several.

Changed

  • Reading keeps a value outside of an enumeration, e.g., an unknown glyph class, as a string and logs the xsdata ConverterWarning instead of emitting it.
  • The examples set the version of the latest PD specification together with the language of a map.

Development

  • tests/data/schematron holds the test files of the schematron rules of libSBGN; the issues of the reference maps are pinned in tests/test_schematron.py, computed with Saxon, the XSLT processor of the Java library.
  • The tables of docs/specifications.md are generated from libsbgnpy.specification by scripts/specification_docs.py; tests/test_specification_docs.py fails if they are outdated.
  • lxml is typed with types-lxml instead of the unmaintained lxml-stubs; tox-uv is part of the dev extra, so uv run tox r -e ty works.
  • Update urllib3 to 2.8.0.