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
Be sure to do this _every time_ you open a new terminal window for working on
66
-
Sydent. Using `poetry run` or `poetry shell` ensures that any Python commands
67
-
you run (`pip`, `python`, etc.) use the versions inside your venv, and not your
68
-
system Python.
69
-
70
-
When you're done, you can close your terminal.
71
-
72
-
### Optional: `direnv`
73
-
74
-
If even typing `poetry shell` is too much work for you, take a look at
75
-
[`direnv`](https://direnv.net/). A few steps are needed:
76
-
77
-
1. install direnv.
78
-
2. Add the configuration from [here](https://github.com/direnv/direnv/wiki/Python#poetry) to `~/.direnvrc`.
79
-
3. In the Sydent checkout, run `echo layout poetry >> .envrc`. Then run `direnv allow`.
80
-
81
-
From now on, when you `cd` into the sydent directory, `poetry shell` will run automatically. Whenever you navigate out of the sydent directory, you'll no longer be using poetry's venv.
82
-
83
40
### Run the unit tests
84
41
85
42
To make sure everything is working as expected, run the unit tests:
86
43
87
44
```bash
88
-
poetry run trial tests
45
+
uv run trial tests
89
46
```
90
47
91
48
If you see a message like:
@@ -104,12 +61,12 @@ Then all is well and you're ready to work!
104
61
Sydent uses [matrix-is-tester](https://github.com/matrix-org/matrix-is-tester/) to provide
105
62
black-box testing of compliance with the [Matrix Identity Service API](https://matrix.org/docs/spec/identity_service/latest).
106
63
(Features that are Sydent-specific belong in unit tests rather than the black-box test suite.)
107
-
This project is marked as a development dependency, so Poetry will automatically
108
-
install for you.
64
+
This project is marked as a development dependency, so `uv sync` will
65
+
automatically install it for you.
109
66
110
67
Now, to run `matrix-is-tester`, execute:
111
68
```
112
-
poetry run trial matrix_is_tester
69
+
uv run trial matrix_is_tester
113
70
```
114
71
115
72
#### Advanced
@@ -152,15 +109,14 @@ Some other points to follow:
152
109
153
110
## Code style and continuous integration
154
111
155
-
Sydent uses `black`, `isort` and `ruff` to enforce code style. Use the following
156
-
script to enforce these style guides:
112
+
Sydent uses [ruff](https://docs.astral.sh/ruff/) for linting and formatting, and
113
+
[mypy](https://mypy-lang.org/) for type checking. Use the following script to run
114
+
all checks:
157
115
158
116
```shell
159
-
poetry run scripts-dev/lint.sh
117
+
uv run scripts-dev/lint.sh
160
118
```
161
119
162
-
(This also runs `mypy`, our preferred typechecker.)
163
-
164
120
All of these checks are automatically run against any pull request via GitHub
165
121
Actions. If your change breaks the build, this
166
122
will be shown in GitHub, with links to the build results. If your build fails,
Copy file name to clipboardExpand all lines: README.rst
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,17 +33,17 @@ To install Sydent's dependencies on a Debian-based system, run::
33
33
Installing from source
34
34
~~~~~~~~~~~~~~~~~~~~~~
35
35
36
-
First install `poetry`. See `poetry's documentation <https://python-poetry.org/docs/#installation>`_ for details; we recommend installing via `pipx`. Once that's done::
36
+
First install `uv <https://docs.astral.sh/uv/getting-started/installation/>`_. Once that's done::
0 commit comments