Skip to content

Commit 7f37253

Browse files
authored
Fix release workflow and update contrib docs (#43)
* Fix release workflow and update contrib docs
1 parent 198c675 commit 7f37253

File tree

7 files changed

+77
-101
lines changed

7 files changed

+77
-101
lines changed

.github/workflows/publish-py.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
- name: Install dependencies
2323
run: |
2424
pip3 --quiet install --upgrade hatch uv twine
25-
pip install -r requirements/build-pkg.txt
2625
- name: Build Package
2726
run: |
2827
hatch build --clean

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ Using the following categories, list your changes in this order:
9898
- Rename `configure` to `create_router`.
9999
- Rename from `idom-router` to `reactpy-router`.
100100

101-
[Unreleased]: https://github.com/reactive-python/reactpy-router/compare/1.0.0...HEAD
101+
[Unreleased]: https://github.com/reactive-python/reactpy-router/compare/1.0.1...HEAD
102+
[1.0.1]: https://github.com/reactive-python/reactpy-router/compare/1.0.0...1.0.1
102103
[1.0.0]: https://github.com/reactive-python/reactpy-router/compare/0.1.1...1.0.0
103104
[0.1.1]: https://github.com/reactive-python/reactpy-router/compare/0.1.0...0.1.1
104105
[0.1.0]: https://github.com/reactive-python/reactpy-router/compare/0.0.1...0.1.0

docs/mkdocs.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ nav:
1414
- Types: reference/types.md
1515
- About:
1616
- Changelog: about/changelog.md
17-
- Contributor Guide:
18-
- Code: about/code.md
19-
- Docs: about/docs.md
17+
- Contributor Guide: about/contributing.md
2018
- Community:
2119
- GitHub Discussions: https://github.com/reactive-python/reactpy-router/discussions
2220
- Discord: https://discord.gg/uNb5P4hA9X

docs/src/about/code.md

-51
This file was deleted.

docs/src/about/contributing.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
## Creating a development environment
2+
3+
If you plan to make code changes to this repository, you will need to install the following dependencies first:
4+
5+
- [Git](https://git-scm.com/downloads)
6+
- [Python 3.9+](https://www.python.org/downloads/)
7+
- [Hatch](https://hatch.pypa.io/latest/)
8+
9+
Once you finish installing these dependencies, you can clone this repository:
10+
11+
```shell
12+
git clone https://github.com/reactive-python/reactpy-router.git
13+
cd reactpy-router
14+
```
15+
16+
## Executing test environment commands
17+
18+
By utilizing `hatch`, the following commands are available to manage the development environment.
19+
20+
### Tests
21+
22+
| Command | Description |
23+
| --- | --- |
24+
| `hatch test` | Run Python tests using the current environment's Python version |
25+
| `hatch test --all` | Run tests using all compatible Python versions |
26+
| `hatch test --python 3.9` | Run tests using a specific Python version |
27+
| `hatch test -k test_navigate_with_link` | Run only a specific test |
28+
29+
??? question "What other arguments are available to me?"
30+
31+
The `hatch test` command is a wrapper for `pytest`. Hatch "intercepts" a handful of arguments, which can be previewed by typing `hatch test --help`.
32+
33+
Any additional arguments in the `test` command are directly passed on to pytest. See the [pytest documentation](https://docs.pytest.org/en/stable/reference/reference.html#command-line-flags) for what additional arguments are available.
34+
35+
### Linting and Formatting
36+
37+
| Command | Description |
38+
| --- | --- |
39+
| `hatch fmt` | Run all linters and formatters |
40+
| `hatch fmt --check` | Run all linters and formatters, but do not save fixes to the disk |
41+
| `hatch fmt --linter` | Run only linters |
42+
| `hatch fmt --formatter` | Run only formatters |
43+
44+
??? tip "Configure your IDE for linting"
45+
46+
This repository uses `hatch fmt` for linting and formatting, which is a [modestly customized](https://hatch.pypa.io/latest/config/internal/static-analysis/#default-settings) version of [`ruff`](https://github.com/astral-sh/ruff).
47+
48+
You can install `ruff` as a plugin to your preferred code editor to create a similar environment.
49+
50+
### Documentation
51+
52+
| Command | Description |
53+
| --- | --- |
54+
| `hatch run docs:serve` | Start the [`mkdocs`](https://www.mkdocs.org/) server to view documentation locally |
55+
| `hatch run docs:build` | Build the documentation |
56+
| `hatch run docs:linkcheck` | Check for broken links in the documentation |
57+
58+
### Environment Management
59+
60+
| Command | Description |
61+
| --- | --- |
62+
| `hatch build --clean` | Build the package from source |
63+
| `hatch env prune` | Delete all virtual environments created by `hatch` |
64+
| `hatch python install 3.12` | Install a specific Python version to your system |
65+
66+
??? tip "Check out Hatch for all available commands!"
67+
68+
This documentation only covers commonly used commands.
69+
70+
You can type `hatch --help` to see all available commands.

docs/src/about/docs.md

-45
This file was deleted.

docs/src/dictionary.txt

+4
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ misconfigurations
3838
backhaul
3939
sublicense
4040
contravariant
41+
formatters
42+
linters
43+
linting
44+
pytest

0 commit comments

Comments
 (0)