Thank you for considering to help this project.
We welcome all support, whether on bug reports, code, design, reviews, tests, documentation, and more.
With Python 3.8+, Node 20, and Poetry 1.8.3 installed, run:
git clone [email protected]:torchbox/tbxforms.git
cd tbxforms/
poetry install
pre-commit install
npm install
This project uses pytest 7.0.x and tox for backend testing.
Generally you should use tox
, though for quick testing during development you may want to just run pytest
for ease.
poetry run pytest
will run tests in whatever Python/package versions you have activated/installed.
poetry run tox
will run tests against our supported package matrix.
If your changes cause the snapshot tests to fail:
- Verify that the changes you have caused are expected - don't just blindly update the snapshots, they're there for a reason.
- Run
poetry run pytest --snapshot-update
to update the snapshots.
pre-commit run --all-files
- run linterspoetry run tox
- run backend tests against our supported package matrix.- Bump project version in pyproject.toml and package.json
- Update CHANGELOG headings (add a new heading beneath the "Unreleased" heading)
poetry lock --no-update
- Lock python packagesnpm i --package-lock-only
- Lock javascript packagesnpm run build
- build NPM packagepoetry build
- build python packagenpm publish
- publish package to npmjs.compoetry publish
- publish package to pypi.org- Create a release with relevant changelog entries and upgrade considerations
Everything within the /static/sass/govuk/
directory is mostly unmodified,
except that:
- all instances of "govuk-" have been replaced with "tbxforms-"
- unused .scss files and all other file types (.js, .md, .njk) have been deleted
- imports to unused .scss files have been commented-out (not removed, to make tracing changes easier)
- added
calc()
to equations to avoid Dart Sass 2.0.0 deprecation warning
There's also some overrides in /static/sass/govuk-overrides/
to be aware of.
This list also acts as a checklist for updating govuk-frontend in the future.