You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+16-17Lines changed: 16 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,45 +4,43 @@ All contributions are greatly appreciated! Before contributing, please read the
4
4
5
5
## Development Setup
6
6
7
-
This project uses [Poetry][] to manage dependencies and builds, and you will need to install it before working on Decoy.
7
+
This project uses [uv][] to manage dependencies and builds, and you will need to install it before working on Decoy.
8
8
9
-
Once Poetry is installed, you should be good to set up a virtual environment and install development dependencies. Python >=3.10 is recommended for development.
9
+
Once `uv` is installed, you should be good to set up a virtual environment and install development dependencies. Python >=3.10 is recommended for development.
10
10
11
11
```bash
12
12
git clone https://github.com/mcous/decoy.git
13
13
cd decoy
14
-
poetry install
14
+
uv sync
15
15
```
16
16
17
17
## Development Tasks
18
18
19
19
Decoy uses [poethepoet][] to manage development tasks. If you want to quickly check everything, run the following:
20
20
21
21
```shell
22
-
poetry run poe all
22
+
uv run poe all
23
23
```
24
24
25
-
[poethepoet]: https://github.com/nat-n/poethepoet
26
-
27
25
### Tests
28
26
29
27
Decoy's tests are run using [pytest][]. To run tests in watch mode:
30
28
31
29
```bash
32
-
poetry run poe test
30
+
uv run poe test
33
31
```
34
32
35
33
To run tests once and report coverage
36
34
37
35
```bash
38
-
poetry run poe test-once
39
-
poetry run poe coverage
36
+
uv run poe test-once
37
+
uv run poe coverage
40
38
```
41
39
42
40
In an exciting twist, since version 1.6.0, Decoy's tests rely on Decoy itself to test (and more importantly, design) the relationships between Decoy's internal APIs. This means:
43
41
44
-
-Decoy's unit test suite serves as an end-to-end test of Decoy by virtue of existing (wow, very meta, actually kind of cool).
45
-
-Changes that break a small part of Decoy may result in a large number of test failures, because if Decoy breaks it can't be used to test itself.
42
+
- Decoy's unit test suite serves as an end-to-end test of Decoy by virtue of existing (wow, very meta, actually kind of cool).
43
+
- Changes that break a small part of Decoy may result in a large number of test failures, because if Decoy breaks it can't be used to test itself.
46
44
47
45
If you find yourself in a situation where Decoy's test suite has blown up, **concentrate on getting the test suites that don't use Decoy to pass**. From there, lean on the type-checker to guide you to any components that aren't properly hooked up. Decoy also has a end-to-end smoke test suite (`tests/test_decoy.py`) that can be helpful in getting things back to green.
48
46
@@ -51,17 +49,17 @@ If you find yourself in a situation where Decoy's test suite has blown up, **con
51
49
Decoy's source code is typechecked with [mypy][] and linted/formatted with [ruff][].
52
50
53
51
```bash
54
-
poetry run poe check
55
-
poetry run poe lint
56
-
poetry run poe format
52
+
uv run poe check
53
+
uv run poe lint
54
+
uv run poe format
57
55
```
58
56
59
57
### Documentation
60
58
61
59
Decoy's documentation is built with [mkdocs][], which you can use to preview the documentation site locally.
62
60
63
61
```bash
64
-
poetry run docs
62
+
uv run poe docs
65
63
```
66
64
67
65
## Deploying
@@ -77,7 +75,7 @@ git pull
77
75
78
76
# bump the version
79
77
# replace ${bump_version} with a bump specifier, like "minor"
80
-
poetry version ${bump_version}
78
+
uv version --bump${bump_version}
81
79
82
80
# add the bumped pyproject.toml
83
81
git add pyproject.toml
@@ -89,8 +87,9 @@ git tag -a v${release_version} -m "chore(release): ${release_version}"
89
87
git push --follow-tags
90
88
```
91
89
90
+
[uv]: https://docs.astral.sh/uv/
91
+
[poethepoet]: https://github.com/nat-n/poethepoet
92
92
[code of conduct]: https://github.com/mcous/decoy/blob/main/CODE_OF_CONDUCT.md
0 commit comments