Replies: 1 comment 5 replies
-
Hello Armin, thanks you for starting on simplify managing python projects. Here is my idea: poetry/pdm/hatch supports multiple environments. why not rye? Dev env:adding and syncing ( rye add flask
rye add black --env=dev
rye add ruff --env=dev --optional=ruff
rye sync
rye sync --env=dev --all-features
[project]
name = "test-wsl"
version = "0.1.0"
description = "Add a short description here"
dependencies = ["flask~=2.3.2"]
readme = "README.md"
requires-python = ">= 3.8"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.rye.env.dev]
dependencies = ["black~=23.3.0"]
[tool.rye.env.dev.optional-dependencies]
ruff= ["ruff~=0.0.265"]
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is an issue which asks for
sync
to be implied (#114). There is now also a flag called--features
and--all-features
onsync
/lock
to opt-in certain optional dependencies (#121). I think it's a good time to think about how this can work.The lockfile long term should work feature independent. That means that the lockfile is the same no matter which features are turned on. This is also how this works in Rust and I quite like that. So let's disregard the locking mechanism for now. The question however is about how the virtualenv is managed:
sync
with--features
, it remembers the state of the features turned on and next time runningsync
runs with the same features turned on.sync
, you need to always pass--features
or it will install without optional features. That's also already the case with--no-dev
which is needed explicitly to be passed to turn off the dev dependencies..rye.toml
file or a part inpyproject.toml
which influences howsync
/lock
operate.I'm a bit conflicted here. My hunch is that option 3 is probably the most sensible.
Beta Was this translation helpful? Give feedback.
All reactions