diff --git a/.github/workflows/publish-py.yaml b/.github/workflows/publish-py.yaml index 430a3f0..d69b475 100644 --- a/.github/workflows/publish-py.yaml +++ b/.github/workflows/publish-py.yaml @@ -22,7 +22,6 @@ jobs: - name: Install dependencies run: | pip3 --quiet install --upgrade hatch uv twine - pip install -r requirements/build-pkg.txt - name: Build Package run: | hatch build --clean diff --git a/CHANGELOG.md b/CHANGELOG.md index e0be82e..c0a2658 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -98,7 +98,8 @@ Using the following categories, list your changes in this order: - Rename `configure` to `create_router`. - Rename from `idom-router` to `reactpy-router`. -[Unreleased]: https://github.com/reactive-python/reactpy-router/compare/1.0.0...HEAD +[Unreleased]: https://github.com/reactive-python/reactpy-router/compare/1.0.1...HEAD +[1.0.1]: https://github.com/reactive-python/reactpy-router/compare/1.0.0...1.0.1 [1.0.0]: https://github.com/reactive-python/reactpy-router/compare/0.1.1...1.0.0 [0.1.1]: https://github.com/reactive-python/reactpy-router/compare/0.1.0...0.1.1 [0.1.0]: https://github.com/reactive-python/reactpy-router/compare/0.0.1...0.1.0 diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index ebf8b0e..8f8a1a1 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -14,9 +14,7 @@ nav: - Types: reference/types.md - About: - Changelog: about/changelog.md - - Contributor Guide: - - Code: about/code.md - - Docs: about/docs.md + - Contributor Guide: about/contributing.md - Community: - GitHub Discussions: https://github.com/reactive-python/reactpy-router/discussions - Discord: https://discord.gg/uNb5P4hA9X diff --git a/docs/src/about/code.md b/docs/src/about/code.md deleted file mode 100644 index 0eda9ee..0000000 --- a/docs/src/about/code.md +++ /dev/null @@ -1,51 +0,0 @@ -## Overview - -
- - You will need to set up a Python environment to develop ReactPy-Router. - -
- ---- - -## Creating an environment - -If you plan to make code changes to this repository, you will need to install the following dependencies first: - -- [Python 3.9+](https://www.python.org/downloads/) -- [Git](https://git-scm.com/downloads) - -Once done, you should clone this repository: - -```bash linenums="0" -git clone https://github.com/reactive-python/reactpy-router.git -cd reactpy-router -``` - -Then, by running the command below you can install the dependencies needed to run the ReactPy-Router development environment. - -```bash linenums="0" -pip install -r requirements.txt --upgrade --verbose -``` - -## Running the full test suite - -!!! abstract "Note" - - This repository uses [Nox](https://nox.thea.codes/en/stable/) to run tests. For a full test of available scripts run `nox -l`. - -By running the command below you can run the full test suite: - -```bash linenums="0" -nox -t test -``` - -Or, if you want to run the tests in the background run: - -```bash linenums="0" -nox -t test -- --headless -``` - -## Creating a pull request - -{% include-markdown "../../includes/pr.md" %} diff --git a/docs/src/about/contributing.md b/docs/src/about/contributing.md new file mode 100644 index 0000000..d23b77f --- /dev/null +++ b/docs/src/about/contributing.md @@ -0,0 +1,70 @@ +## Creating a development environment + +If you plan to make code changes to this repository, you will need to install the following dependencies first: + +- [Git](https://git-scm.com/downloads) +- [Python 3.9+](https://www.python.org/downloads/) +- [Hatch](https://hatch.pypa.io/latest/) + +Once you finish installing these dependencies, you can clone this repository: + +```shell +git clone https://github.com/reactive-python/reactpy-router.git +cd reactpy-router +``` + +## Executing test environment commands + +By utilizing `hatch`, the following commands are available to manage the development environment. + +### Tests + +| Command | Description | +| --- | --- | +| `hatch test` | Run Python tests using the current environment's Python version | +| `hatch test --all` | Run tests using all compatible Python versions | +| `hatch test --python 3.9` | Run tests using a specific Python version | +| `hatch test -k test_navigate_with_link` | Run only a specific test | + +??? question "What other arguments are available to me?" + + The `hatch test` command is a wrapper for `pytest`. Hatch "intercepts" a handful of arguments, which can be previewed by typing `hatch test --help`. + + 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. + +### Linting and Formatting + +| Command | Description | +| --- | --- | +| `hatch fmt` | Run all linters and formatters | +| `hatch fmt --check` | Run all linters and formatters, but do not save fixes to the disk | +| `hatch fmt --linter` | Run only linters | +| `hatch fmt --formatter` | Run only formatters | + +??? tip "Configure your IDE for linting" + + 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). + + You can install `ruff` as a plugin to your preferred code editor to create a similar environment. + +### Documentation + +| Command | Description | +| --- | --- | +| `hatch run docs:serve` | Start the [`mkdocs`](https://www.mkdocs.org/) server to view documentation locally | +| `hatch run docs:build` | Build the documentation | +| `hatch run docs:linkcheck` | Check for broken links in the documentation | + +### Environment Management + +| Command | Description | +| --- | --- | +| `hatch build --clean` | Build the package from source | +| `hatch env prune` | Delete all virtual environments created by `hatch` | +| `hatch python install 3.12` | Install a specific Python version to your system | + +??? tip "Check out Hatch for all available commands!" + + This documentation only covers commonly used commands. + + You can type `hatch --help` to see all available commands. diff --git a/docs/src/about/docs.md b/docs/src/about/docs.md deleted file mode 100644 index 4c1f566..0000000 --- a/docs/src/about/docs.md +++ /dev/null @@ -1,45 +0,0 @@ -## Overview - -- -You will need to set up a Python environment to create, test, and preview docs changes. - -
- ---- - -## Modifying Docs - -If you plan to make changes to this documentation, you will need to install the following dependencies first: - -- [Python 3.9+](https://www.python.org/downloads/) -- [Git](https://git-scm.com/downloads) - -Once done, you should clone this repository: - -```bash linenums="0" -git clone https://github.com/reactive-python/reactpy-router.git -cd reactpy-router -``` - -Then, by running the command below you can: - -- Install an editable version of the documentation -- Self-host a test server for the documentation - -```bash linenums="0" -pip install -r requirements.txt --upgrade -``` - -Finally, to verify that everything is working properly, you can manually run the docs preview web server. - -```bash linenums="0" -cd docs -mkdocs serve -``` - -Navigate to [`http://127.0.0.1:8000`](http://127.0.0.1:8000) to view a preview of the documentation. - -## Creating a pull request - -{% include-markdown "../../includes/pr.md" %} diff --git a/docs/src/dictionary.txt b/docs/src/dictionary.txt index 64ed74d..435700c 100644 --- a/docs/src/dictionary.txt +++ b/docs/src/dictionary.txt @@ -38,3 +38,7 @@ misconfigurations backhaul sublicense contravariant +formatters +linters +linting +pytest