Skip to content

Commit

Permalink
Update cruft
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Jan 15, 2025
1 parent d529a96 commit 24e7e8c
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/cthoyt/cookiecutter-snekpack",
"commit": "d044b69b3bd403a172ad6a06b3ed5cfc1ba87ad1",
"commit": "d1ff44f979b4529a47b13f8045036dd7c2d74ec6",
"checkout": null,
"context": {
"cookiecutter": {
Expand All @@ -21,7 +21,7 @@
"__runner_tests": "py",
"__gh_slug": "cthoyt/pystow",
"_template": "https://github.com/cthoyt/cookiecutter-snekpack",
"_commit": "d044b69b3bd403a172ad6a06b3ed5cfc1ba87ad1"
"_commit": "d1ff44f979b4529a47b13f8045036dd7c2d74ec6"
}
},
"directory": null
Expand Down
54 changes: 36 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
40 changes: 32 additions & 8 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -1,28 +1,52 @@
Installation
============
The most recent release can be installed from
`PyPI <https://pypi.org/project/pystow>`_ with:
`PyPI <https://pypi.org/project/pystow>`_ 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
=============
Expand Down

0 comments on commit 24e7e8c

Please sign in to comment.