Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating multiple lock files #1138

Open
djagoda881 opened this issue Jun 5, 2024 · 1 comment
Open

Creating multiple lock files #1138

djagoda881 opened this issue Jun 5, 2024 · 1 comment

Comments

@djagoda881
Copy link

djagoda881 commented Jun 5, 2024

Hello,
I'm using Rye in a repository where I have a few optional dependencies group. I'm using this group depending on docker image that I want to create. So, for example:

[project]
name = "test"
version = "1.1.0"

dependencies = [
    "pandas>=2.2.2",
    "pyarrow>=16.1.0",
 
]
requires-python = ">=3.10"
readme = "README.md"

[project.optional-dependencies]

group1 = [
    "azure-core==1.30.1",
    "azure-storage-blob==12.20.0",
    "adlfs==2024.4.1",
]
group2 = [
    "awswrangler==3.7.3",
    "s3fs==2024.6.0",
]

I'd like to create my own custom .lock file, which I can use in my docker image.
It will be cool to have an optional flag during execution of rye lock --fatures group1 for example --lock-file where I could specify a new lock file with default dependencies and dependencies from group1.

Whole command rye lock --fatures group1 --lock-file requirements-group1.

Files in the root repository folder after execution:

├── requirements-dev.lock
├── requirements-group1.lock
├── requirements.lock
@chetangangappa94
Copy link

I second this, especially in cloud workflows such as lambdas where you will have multiple of them in a single repo, the ability to generate one lock file each for the respective lambdas greatly useful. PDM and Poetry both support these features. A syntax example to support this is as given below

rye lock --features group1 group2 --lock-file requirements-consolidated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants