Repository navigation
Conversation
d426369 to
2c73b6b
Compare
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
b784959 to
6bb5fa9
Compare
| Dagger modules in Python are built to be installed, like libraries. The runtime container installs the module code with: | ||
| Dagger modules in Python are built to be installed, like libraries. At module creation time, a `pyproject.toml` and `uv.lock` file will automatically be created that depend on the locally generated client library (in `./sdk`). This dependency is configured to be editable so that changes in the code don't require a re-install. | ||
|
|
||
| With the `uv.lock` file, Dagger uses uv's [project management](https://docs.astral.sh/uv/concepts/projects/) capabilites, but it can be opted out by removing this file, in which case Dagger falls back to [the pip interface](https://docs.astral.sh/uv/pip/) instead. |
There was a problem hiding this comment.
| With the `uv.lock` file, Dagger uses uv's [project management](https://docs.astral.sh/uv/concepts/projects/) capabilites, but it can be opted out by removing this file, in which case Dagger falls back to [the pip interface](https://docs.astral.sh/uv/pip/) instead. | |
| With the `uv.lock` file, Dagger uses `uv`'s [project management](https://docs.astral.sh/uv/concepts/projects/) capabilites, but it can be opted out by removing this file, in which case Dagger falls back to [the `pip` interface](https://docs.astral.sh/uv/pip/) instead. |
There was a problem hiding this comment.
Astral doesn't use the backticks in their documentation: https://docs.astral.sh/uv/getting-started/
uv→ the cli program- uv → the name of the tool
Notice also that even in the start of a phrase, they don't use "Uv". For example:
uv provides a standalone installer to download and install uv:
There was a problem hiding this comment.
As for "the pip interface", it's taken out of the linked page: https://docs.astral.sh/uv/pip/
Doesn't take backticks because it's not referring the pip CLI. It's a compatibility layer that uv has, that can replace pip.
| ``` | ||
|
|
||
| Due to [PEP 517](https://peps.python.org/pep-0517/) and [`pip` supporting `pyproject.toml`](https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/), this means that all package managers that support the [build backend](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#declaring-the-build-backend) standard are automatically supported. | ||
| Notice that the `./sdk` and `main` (in `.`) packages don't need to be in the `requirements.lock` file, **only the third party dependencies**. |
There was a problem hiding this comment.
Maybe this can be formatted as a note?
There was a problem hiding this comment.
I can't because it's already inside an "info" admonition and docusaurus doesn't render that well.
| ```` | ||
|
|
||
| :::note | ||
| Uv with `uv.lock` needs to have the SDK library (`dagger-io`, generated in `./sdk`) defined as a **production** dependency, unlike the other installation methods where it should be a development dependency. |
There was a problem hiding this comment.
General comment: if possible, could you please avoid the special formatting like ** or * unless absolutely necessary? Instead, it would be better to use note/tip/warning blocks for highlighting important aspects. The reason is that different authors tend to use this formatting for different purposes, which creates consistency issues, and readers also don't interpret it all the same way, which creates readability issues.
There was a problem hiding this comment.
I've reduced the usage of that formatting.
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
Co-authored-by: vikram-dagger <[email protected]> Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
d26cf00 to
cf46a77
Compare
Fixes #8449
Note
This needed to be published with v0.13.0 but I couldn't manage it, so we need these docs asap.
👀 See Preview