Skip to content

Python API: New Format and Feature abstractions

Latest

Choose a tag to compare

@stanislaw stanislaw released this 13 Jul 09:30
7e5a366

This is a breaking change release for users of the Python API
(strictdoc.api.* and any code importing StrictDoc's internal modules directly). See item 1 and the note on Format/Feature abstractions below.

This release contains the following enhancements:

1) A new strictdoc.api.* layer exposes StrictDoc's internal building blocks (document tree, traceability index, HTML templates, project statistics, and more) as a stable import surface for Python scripts and plugins, replacing direct imports from internal modules.

2) The strictdoc import command has been replaced by strictdoc convert. strictdoc import reqif sdoc input.reqif output.sdoc is now strictdoc convert input.reqif output.sdoc, and strictdoc import excel basic input.xls output.sdoc is now strictdoc convert input.xls output.sdoc --input-format=excel.

3) Search queries (--filter-nodes and the Query screen) gained quantified list membership checks: any([...]) in node["FIELD"], all([...]) in node["FIELD"], and none([...]) in node["FIELD"] test whether a field (including TAGS) matches at least one, all, or none of a list of values.

4) The dashboard's project index now hides long external filesystem prefixes in input/output paths, replacing them with a compact, click-to-reveal element instead of always showing the full absolute path.

5) StrictDoc now renders a dedicated favicon per execution context (regular export, dev server, test server), and a project can supply its own custom favicon via a new favicon_path project configuration option.

6) Fixed: the project index dashboard's column widths are now stable instead of shifting depending on path contents.

Important: Format and Feature abstractions. StrictDoc introduces two new top-level abstractions for extensibility. Format covers everything that reads/writes document content (SDoc, Markdown, ReqIF, RST, Excel, HTML, HTML2PDF, Doxygen, JSON); a project can register custom formats via the Python project config, e.g. formats=[*ProjectConfig.default_formats(), CustomMarkdownOftFormat()]. Feature covers cross-cutting, non-content capabilities that plug into the export and server commands (for example, project statistics); a project can register custom features via project_features=[...],
alongside the existing built-in feature handle strings. Both abstractions are Python abstract classes. Users who currently import StrictDoc's internal modules directly (generators, readers, or ad hoc strictdoc/features/* wiring) should migrate to strictdoc.api.* and the Format/Feature interfaces, since the internal module layout they replace may keep changing with or without notice.


What's Changed

  • feat(project_index): Hide external filesystem prefix in project index dashboard paths by @mettta in #3019
  • docs: update Roadmap by @stanislaw in #3020
  • feat(query): add quantified list membership queries by @larsjohansson-saferadar in #3022
  • fix(source_file_view): use cast() instead of list() to satisfy mypy by @stanislaw in #3023
  • fix(helpers/parallelizer): avoid fork() DeprecationWarning in ProcessPoolExecutor by @stanislaw in #3021
  • chore: improve build cache folder names by @stanislaw in #3026
  • chore: consolidate pycache files in build/pycache folder by @stanislaw in #3027
  • refactor: introduce Format abstraction by @stanislaw in #3028
  • feat(favicon): environment-aware browser-tab favicon with custom favicon support by @mettta in #3025
  • fix(tests/end2end): fix flaky test related to UID reset when editing nodes by @stanislaw in #3029
  • feat: connect CLI "import" command to Format classes by @stanislaw in #3030
  • feat!: migrate the "import" command to "convert" by @stanislaw in #3031
  • test(integration): examples/python_api: add custom CSV format example by @stanislaw in #3032
  • feat(api): introduce strictdoc.api.* layer by @stanislaw in #3033
  • feat: introduce Feature abstraction by @stanislaw in #3034
  • chore(tools/ecss): update the ECSS EARM import script to latest Feb 2026 by @stanislaw in #3035
  • docs: update release notes by @stanislaw in #3036
  • fix(tree_map): fix the presentation of very long titles when zoomin in/out by @stanislaw in #3037
  • release: bump version to 0.27.0 by @stanislaw in #3038

Full Changelog: 0.26.0...0.27.0