From e2e32f9b7a7caef412548b55ec2c9ec77067f6a4 Mon Sep 17 00:00:00 2001 From: Maryna Balioura Date: Tue, 18 Nov 2025 20:44:41 +0100 Subject: [PATCH] docs: add README with initial instructions for development --- README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ tasks.py | 2 +- 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e69de29..5ec99b0 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,70 @@ +# html2pdf4doc_python + +html2pdf4doc_python is the Python wrapper/CLI for the HTML2PDF4Doc JavaScript +library that drives Chrome/Chromedriver to render HTML pages into PDFs. + +This repository focuses strictly on the Python-side automation layer. The +rendering logic remains in the JS core. + +## Installation + +1. Install Google Chrome (or Chrome for Testing) on the machine that will run the CLI. + +2. Install the package from PyPI: + +```bash +pip install html2pdf4doc +``` + +Python 3.8+ is required. + +See also: the Ubuntu-based container `Dockerfile` and the GitHub CI files found +in the `.github/workflows` folder. + +## Usage + +TBD + +## Developer guide + +### Getting started + +1\. (Optional) Create and activate a virtual environment + +``` +python -m venv .venv && source .venv/bin/activate +``` + +2\. Install the dependencies + +``` +git clone https://github.com/strictdoc-project/html2pdf4doc_python.git +cd html2pdf4doc_python + +# Bootstrap minimal Python dependencies: Invoke and TOML. +pip install invoke toml + +# Install all Python dependencies and update the submodule with the html2pdf4doc.js. +invoke bootstrap +``` + +3\. The JS library is maintained in a Git submodule `submodules/html2pdf`. + +When the submodule is updated after a release or during the development, rebuild +the JS library, i.e., regenerate the `html2pdf4doc.min.js`: + +``` +invoke build +``` + +4\. To validate changes, use the following commands: + +``` +invoke lint +invoke test # Normal tests. +invoke test-fuzz # More robust testing. +``` + +## License + +The project is distributed under the Apache License 2.0 (see `LICENSE`). diff --git a/tasks.py b/tasks.py index 2393656..f5a33f2 100644 --- a/tasks.py +++ b/tasks.py @@ -207,7 +207,7 @@ def test_fuzz( strict2: bool = False, ): """ - @relation(SDOC-SRS-44, scope=function) + Run fuzz/mutation tests. """ test_reports_dir = "build/test_reports"