@@ -39,6 +39,32 @@ If your changes cause the snapshot tests to fail:
39
39
1 . Verify that the changes you have caused are expected - don't just blindly update the snapshots, they're there for a reason.
40
40
2 . Run ` poetry run pytest --snapshot-update ` to update the snapshots.
41
41
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
+
42
68
## Publishing
43
69
44
70
1 . ` pre-commit run --all-files ` - run linters
@@ -47,11 +73,14 @@ If your changes cause the snapshot tests to fail:
47
73
4 . Update CHANGELOG headings (add a new heading beneath the "Unreleased" heading)
48
74
5 . ` poetry lock --no-update ` - Lock python packages
49
75
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
55
84
56
85
## Common tasks
57
86
0 commit comments