Skip to content

Commit 246ea4d

Browse files
committed
v4.2.0
1 parent 7776ce0 commit 246ea4d

File tree

5 files changed

+40
-9
lines changed

5 files changed

+40
-9
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1616

1717
## Unreleased
1818

19+
## [4.2.0](https://github.com/torchbox/tbxforms/releases/tag/v4.2.0)
20+
1921
### Fixed
2022

2123
- Conditional fields not working when applied to field objects (e.g. `Field.text`, `Field.checkoxes`) instead of container objects (e.g. `Div`, `Fieldset`) [#95]

CONTRIBUTING.md

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,32 @@ If your changes cause the snapshot tests to fail:
3939
1. Verify that the changes you have caused are expected - don't just blindly update the snapshots, they're there for a reason.
4040
2. Run `poetry run pytest --snapshot-update` to update the snapshots.
4141

42+
#### Testing `tbxforms` in a real-world project
43+
44+
`tbxforms` can also be published to https://test.pypi.org/project/tbxforms/ to
45+
make it easier to test changes to the package within a real-world project.
46+
47+
##### Publishing to test.pypi
48+
49+
To publish a new version of `tbxforms` to test.pypi:
50+
51+
1. Set an alpha version in `pyproject.toml` (e.g. `version = "4.3.0-alpha.1"`)
52+
2. Run `poetry publish --repository testpypi` to push the new version to test.pypi
53+
54+
##### Installing the alpha/test version
55+
56+
To install the alpha/test version of `tbxforms`, run:
57+
58+
```bash
59+
# Using poetry
60+
poetry add tbxforms --index-url https://test.pypi.org/simple/
61+
62+
# Using pip
63+
pip install --index-url https://test.pypi.org/simple/ --no-deps tbxforms
64+
```
65+
66+
(note, you may need to clear your project's poetry cache if Poetry cannot find the latest version: `poetry cache clear --all .`)
67+
4268
## Publishing
4369

4470
1. `pre-commit run --all-files` - run linters
@@ -47,11 +73,14 @@ If your changes cause the snapshot tests to fail:
4773
4. Update CHANGELOG headings (add a new heading beneath the "Unreleased" heading)
4874
5. `poetry lock --no-update` - Lock python packages
4975
6. `npm i --package-lock-only` - Lock javascript packages
50-
7. `npm run build` - build NPM package
51-
8. `poetry build` - build python package
52-
9. `npm publish` - publish package to npmjs.com
53-
10. `poetry publish` - publish package to pypi.org
54-
11. Create a [release](https://github.com/torchbox/tbxforms/releases) with relevant changelog entries and upgrade considerations
76+
7. Commit changes to `main`
77+
8. Tag release commit (e.g. `v4.2.0`)
78+
9. Push changes and tag to `main`
79+
10. `npm run build` - build NPM package
80+
11. `poetry build` - build python package
81+
12. `npm publish` - publish package to npmjs.com
82+
13. `poetry publish` - publish package to pypi.org
83+
14. Create a [release](https://github.com/torchbox/tbxforms/releases) with relevant changelog entries and upgrade considerations
5584

5685
## Common tasks
5786

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tbxforms",
3-
"version": "4.1.0",
3+
"version": "4.2.0",
44
"main": "./dist/tbxforms.umd.js",
55
"module": "./dist/tbxforms.es.js",
66
"files": [

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "tbxforms"
3-
version = "4.1.0"
3+
version = "4.2.0"
44
description = "A Torchbox-flavoured template pack for django-crispy-forms, adapted from crispy-forms-gds"
55
authors = [
66
"Kyle Bayliss <[email protected]>"

0 commit comments

Comments
 (0)