Skip to content

Commit 1f49419

Browse files
committed
docs: update README (Developer workflow)
1 parent fd4c80c commit 1f49419

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ This repository focuses strictly on the Python-side automation layer; the render
3030
```
3131
or simply run `invoke bootstrap` to initialize submodules and dev dependencies.
3232

33+
### Developer workflow
34+
35+
1. (Optional) Create and activate a virtual environment (`python -m venv .venv && source .venv/bin/activate`) and install the package in editable mode (`pip install -e .`).
36+
2. Run `invoke bootstrap` (or `pip install -r requirements.development.txt` + `git submodule update --init --recursive`) to pull JS submodules and dev tools.
37+
3. Whenever the JS submodule changes, update it (`git submodule update --remote --merge`) and run `invoke build` to refresh `html2pdf4doc.min.js`.
38+
4. Use `invoke lint`, `invoke test`, and `invoke test_fuzz` to validate changes. Finish with `invoke package`/`invoke release` if you need to build or publish artifacts.
39+
3340
## Usage
3441

3542
- Print a single HTML file to PDF with strict validation:
@@ -77,7 +84,7 @@ This repository focuses strictly on the Python-side automation layer; the render
7784
## Development Tasks
7885

7986
- `invoke bootstrap`: initialize git submodules and install development dependencies.
80-
- `invoke build`: rebuild the JS core (`submodules/html2pdf`) and copy the minified bundle into `html2pdf4doc/html2pdf4doc_js/`.
87+
- `invoke build`: rebuild the JS core (`submodules/html2pdf`) and copy the minified bundle into `html2pdf4doc/html2pdf4doc_js/`. Whenever the JS submodule changes, pull it (e.g., `git submodule update --remote --merge` or `cd submodules/html2pdf && git pull`), run this task, and only then rerun tests/release steps so the Python CLI packages the refreshed `html2pdf4doc.min.js`.
8188
- `invoke lint`: run formatting (`ruff format`), lint (`ruff check`), and type checks (`mypy`) across the Python sources.
8289
- `invoke test` / `invoke test_integration`: execute the integration suite via `lit`.
8390
- `invoke test_fuzz [--long]`: run the HTML fuzzing harness for 20 (or 200) iterations.

0 commit comments

Comments
 (0)