Releases: strictdoc-project/strictdoc
Support search filters/masks with Windows paths containing "~$..." characters
This is a small bugfix release. The only issue being fixed is support for search path filters with the ~ character, as found on Windows systems and produced by MS Office tools.
What's Changed
- fix(helpers/path_filter): support Windows paths with "~" character by @stanislaw in #2643
- fix(tests/unit): fix pytest warning by @stanislaw in #2644
- release: bump version to 0.16.1 by @stanislaw in #2645
Full Changelog: 0.16.0...0.16.1
Pygments highlighting (incl. StrictDoc) | Grammar aliases | HTML2PDF forced page break option | gitignore-aware search
This release contains the following enhancements:
1) The code block syntax highlighting has been enabled for all RST .. code:: blocks. The code blocks that have been tested already include C, TOML, and Python.
Also, a Pygments lexer for the SDoc markup has been added to the StrictDoc source code. From now on, .. code:: strictdoc blocks are recognized and syntax-highlighted.
2) The grammar aliases were added to allow importing a single grammar from multiple SDoc documents located in different directories. From now on, it is possible to register a grammar alias and its path in a project configuration file and use it as follows:
[GRAMMAR]
IMPORT_FROM_FILE: @my_grammar
Thanks to @gregshue for requesting this feature and explaining the need for it.
3) Based on a user report, the html2pdf_forced_page_break_nodes option has been added to the StrictDoc configuration. This option allows specifying which nodes should always start on a new page when printed to PDF using the HTML2PDF feature. It is especially useful for documents that contain very large, descriptive requirement nodes with a lot of text. In such cases, starting each node on a new page helps avoid having the beginning of a node lost in the middle of a page. Thanks to @xw-mk for the clear request.
4) The 'Export to PDF' functionality for printing PDF documents has been extended to download a file with a name derived from the document's title. Previously, all documents were printed and downloaded as document.pdf. Thanks to @thseiler for contributing the patch.
5) The discovery of SDoc files and source files has been extended to take the project's root .gitignore file into account. From now on, the contents of .gitignore are automatically added to the exclude filters for documents and source files. This ticket had been on the roadmap since long ago, and thanks to @KlfJoat for additionally requesting it.
What's Changed
- docs: update the roadmap and backlog by @stanislaw in #2602
- docs(FAQ): add LPC25 presentation by @stanislaw in #2603
- refactor(export/html): get html2pdf classes from view object, not Jinja by @stanislaw in #2605
- feat(pyproject.toml): update html2pdf4doc to latest version by @stanislaw in #2606
- chore(.github): cancel previously launched workflows when PR is updated by @stanislaw in #2607
- chore(tests/end2end): remove checking of 404 errors by @stanislaw in #2608
- fix(html2pdf): prevents the section titles staying as last elements on a page by @mettta in #2604
- feat(html2pdf): bring in latest html2pdf with API backwards-compatibility fixes by @stanislaw in #2609
- feat(export/html): enable syntax highlighting for RST 'code' directive by @stanislaw in #2612
- feat(export/html): add SDoc markup syntax highlighting for RST 'code' blocks by @stanislaw in #2613
- docs: update release notes by @stanislaw in #2614
- fix(helpers/path_filter): add space character to the regex mask by @stanislaw in #2615
- fix(docs): fix a misleading statement about the path filters behavior by @stanislaw in #2616
- fix(source_files_finder): ignore all binary files at the first search step by @stanislaw in #2617
- chore(core/file_tree): rename the current dir full path variable by @stanislaw in #2619
- fix(core/file_tree): read .gitignore files, extend the search exclude filters by @stanislaw in #2618
- chore(core): move file system-related classes to core/file_system by @stanislaw in #2620
- chore: add direnv file .envrc by @stanislaw in #2623
- feat(sdoc|project_config): extend DOCUMENT_FROM_FILE to support grammar aliases by @stanislaw in #2621
- refactor(cli): improve the handling of cli using command pattern by @stanislaw in #2624
- chore(tasks): enable formatting of server unit test files by @stanislaw in #2625
- refactor(cli): migrate "manage autouid" to a command pattern by @stanislaw in #2626
- refactor(cli): migrate "import excel" and "import reqif" to a command pattern by @stanislaw in #2627
- refactor(cli): remove CommandParserBuilder, simplify main() by @stanislaw in #2628
- feat(html2pdf): introduce a new "html2pdf_forced_page_break_nodes" option by @stanislaw in #2610
- feat(pyproject.toml): html2pdf4doc: bring in the SDoc RST admonitions fix by @stanislaw in #2629
- feat(html2pdf): provide a config parameter for specifying bundle document UID by @stanislaw in #2630
- chore(tasks): add lint-commit task to validate Conventional Commits by @stanislaw in #2632
- feat(server, html2pdf): derive filename from document's UID and title by @thseiler in #2631
- docs: update backlog, roadmap, dev guide (conventional commits) by @stanislaw in #2633
- chore(tasks): remove an old workaround by @stanislaw in #2634
- chore(docs, tests/integration): move questionnaire example to examples/python_api by @stanislaw in #2636
- chore(cli): remove sys.path.append workaround by @stanislaw in #2635
- feat(examples): add "Query trace index" example by @stanislaw in #2637
- docs: update user guide: Python API, performance considerations for search filters by @stanislaw in #2638
- docs: update "Known issues" + minor clean-ups by @stanislaw in #2639
- fix(tests/end2end): switch to running strictdoc as a Python module by @stanislaw in #2641
- release: bump version to 0.16.0 by @stanislaw in #2640
Full Changelog: 0.15.3...0.16.0
Bugfix release
This release contains the following enhancements and fixes:
-
The SingleChoice field grammar was made to support field values with parentheses such
A(B),B(C), etc. Thanks to the Discord user AnotherOne for reporting this issue. -
The Mermaid visualization issue, where a diagram extended beyond a document page, was fixed by adjusting the SDoc document template CSS styles. Thanks to @xw-mk for reporting this issue.
-
The Link Renderer class was fixed to resolve the links between two including documents. This behavior had been implemented correctly but was broken due to the recent HTML2PDF-related adjustments, and there were no tests to catch the regression. Thanks to @lmapii for reporting this.
-
The document metadata has been extended to recognize reserved macros such as
@GIT_VERSIONand@GIT_BRANCH. Previously, these macros were recognized only when added as part of the document's VERSION and DATE fields. Now it is possible to use them with any user-defined metadata field. Thanks to @xw-mk for contributing the patch with this improvement. -
The html2pdf4doc dependency was changed to be exact-pinned with
==instead of>=. A user reported that they are using an older version of StrictDoc that relies on the older html2pdf4doc API. There is a reason why they cannot migrate to the latest version of StrictDoc, so to support their use case, StrictDoc should have an exact version pinning to avoid html2pdf4doc running away from what the older StrictDoc versions can support.
What's Changed
- Bump version to 0.15.2 by @stanislaw in #2584
- docs: update roadmap/backlog by @stanislaw in #2585
- docs: add a link to the ELISA presentation by @stanislaw in #2588
- feat(backend/sdoc): support SingleChoice values with parentheses by @stanislaw in #2589
- fix(css): include svg selector for sdoc-autogen media by @mettta in #2590
- feat(server, html2pdf): implement better error reporting when Chrome is not found by @stanislaw in #2591
- fix(link_renderer): fix links between two included documents by @stanislaw in #2596
- docs: update release notes by @stanislaw in #2597
- feat(export/html): add ability to render git information in metadata fields for html and html2pdf by @stanislaw in #2598
- fix(pyproject.toml): pin the html2pdf4doc dependency to the latest version by @stanislaw in #2599
Full Changelog: 0.15.2...0.15.3
Intermediate HTML2PDF bugfix pre-release
This is an intermediate release while we are waiting for the major layout fixes to be released in the upstream JS repository. Even without the complete release, this intermediate release should address several layout bugs that were reported by StrictDoc users.
What's Changed
- Bump version to 0.15.1 by @stanislaw in #2583
- fix(docs): fix a link to a strictdoc config example by @KlfJoat in #2581
New Contributors
Full Changelog: 0.15.1...0.15.2
Node MID/Hash generation (Linux proposal) | Reading Structured Text (PLC) source files
This release contains the following improvements:
-
Our work on the Linux kernel requirements template proposal has continued. Several enhancements were made to reading SDoc nodes from source files. Multiple lexing and parsing improvements were implemented. Node MID and HASH generation was added for source nodes when they have corresponding SDoc nodes in the “sidecar” .sdoc files used by the Linux requirements proposal. Thanks to @haxtibal for contributing patches and feedback for this work.
-
Support for reading Structured Text (PLC) files was added. Previously, files with the .st extension were incorrectly recognized as Smalltalk files, which resulted in incorrect Pygments syntax highlighting. For now, the Pygments lexer for ST is set to plain text. As part of the same work, the general non-language-specific parser for source files did not correctly recognize requirement identifiers that contain underscores. We have fixed this and created a follow-up ticket to unify the requirement identifier regex so that it is shared across all parsers and grammars. Thanks to @xw-mk for reporting the issue.
What's Changed
- Bump version to 0.15.0 by @stanislaw in #2551
- feat(traceability_index): allow linking nodes via MID by @stanislaw in #2553
- chore(backend/sdoc_source_code): Function class: require explicit arguments for better readability by @stanislaw in #2556
- chore(backend/sdoc_source_code): MarkerParser class: require explicit arguments for better readability by @stanislaw in #2557
- feat(backend/sdoc_source_code): MarkerParser: preserve spaces when preprocessing code comments by @stanislaw in #2558
- refactor(backend/sdoc_source_code): add test helpers for marker_lexer tests, add a MarkerParser-level Linux/SPDX test by @stanislaw in #2559
- feat(cli/main): enable printing of total execution time in production builds by @stanislaw in #2560
- feat(backend/sdoc_source_code): Linux Kernel Template proposal: auto-generate SPDX-Req-ID and SPDX-Req-HKey by @stanislaw in #2555
- feat(backend/sdoc_source_code): Support merge by MID by @haxtibal in #2549
- code-climate(tests/unit): test_marker_lexer.py: add mypy linting by @stanislaw in #2562
- chore(.github): switch the macOS tests to macos-latest by @stanislaw in #2563
- tests(source_code_traceability): test merging sidecar and source nodes by MID without requiring UID to be present by @stanislaw in #2561
- chore(.gitattributes): normalize endings to LF by @stanislaw in #2565
- feat(backend/sdoc_source_code): Allow empty lines in source node fields by @haxtibal in #2554
- chore: bump actions/checkout from 5 to 6 in the github-actions group by @dependabot[bot] in #2567
- chore(pyinstaller): fix regression by installing jaraco.text manually for now by @stanislaw in #2571
- feat(source_code_traceability): Structured Text (PLC) text format: add itest and set a default Pygments lexer by @stanislaw in #2570
- feat(backend/sdoc): writer: implement writing FUNCTION back to SDoc by @stanislaw in #2573
- fix(backend/sdoc_source_code): enable support for requirement identifiers with underscores by @stanislaw in #2574
- fix(backend/sdoc_source_code): let lark scan CR to NEWLINE, not to NODE_STRING_VALUE by @haxtibal in #2575
- chore(.gitattributes): remove the LF normalization for test files by @stanislaw in #2572
- feat(backend/sdoc): writer: implement writing File relation's ROLE back to SDoc by @stanislaw in #2577
- feat(commands/manage_autouid): rework the generation of MID/HASH by @stanislaw in #2566
- feat(commands/manage_autouid_command): update relations to point to new auto-generated MID by @stanislaw in #2579
Full Changelog: 0.15.0...0.15.1
Several enhancements in Diff/Changelog and source node parsing, legacy @sdoc markers removed, several bug fixes, and improvements for edge cases
This release includes several enhancements, the removal of legacy @sdoc markers, several bug fixes, and improvements for edge cases.
The Diff/Changelog feature has been extended to support the new --generate-diff-git option which allows generating the Diff/Changelog screens for a given pair of Git revisions.
The legacy @sdoc marker has been removed from the codebase. From now on, only the @relation markers are recognized when linking requirements with source code files.
An edge case has been fixed where StrictDoc's FileFinder was detecting Linux pipe files that could not be processed meaningfully by StrictDoc’s source file generator. With this release, such files are now ignored.
The Diff/Changelog feature has been extended to better support change tracking of included documents. Previously, only the contents of included documents were visualized, but not the root nodes of the documents themselves. Now, changes to included documents, such as their UID or TITLE, are displayed correctly.
The ReqIF-to-SDoc converter has been improved to handle integer fields by treating them as string grammar fields. Since StrictDoc does not yet support INTEGER fields, they are converted to STRING fields during import. This workaround was sufficient to support the user’s use case. Thanks to @kerfallaCisse for reporting this issue.
The HTML2PDF generator has been fixed to correctly resolve document paths when printing a bundle document that includes other documents. This edge case involved a combination of three features — HTML2PDF, bundle documents, and composable documents — that had not previously been tested to work together. Thanks to @CMon for reporting this issue.
The source code node parser has been updated to recognize only those field names defined in the corresponding document grammar. This change prevents the parser from mistakenly interpreting unrelated FIELD: VALUE strings found in source code. In addition, several improvements have been made to the functionality that extracts SDoc nodes from source code comments, inspired by our proof-of-concept work on modeling Linux kernel requirements directly within the Linux source code. Some aspects of this work are not yet documented but will be once the overall concept becomes more mature. Many thanks to @haxtibal for contributing these improvements.
What's Changed
- Bump version to 0.14.0 by @stanislaw in #2501
- fix(FileFinder): ignore Linux pipe files by @stanislaw in #2502
- docs: clarify that single-line fields are not rendered by RST/LINK parser by @stanislaw in #2505
- fix(backend/reqif): improve handling of documents with no relations and treat integer fields as string grammar fields by @stanislaw in #2506
- fix(html2pdf_generator): resolve the document output path correctly by @stanislaw in #2508
- docs: update release notes, slide deck, roadmap and backlog by @stanislaw in #2509
- feat(html2pdf): enable correct resolution of LINKs when included document is printed to bundle document by @stanislaw in #2510
- trace: add missing traces between L2, source code and tests by @stanislaw in #2511
- trace: add missing traces between L2, source code and tests (focus on tests) by @stanislaw in #2512
- trace: add missing traces between L2, source code and tests (focus on tests - part 2) by @stanislaw in #2513
- trace: add traces for Create/Update node relation by @stanislaw in #2514
- trace: add itest traces to L2 ReqIF by @stanislaw in #2516
- chore(tests/end2end): remove all init.py files by @stanislaw in #2515
- trace: more traces to L2: ReqIF, clone node, delete node, tool identification by @stanislaw in #2517
- fix(backend/sdoc_source_code): general reader: always set function marker to entire file by @stanislaw in #2518
- feat(export/html): remove legacy --filter-sections, rename: --filter-requirements -> --filter-nodes by @stanislaw in #2519
- chore(export/html): drop the legacy 'passthrough' command, migrate itests to export --formats=sdoc by @stanislaw in #2520
- feat(server): generate only a source single file when requested, not all source files by @stanislaw in #2521
- chore(backend/sdoc_source_code): remove legacy @sdoc/nosdoc by @stanislaw in #2522
- feat(diff/changelog): support basic change tracking for included documents by @stanislaw in #2523
- feat(backend/sdoc_source_code): add support for multiline scope=line markers in Python code by @stanislaw in #2524
- feat(diff/changelog): cli: add generation of diff/changelog from a pair of Git revisions by @stanislaw in #2525
- feat(diff/changelog): add a quick shortcut to viewing HEAD^ vs HEAD and origin/main vs HEAD by @stanislaw in #2526
- Add sanity checks for source_nodes configuration by @haxtibal in #2527
- docs: update roadmap and workspace by @stanislaw in #2528
- fix(export/html2pdf): implement a proper handling of LINKs to documents in bundle and non-bundle documents by @stanislaw in #2533
- feat(backend/sdoc_source_code): tighten lark grammar for custom source nodes by @haxtibal in #2532
- docs: update release notes by @stanislaw in #2534
- chore: configure Dependabot for GitHub Actions and Python by @stanislaw in #2535
- chore: bump the github-actions group with 3 updates by @dependabot[bot] in #2536
- feat(core): introduce framework for user-defined plugins by @stanislaw in #2537
- chore: rename: DocumentCachingIterator -> SDocDocumentIterator by @stanislaw in #2538
- feat(backend/sdoc_source_code): Support merging sdoc nodes with soure nodes by @haxtibal in #2539
- feat: display node validations on the HTML screens by @stanislaw in #2541
- fix(export/html): Consider MARKUP = Text option in source file view by @haxtibal in #2545
- feat(backend/sdoc_source_code): Support remapping custom tags to sdoc fields by @haxtibal in #2543
- fix(backend/sdoc_source_code): Don't auto-generate sdoc nodes for function comments without fields by @haxtibal in #2547
- fix(backend/sdoc_source_code): Don't auto-generate sections for merged source nodes by @haxtibal in #2548
- docs: update release notes and roadmap by @stanislaw in #2550
New Contributors
- @dependabot[bot] made their first contribution in #2536
Full Changelog: 0.14.0...0.15.0
Python config file, improvements to parsing SDoc nodes from source files, removal of legacy Section/[SECTION], dropped Python 3.8 support.
This release introduces a new feature: configuring StrictDoc using a Python file instead of a TOML file, improvements to parsing SDoc nodes from source files, the removal of the legacy Section/[SECTION] element, dropped Python 3.8 support.
1) Parsing StrictDoc configuration from a Python file: StrictDoc can now be configured using a Python file rather than a TOML file. This new method (strictdoc_config.py) is intended to replace strictdoc.toml in the long term.
The rationale for this change is that configuring StrictDoc with a Python file provides more flexibility for users who need to:
- Create custom generators
- Remove existing generators
- Customize requirement and document tree validations
- Customize project statistics.
See 🔗 20.3. Migrating StrictDoc Configuration: Python Replaces TOML (2025 Q4) for migration instructions.
2) Parsing SDoc nodes from source files: The feature for parsing SDoc files from source code has been extended to support the SPDX-* syntax. This means that SDoc nodes can now be parsed not only from test files but also from source files.
3) Removal of legacy Section/[SECTION]: The legacy Section/[SECTION] element has been fully removed from the codebase, completing the migration to composite [[SECTION]] nodes. From now on, all projects using the old [SECTION] syntax will generate an error and receive a suggestion to migrate to the new syntax.
4) Dropped Python 3.8 support: We could stay with Python 3.8 a little longer, but several important pip packages that StrictDoc depends on have already dropped support for it, most notably tree-sitter and docutils.
What's Changed
- feat(tools): add a basic html2pdf4doc fuzzer for StrictDoc documents by @stanislaw in #2486
- chore(tests/end2end): migrate several tests from [SECTION] to [[SECTION]] by @stanislaw in #2487
- chore(tests/end2end): migrate several tests from [SECTION] to [[SECTION]] by @stanislaw in #2488
- chore(tests/end2end): migrate remaining tests from [SECTION] to [[SECTION]] by @stanislaw in #2489
- chore(tests/integration): migrate several itests from [SECTION] to [[SECTION]] by @stanislaw in #2490
- chore(tests/integration): migrate several itests from [SECTION] to [[SECTION]] by @stanislaw in #2491
- chore(tests/integration): migrate remaining itests from [SECTION] to [[SECTION]] by @stanislaw in #2492
- chore(export/html): remove unused is_section() from several templates by @stanislaw in #2493
- chore(export/html): remove unused is_section() from several templates by @stanislaw in #2494
- feat(backend/sdoc_source_code): parse SDoc nodes from source code with more flexible syntax by @stanislaw in #2495
- Code climate: remove unused code by @stanislaw in #2496
- chore: remove unused code, add missing coverage by @stanislaw in #2497
- feat(project_config): add a new option for reading configuration from a Python file instead of TOML by @stanislaw in #2498
- chore(pyproject.toml): drop Python 3.8 by @stanislaw in #2499
- feat(docs): store draw.io diagrams in Git, update release notes and dev plan by @stanislaw in #2500
Full Changelog: 0.13.0...0.14.0
New Tree Map visualization, handling of Unicode BOM markers
This release contains a new feature and several bug fixes.
A new experimental screen, Tree Map, provides visualizations of the overall document tree as well as requirements coverage by source files and tests. The visualization is based on a tree map graph generated using Plotly.js.
StrictDoc now correctly handles Unicode BOM (byte order mark) based on a user report. Previously, SDoc files with a BOM caused parsing errors because the parser did not recognize the marker. Although UTF-8 files normally do not contain BOMs, some tools (likely on Windows) may add them. StrictDoc now strips BOM markers from all input files before parsing, preventing errors if BOMs are present. Thanks to @ichsteffen for reporting this.
In the background, we have started removing the legacy Section/[SECTION] code. The core still supports the old [SECTION] syntax, but we are incrementally migrating all unit, integration, and end-to-end tests to the new [[SECTION]] syntax.
What's Changed
- chore(tools): import ECSS script: add basic usage instructions by @stanislaw in #2469
- fix(backend/sdoc/reader): recognize the UTF8 BOM marker and ignore it by @stanislaw in #2471
- Fix autogen image scaling by @mettta in #2473
- feat(export/html): add new screen with tree map-based visualizations by @stanislaw in #2474
- trace(features/tree_map): L2 requirement and traces by @stanislaw in #2475
- feat(features/tree_map): color code parents to green only if children trace to source files by @stanislaw in #2476
- Bump version to 0.13.0a1 by @stanislaw in #2477
- chore: remove legacy Section-related code from several components by @stanislaw in #2472
- fix(coverage_reports/gcov): update to new gcovr syntax by @stanislaw in #2479
- chore(test_reports/junit_xml_reader): remove dependency on legacy Section by @stanislaw in #2481
- docs: add 2025 ESA SW PAW presentation by @stanislaw in #2478
- chore(rst_to_html_fragment_writer): fix a deprecation warning by updating to new API by @stanislaw in #2482
- chore(all readers): switch to utf-8-sig to ignore BOM coming from some Windows tools by @stanislaw in #2480
- chore: remove dependency on legacy Section in multiple components by @stanislaw in #2483
- chore(tests/end2end): remove legacy Section from several tests by @stanislaw in #2484
- Bump version to 0.13.0 by @stanislaw in #2485
Full Changelog: 0.12.1...0.13.0
Minor HTML2PDF layout fixes
This bugfix release contains several HTML2PDF layout fixes.
What's Changed
- fix(html2pdf): Update narrative rules by @mettta in #2466
- fix(strictdoc.toml): enable html2pdf_strict mode by @stanislaw in #2467
- Bump version to 0.12.1 by @stanislaw in #2468
Full Changelog: 0.12.0...0.12.1
Improvement of source code line markers and HTML2PDF layout fixes
This release contains a change in how the source code line markers work, as well as several small HTML2PDF layout fixes.
The source code line markers were changed to include the next source line that follows immediately after the marker. As discussed with a user in #2434, this behavior of line markers makes more sense compared to the previous approach, which assumed that the source line had to be followed by a line marker, forcing both the source line and the marker to be on the same line. Thanks to @Mooan for initiating this discussion and contributing a pull request.
The HTML2PDF fixes include an important correction for an issue where running titles were not displayed on some pages in certain cases. For now, we have implemented a workaround, and the complete fix is being tracked in the upstream html2pdf4doc repository.
What's Changed
- Bump version to 0.11.2 by @stanislaw in #2452
- fix(backend/sdoc): do not generate auto-generated content with auto-uid and export/sdoc commands by @stanislaw in #2453
- fix(RST): do not exit(1) but raise RuntimeError by @stanislaw in #2454
- fix(html2pdf_generator): support printing RST as well as other markups by @stanislaw in #2455
- feat(HTML2PDF): integrate --strict mode, split normal tests and HTML2PDF tests by @stanislaw in #2456
- fix(sdoc_source_code): correct LineMarker range and add validations by @Mooan in #2458
- refactor(backend/sdoc_source_code): de-duplicate line_marker_processor by @stanislaw in #2460
- Disable backgrounds of problematic split sections (workaround for html2pdf4doc bug) by @mettta in #2462
- Preserve meta in narrative nodes and prevent split admonition. by @mettta in #2463
- fix(source_file_view_object.py): fix SourceMarkerTuple is_range_marker decision by @stanislaw in #2464
New Contributors
Full Changelog: 0.11.2...0.12.0