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
uv run poly create project --name my_example_project
147
172
```
148
173
174
+
#### Maturin
175
+
```shell
176
+
# if not already activated a virtual environment
177
+
source .venv/bin/activate
178
+
179
+
poly create project --name my_example_project
180
+
```
181
+
149
182
### Options
150
183
`--name` (required) the name of the project.
151
184
@@ -180,11 +213,26 @@ rye run poly info
180
213
uv run poly info
181
214
```
182
215
216
+
#### Maturin
217
+
```shell
218
+
# if not already activated a virtual environment
219
+
source .venv/bin/activate
220
+
221
+
poly info
222
+
```
223
+
183
224
### Options
184
225
`--short` Display a view that is better adjusted to Workspaces with many projects.
185
226
186
227
## Diff
187
-
Shows what has changed since the most recent stable point in time:
228
+
Shows what has changed since the most recent stable point in time.
229
+
230
+
The `diff` command will compare the current state of the repository, compared to a `git tag`.
231
+
The tool will look for the latest tag according to a certain pattern, such as `stable-*`.
232
+
The pattern can be configured in the Workspace [configuration](configuration.md).
233
+
234
+
The `diff` command is useful in a CI environment, to determine if a project should be deployed or not.
235
+
It is also useful when running tests for changed bricks only.
188
236
189
237
#### Poetry
190
238
```shell
@@ -211,37 +259,12 @@ rye run poly diff
211
259
uv run poly diff
212
260
```
213
261
214
-
The `diff` command will compare the current state of the repository, compared to a `git tag`.
215
-
The tool will look for the latest tag according to a certain pattern, such as `stable-*`.
216
-
The pattern can be configured in the Workspace [configuration](configuration.md).
217
-
218
-
The `diff` command is useful in a CI environment, to determine if a project should be deployed or not.
219
-
It is also useful when running tests for changed bricks only.
220
-
221
-
Example:
222
-
#### Poetry
223
-
```shell
224
-
poetry poly diff --since release
225
-
```
226
-
227
-
#### Hatch
228
-
```shell
229
-
hatch run poly diff --since release
230
-
```
231
-
232
-
#### PDM
233
-
```shell
234
-
pdm run poly diff --since release
235
-
```
236
-
237
-
#### Rye
262
+
#### Maturin
238
263
```shell
239
-
rye run poly diff --since release
240
-
```
264
+
# if not already activated a virtual environment
265
+
source .venv/bin/activate
241
266
242
-
#### Rye
243
-
```shell
244
-
uv run poly diff --since release
267
+
poly diff
245
268
```
246
269
247
270
### Options
@@ -289,6 +312,14 @@ rye run poly libs
289
312
uv run poly libs
290
313
```
291
314
315
+
#### Maturin
316
+
```shell
317
+
# if not already activated a virtual environment
318
+
source .venv/bin/activate
319
+
320
+
poly libs
321
+
```
322
+
292
323
### Options
293
324
`--directory`
294
325
Show info about libraries used in a specific project.
@@ -337,6 +368,14 @@ rye run poly check
337
368
uv run poly check
338
369
```
339
370
371
+
#### Maturin
372
+
```shell
373
+
# if not already activated a virtual environment
374
+
source .venv/bin/activate
375
+
376
+
poly check
377
+
```
378
+
340
379
### Options
341
380
`--directory`
342
381
Show info about libraries used in a specific project.
@@ -383,6 +422,14 @@ rye run poly sync
383
422
uv run poly sync
384
423
```
385
424
425
+
#### Maturin
426
+
```shell
427
+
# if not already activated a virtual environment
428
+
source .venv/bin/activate
429
+
430
+
poly sync
431
+
```
432
+
386
433
This feature is useful for keeping projects in sync. The command will analyze code and add any missing bricks to the projects, including the development project.
387
434
388
435
- projects: will add missing bricks to the project specific _pyproject.toml_, when imported by any of the already added bricks.
@@ -421,6 +468,14 @@ rye run poly deps
421
468
uv run poly deps
422
469
```
423
470
471
+
#### Maturin
472
+
```shell
473
+
# if not already activated a virtual environment
474
+
source .venv/bin/activate
475
+
476
+
poly deps
477
+
```
478
+
424
479
### Options
425
480
`--directory`
426
481
Show brick depencencies for a specific project.
@@ -540,3 +595,30 @@ or run the test, filtered by pytest markers
540
595
```shell
541
596
uv run pytest -m <<<echo"$query"
542
597
```
598
+
599
+
#### Maturin
600
+
```shell
601
+
# if not already activated a virtual environment
602
+
source .venv/bin/activate
603
+
```
604
+
605
+
```shell
606
+
# store the comma-separated list of bricks in a bash variable
607
+
changes="$(poly diff --bricks --short)"
608
+
609
+
# transform it into a pytest query,
610
+
# i.e. from "hello,world,something" to "hello or world or something"
No globally added tools needed. Add the project-specific dependencies (see the [Setup](setup.md) and [Projects & pyproject.toml](projects.md) section),
21
22
and the build hook plugins to add support for the Polylith structure and when packaging libraries.
Copy file name to clipboardExpand all lines: docs/migrating.md
+13-2
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ packages = [
20
20
# insert the needed 3rd party libraries here
21
21
```
22
22
23
-
## Hatch, PDM, Rye and uv
23
+
## uv, Hatch, PDM, Rye and Maturin
24
24
```toml
25
25
[project]
26
26
dependencies = [] # insert the needed 3rd party libraries here
@@ -76,7 +76,18 @@ rye build --sdist
76
76
```shell
77
77
cd path/to_project
78
78
79
-
uvx --from build pyproject-build --installer uv
79
+
uv build
80
+
```
81
+
82
+
### Maturin
83
+
```shell
84
+
cd path/to_project
85
+
86
+
poly build setup
87
+
88
+
maturin build
89
+
90
+
poly build teardown
80
91
```
81
92
82
93
The output is a `wheel` and, more importantly, an `sdist` (a source distribution). It is essentially a _zip_ file containing all source code used in the project.
0 commit comments