You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4e21868
Browse filesBrowse the repository at this point in the historyBrowse files
Move the development dependencies from [tool.pdm.dev-dependencies] to the
standard [dependency-groups] table and lock them with uv (uv.lock). Drop
pdm.lock and the exported package/requirements.*.txt files, which CI and the
release script consumed.
- CI installs with `uv sync --locked` instead of `pip install -r`.
- package/export builds with `uv build` instead of `pdm build`.
- package/roll.sh and roll.ps1 run the export in a throwaway uv environment.
- CONTRIBUTING.md documents the uv workflow.
Activate the virtual environment and run `tox`to verify test cases.
22
+
Run `tox` to verify test cases. (`uv run` uses the project's virtual environment, so you don't need to activate it.)
23
23
24
24
```sh
25
-
# activate virtual environment
26
-
$ . ./.venv/bin/activate # replace `/bin/` with `/Scripts/` if you're on Windows.
27
25
# run tox for linting, type checking, formatting etc.
28
-
$ tox
26
+
$ uv run tox
29
27
```
30
28
29
+
Development dependencies are declared as [dependency groups](https://packaging.python.org/en/latest/specifications/dependency-groups/) in `pyproject.toml` (`testing`, `tooling`, `runner`, `docs-offline`, `docs-online`, `package` and `sast`) and are locked in `uv.lock`. Run `uv lock --upgrade` to update them, and commit `uv.lock`.
30
+
31
31
Create a git branch and make changes to the source code. If needed, test your changes by running `pytest`. Execute `tox` to format, lint and type-check your code before committing. Commit, push and create a pull request. If you're in doubt, feel free to start a discussion [here](https://github.com/python-validators/validators/discussions).
32
32
33
33
## Documentation
@@ -38,9 +38,10 @@ If you're adding/removing a module, you must update the `nav` key in `mkdocs.yml
1. To preview versioned docs, run `mike serve` (`mike` is a dev dependency).
85
+
1. To preview versioned docs, run `uv run mike serve` (`mike` is in the `docs-online`dependency group).
86
86
2. Then (look at <https://nandgator.github.io/pyvalidators/stable/>)
87
87
- to publish stable docs run `mike deploy -p -u VERSION stable` after checking out to a stable tag name like `0.28.3` (note: document `VERSION = 0.29 if tag_name == 0.29.1`).
88
88
- to publish bleeding-edge docs run `mike deploy -p -u dev master` after checking out to the `master` branch.
89
89
3. This will deploy docs to the `gh-pages` branch (see: <https://github.com/python-validators/validators/tree/gh-pages/>)
90
90
91
91
### Packaging and releasing
92
92
93
-
1. Run `./package/roll.sh` (or `./package/roll.ps1`) to generate both `sdist` and `bdist`.
93
+
1. Run `./package/roll.sh` (or `./package/roll.ps1`) to generate the man page and both `sdist` and `bdist` (it needs [uv](https://docs.astral.sh/uv/) and uses the locked `docs-offline` dependencies).
94
94
2. Install [`twine`](https://pypi.org/project/twine) using [`pipx`](https://pipx.pypa.io) to upload package to PyPI.
0 commit comments