Skip to content

v1.10.0 - Graphics fixes, better Markdown->HTML conversion.

Choose a tag to compare

@sa-bpelakh sa-bpelakh released this 12 Nov 20:54
· 5 commits to develop since this release

onto_tool 1.10.0

New features

Markdown action

  • Fenced code blocks. Code blocks fenced with ``` are now converted properly. When a language is given (e.g. ```python), the code is syntax-highlighted.
  • renameLinks option. Set renameLinks: true on a markdown action to rewrite relative links to .md files so they point to the generated .html files. Anchors and query strings are kept, e.g. other.md#section becomes other.html#section. Absolute URLs and paths starting with / are left unchanged. With this option on, the action reports an error if the converted page is not well-formed HTML.

Bundle file operations

  • Recursive patterns. includes and excludes patterns now support **, which matches files at any depth below source. For example, **/*.ttl matches every Turtle file in the source tree.

Graphics

  • Class labels in schema diagrams. Schema diagrams (graphic --schema) now show classes by their rdfs:label or skos:prefLabel when one exists, instead of the last part of the IRI. Labels in the configured label language are preferred, then labels without a language tag. Language tags are matched case-insensitively.

Behaviour changes

These affect every action that takes source/target with includes/excludes (such as copy, move, markdown and transform). Check existing bundles when upgrading.

  • Subdirectory structure is preserved. Files matched in subdirectories (via ** or patterns like */*.ttl) are written to the same relative path under target, instead of all being placed directly in target. Needed subdirectories are created. rename patterns apply to this relative path, so subdirectories can be renamed too.
  • Patterns only match files. Directories matched by includes or excludes patterns are ignored.
    • Directories named in includes are no longer copied as a whole. Previously, naming a directory in includes (e.g. includes: ['schemas']) copied or moved the entire directory. That now matches nothing and logs a "not found" warning. Use schemas/** instead to include everything inside it, keeping its structure.
    • Wildcards no longer pull in directories. A wildcard such as * that also matched directories used to copy or move those directories too. Now only the matching files are processed.

Bug fixes

  • Windows paths. Bundle file operations on Windows now correctly compute output paths relative to source.
  • Disconnected edges in data diagrams. In data diagrams (graphic --data), edges between classes identified by full IRIs did not connect to the class nodes.
  • Ontologies with : in their name. Import edges in schema diagrams broke for ontologies whose name contains : (for example urn: IRIs).
  • Special characters in class labels.
    • In data diagrams, a class label containing &, < or > (for example Foo & Bar) on a class with data properties stopped the diagram image from being generated.
    • In schema diagrams, class labels containing {, }, |, < or > no longer break the diagram layout.

Requirements and dependencies

  • Python 3.11 or later is now required.
  • PyYAML 6.0.3 or later is now required. This fixes the known PyYAML security vulnerabilities (CVE-2017-18342, CVE-2019-20477, CVE-2020-1747, CVE-2020-14343).
  • New dependency: Pygments, used for syntax highlighting.
  • Minimum versions raised: pydot 4.0.1, Jinja2 3.1.6, markdown2 2.5.5.
  • Exact pins replaced by minimum versions for rdflib, jsonschema, SPARQLWrapper and pyshacl, so newer compatible releases can be installed.