diff --git a/.cruft.json b/.cruft.json index d4758c2..c7e0e5e 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/cthoyt/cookiecutter-snekpack", - "commit": "d044b69b3bd403a172ad6a06b3ed5cfc1ba87ad1", + "commit": "d1ff44f979b4529a47b13f8045036dd7c2d74ec6", "checkout": null, "context": { "cookiecutter": { @@ -21,7 +21,7 @@ "__runner_tests": "py", "__gh_slug": "cthoyt/pystow", "_template": "https://github.com/cthoyt/cookiecutter-snekpack", - "_commit": "d044b69b3bd403a172ad6a06b3ed5cfc1ba87ad1" + "_commit": "d1ff44f979b4529a47b13f8045036dd7c2d74ec6" } }, "directory": null diff --git a/README.md b/README.md index 7f66900..e409ec3 100644 --- a/README.md +++ b/README.md @@ -190,18 +190,33 @@ overridden by `PYSTOW_HOME`. ## 🚀 Installation The most recent release can be installed from -[PyPI](https://pypi.org/project/pystow/) with: +[PyPI](https://pypi.org/project/pystow/) with uv: ```console -python3 -m pip install pystow +$ uv pip install pystow ``` -The most recent code and data can be installed directly from GitHub with: +or with pip: ```console -python3 -m pip install git+https://github.com/cthoyt/pystow.git +$ python3 -m pip install pystow ``` +The most recent code and data can be installed directly from GitHub with uv: + +```console +$ uv --preview pip install git+https://github.com/cthoyt/pystow.git +``` + +or with pip + +```console +$ UV_PREVIEW=1 python3 -m pip install git+https://github.com/cthoyt/pystow.git +``` + +Note that this requires setting `UV_PREVIEW` mode enabled until the uv build +backend becomes a stable feature. + ## 👐 Contributing Contributions, whether filing an issue, making a pull request, or forking, are @@ -242,22 +257,24 @@ $ cd pystow $ uv --preview pip install -e . ``` -Alternatively, install using legacy pip with `UV_PREVIEW` mode enabled until the -uv build backend becomes a stable feature: +Alternatively, install using pip: ```console $ UV_PREVIEW=1 python3 -m pip install -e . ``` +Note that this requires setting `UV_PREVIEW` mode enabled until the uv build +backend becomes a stable feature. + ### Updating Package Boilerplate This project uses `cruft` to keep boilerplate (i.e., configuration, contribution guidelines, documentation configuration) up-to-date with the upstream -cookiecutter package. Update with the following: +cookiecutter package. Install cruft with either `uv tool install cruft` or +`python3 -m pip install cruft` then run: ```console -python3 -m pip install cruft -cruft update +$ cruft update ``` More info on Cruft's update command is available @@ -266,11 +283,11 @@ More info on Cruft's update command is available ### 🥼 Testing After cloning the repository and installing `tox` with -`python3 -m pip install tox tox-uv`, the unit tests in the `tests/` folder can -be run reproducibly with: +`uv tool install tox --with tox-uv` or `python3 -m pip install tox tox-uv`, the +unit tests in the `tests/` folder can be run reproducibly with: ```console -tox -e py +$ tox -e py ``` Additionally, these tests are automatically re-run with each commit in a @@ -281,10 +298,10 @@ Additionally, these tests are automatically re-run with each commit in a The documentation can be built locally using the following: ```console -git clone git+https://github.com/cthoyt/pystow.git -cd pystow -tox -e docs -open docs/build/html/index.html +$ git clone git+https://github.com/cthoyt/pystow.git +$ cd pystow +$ tox -e docs +$ open docs/build/html/index.html ``` The documentation automatically installs the package as well as the `docs` extra @@ -364,10 +381,11 @@ Note that this deprecates previous workflows using `.pypirc`. #### Uploading to PyPI After installing the package in development mode and installing `tox` with -`python3 -m pip install tox tox-uv`, run the following from the console: +`uv tool install tox --with tox-uv` or `python3 -m pip install tox tox-uv`, run +the following from the console: ```console -tox -e finish +$ tox -e finish ``` This script does the following: diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 9492b7e..52275c9 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -1,28 +1,52 @@ Installation ============ The most recent release can be installed from -`PyPI `_ with: +`PyPI `_ with uv: .. code-block:: shell - python3 -m pip install pystow + uv pip install pystow -The most recent code and data can be installed directly from GitHub with: +or pip: .. code-block:: shell - python3 -m pip install git+https://github.com/cthoyt/pystow.git + python3 -m pip install pystow + +Installing from git +------------------- +The most recent code and data can be installed directly from GitHub with uv: + +.. code-block:: console + + $ uv --preview pip install git+https://github.com/cthoyt/pystow.git + +or pip: + +.. code-block:: console + + $ UV_PREVIEW=1 python3 -m pip install git+https://github.com/cthoyt/pystow.git -To install in development mode, use the following: +.. note:: + + The ``UV_PREVIEW`` environment variable is required to be + set until the uv build backend becomes a stable feature. + +Installing for development +-------------------------- +To install in development mode with uv, use the following .. code-block:: shell git clone git+https://github.com/cthoyt/pystow.git cd pystow - UV_PREVIEW=1 python3 -m pip install -e . + uv --preview pip install -e . + +or with pip: -Note that the ``UV_PREVIEW`` environment variable is required to be -set until the uv build backend becomes a stable feature. +.. code-block:: shell + + UV_PREVIEW=1 python3 -m pip install -e . Configuration =============