Skip to content

New Configuration screen and bugfixes

Latest

Choose a tag to compare

@stanislaw stanislaw released this 26 Nov 16:52
· 130 commits to main since this release
76f9de1

This release contains the following enhancements:

1) Fixed: several HTML2PDF exports that start at the same time with an empty
ChromeDriver cache now succeed. Before, one export could overwrite the
ChromeDriver while another export was running it, and the export failed with
"Text file busy" on Linux. StrictDoc now uses html2pdf4doc 0.0.36, which
caches the downloaded ChromeDriver atomically.

2) Fixed: the HTML export now copies an asset file again if the file in the
output folder has a different size than the source file. Before, StrictDoc
compared only the modification times. As a result, StrictDoc kept an outdated
file in the output folder if the source file was not newer, for example after
an interrupted export.

3) StrictDoc starts faster. StrictDoc now imports the Python packages of an
export format, a project feature, or a command only on first use. For example,
an HTML export no longer loads the packages of the Excel, SPDX, ReqIF, and
HTML2PDF formats. The commands other than server no longer load the web
server packages. On a project with one document, an HTML export takes about
half as long as before.

4) A small project exports faster. StrictDoc now reads and exports fewer than
five documents in its own process. Before, StrictDoc started a worker process
for each CPU core, even for a single document. The start of these worker
processes took longer than the parallel export saved.

5) StrictDoc finds documents and source files faster in a large project
folder. If all paths in include_doc_paths or include_source_paths
start with /, StrictDoc no longer searches the folders outside these paths,
for example build/, .venv/, or node_modules/. In a development
checkout of StrictDoc with build output, the search for source files now checks
about 7,500 files instead of more than 200,000. StrictDoc finds the same files
as before.

6) The server command starts faster. The server now imports the packages
for ReqIF, HTML2PDF, and the Markdown writer only when a user first imports or
exports ReqIF, exports a PDF, or saves a Markdown document. Before, the server
imported these packages at startup, which took about a fifth of its startup
time.

7) StrictDoc now uses html2pdf4doc 0.1.0, which contains the html2pdf4doc JS
release 0.4.0. The HTML2PDF export gets the following fixes:

  • No empty pages when several page break rules match one element, when the
    content starts with a zero-height element, or when a hidden element follows
    a page break.
  • A table row taller than a page no longer hangs the export.
  • A table footer appears once, in the last part of the table.
  • Images at the start of a page no longer overflow the page.
  • Before the page layout, html2pdf4doc waits up to 2 seconds for images and
    other resources to load.

Some documents can get different page breaks and a different page count.

8) StrictDoc has a new read-only Project configuration page. The left
navigation links to the page in the server and in the static HTML export. The
page shows the settings of the project configuration, for example the
configuration file, the output folder, and the active project features.

The input paths and the included and excluded document and source file paths
move from the project index page to the Project configuration page. The page
lists the paths that StrictDoc excludes because of .gitignore separately
from the configured excluded paths. The page hides the absolute prefix of each
path. A click on "…" shows the full path.

9) Fixed: the web server serves only files inside its HTML output folder.
Before, a URL with .. or with an absolute path returned any file that the
server process could read. The server now returns 404 for such a URL.

10) Fixed: a grammar element tag can now start with DOCUMENT, GRAMMAR,
or SECTION, for example DOCUMENTATION or SECTIONAL. Before,
StrictDoc failed to parse a document with such a tag. The whole tags
DOCUMENT, GRAMMAR, SECTION, and DOCUMENT_FROM_FILE stay
reserved.

11) Fixed: StrictDoc expands ALL_FEATURES to all project features if
create_config() assigns config.project_features after it creates the
ProjectConfig object. Before, StrictDoc expanded ALL_FEATURES only if
create_config() passed project_features to the ProjectConfig
constructor.


What's Changed

  • test(end2end): run the end2end tests on 4 pytest-xdist workers by @stanislaw in #3363
  • fix(grammar): reject reserved keywords only as whole node tags by @Eliot5566 in #3364
  • test(html2pdf): run the HTML2PDF integration tests in parallel with one ChromeDriver by @stanislaw in #3365
  • perf(export/html): render the copy "done" icon only on click by @awschult002 in #3277
  • fix(server): do not serve files outside the HTML output folder by @mettta in #3367
  • fix(nav): mark the current screen's nav link with aria-current by @mettta in #3369
  • fix(tests/end2end): center the witness in the chunk-load recording task by @mettta in #3371
  • fix(helpers/file_system): sync_dir: copy a file if its size differs by @stanislaw in #3372
  • fix(core/project_config): expand ALL_FEATURES when project_features is reassigned after construction by @mettta in #3373
  • feat(export/html): Cancel before Submit in modal forms, bordered keyboard key labels by @mettta in #3374
  • feat(project-configuration): add read-only Project configuration page by @mettta in #3370
  • perf(formats, features, commands): import optional packages on first use by @stanislaw in #3375
  • perf(helpers/parallelizer): run fewer than 5 tasks in the calling process by @stanislaw in #3376
  • chore(.github): test Linux only on Python 3.10 and macOS only on 3.14 by @stanislaw in #3377
  • perf(tests/end2end): stop the server log thread without waiting by @stanislaw in #3378
  • perf(file_system): skip folders that no include path can reach by @stanislaw in #3379
  • chore(.github): remove the push trigger for the master branch by @stanislaw in #3380
  • perf(server): import ReqIF, HTML2PDF, and Markdown writer packages on use by @stanislaw in #3381
  • chore(deps): bump html2pdf4doc from 0.0.36 to 0.1.0 by @stanislaw in #3385
  • release: bump version to 0.32.2 by @stanislaw in #3386

Full Changelog: 0.32.1...0.32.2