Skip to content

Commit d919ad3

Browse files
authored
Merge pull request #136 from mokagio/uv-dev-workflow
Recommend `uv` for contributor workflow in `README`
2 parents 4e2dbe4 + 1ee3458 commit d919ad3

3 files changed

Lines changed: 651 additions & 22 deletions

File tree

README.md

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,53 +33,56 @@ It also contains various helper modules which are commonly used when working wit
3333

3434
# Install
3535

36-
You can install this package from PyPI
37-
38-
For example, using [`uv`](https://docs.astral.sh/uv/)
39-
40-
Setting up virtual environment:
36+
You can install this package from PyPI:
4137

4238
```sh
43-
uv venv
39+
pip install spacepackets
4440
```
4541

46-
Regular install:
42+
For example, using [`uv`](https://docs.astral.sh/uv/):
4743

4844
```sh
49-
uv pip install -e .
45+
uv pip install spacepackets
5046
```
5147

52-
Interactive install with testing support:
48+
# Examples
49+
50+
You can find all examples [inside the documentation](https://spacepackets.readthedocs.io/en/latest/examples.html).
51+
52+
53+
# Contributing
54+
55+
For local development from a checkout, sync the project environment and development tools:
5356

5457
```sh
55-
uv pip install -e ".[test]"
58+
uv sync --group dev
5659
```
5760

58-
# Examples
59-
60-
You can find all examples [inside the documentation](https://spacepackets.readthedocs.io/en/latest/examples.html).
61+
To include test dependencies:
6162

63+
```sh
64+
uv sync --group dev --extra test
65+
```
6266

6367
# Tests
6468

65-
If you want to run the tests, it is recommended to install `pytest` and `coverage` (optional)
66-
first. You also have to install the package with the optional `test` feature:
69+
If you want to run the tests, you have to install the package with the optional `test` feature:
6770

6871
```sh
69-
uv pip install -e ".[test]"
72+
uv sync --group dev --extra test
7073
```
7174

7275
Running tests regularly:
7376

7477
```sh
75-
pytest
78+
uv run pytest
7679
```
7780

7881
Running tests with coverage:
7982

8083
```sh
81-
coverage run -m pytest
82-
coverage report
84+
uv run coverage run -m pytest
85+
uv run coverage report
8386
```
8487

8588
# Documentation
@@ -90,7 +93,7 @@ The documentation is built with Sphinx and new documentation should be written u
9093
Install the required dependencies first:
9194

9295
```sh
93-
pip install -r docs/requirements.txt
96+
uv pip install -r docs/requirements.txt
9497
```
9598

9699
Then the documentation can be built with
@@ -111,11 +114,11 @@ make doctest
111114
Linting:
112115

113116
```sh
114-
ruff check
117+
uv run ruff check
115118
```
116119

117120
Formatting:
118121

119122
```sh
120-
ruff format
123+
uv run ruff format
121124
```

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,8 @@ addopts = [
121121
"--ignore=benchmarks"
122122
]
123123
testpaths = ["tests"]
124+
125+
[dependency-groups]
126+
dev = [
127+
"ruff>=0.15.5",
128+
]

0 commit comments

Comments
 (0)