Whitelist some common attributes/elements that should be localized.
This was done by making the whitelist a list of xpaths.
Co-authored-by: Darragh Elliott <me@delliott.net>
Reviewed-on: #5500
Co-authored-by: delliott <delliott@fsfe.org>
Co-committed-by: delliott <delliott@fsfe.org>
Don't include ended activities in the internal forms
Reviewed-on: #5454
Co-authored-by: Tobias Diekershoff <tobiasd@fsfe.org>
Co-committed-by: Tobias Diekershoff <tobiasd@fsfe.org>
- enable pyright strict mode
- fix the issues raised
This should make the build process cleaner and more resilient.
It should make it much easier to catch design flaws.
Co-authored-by: Darragh Elliott <me@delliott.net>
Reviewed-on: #5451
Reviewed-by: tobiasd <tobiasd@fsfe.org>
Co-authored-by: delliott <delliott@fsfe.org>
Co-committed-by: delliott <delliott@fsfe.org>
Currently implements both a format hook to remove white-space paragraphs, and a check to make their existence a critical failure.
In the end may implement only one or none of these, subject to major design changes.
Solves #5409
Co-authored-by: Darragh Elliott <me@delliott.net>
Reviewed-on: #5431
Co-authored-by: delliott <delliott@fsfe.org>
Co-committed-by: delliott <delliott@fsfe.org>
I do not expect the flag to be used much, but it enforces better code design, and prevents implicitly relying on cwd.
Just a general code style improvement really.
Co-authored-by: Darragh Elliott <me@delliott.net>
Co-authored-by: tobiasd <tobiasd@fsfe.org>
Reviewed-on: #5334
Co-authored-by: delliott <delliott@fsfe.org>
Co-committed-by: delliott <delliott@fsfe.org>
- add pytest
- add tests for all exposed lib functions
- Add a whole bunch more ruff checks and apply them
Benchmarking:
Before:
```
❯ hyperfine --runs 3 "uv run build --full"
Benchmark 1: uv run build --full
Time (mean ± σ): 287.463 s ± 15.161 s [User: 1573.732 s, System: 72.548 s]
Range (min … max): 272.953 s … 303.201 s 3 runs
```
After
```
❯ hyperfine --runs 3 "uv run build --full"
Benchmark 1: uv run build --full
Time (mean ± σ): 280.184 s ± 9.605 s [User: 1557.788 s, System: 72.693 s]
Range (min … max): 269.878 s … 288.886 s 3 runs
```
So we gain a few seconds, but that is all.
The main benefit is that we have better testing and more linting.
Co-authored-by: Darragh Elliott <me@delliott.net>
Reviewed-on: #5268
update docs
update nix-shell to auto install
rework custom pre-commit hooks to integrate better
add dockerfile for lefthook and integrate into drone
add some more hooks for formatting and linting some files
Co-authored-by: Darragh Elliott <me@delliott.net>
Reviewed-on: #5248
Co-authored-by: delliott <delliott@fsfe.org>
Co-committed-by: delliott <delliott@fsfe.org>