Skip to content

342 ewoks requirements gathering use existing requirements files - #354

Merged
clarka34 merged 8 commits into
mainfrom
342-ewoks-requirements-gathering-use-existing-requirements-files
Oct 20, 2026
Merged

clarka34 merged 8 commits into
mainfrom
342-ewoks-requirements-gathering-use-existing-requirements-files

Conversation

@clarka34

Copy link
Copy Markdown
Member

PR summary

  • ewoks convert now stores the project files of the current environment.
    • uv: pyproject.toml + uv.lock
    • poetry: pyproject.toml + poetry.lock
    • pixi: pixi.toml (or pyproject.toml) + pixi.lock
  • When the environment has no project files, nothing is generated.
    • files stays empty and ewoks install recreates the environment from the stored distributions.
  • Documentation updated.

Limitations

  • uv and poetry: the environment must be the project's .venv (poetry needs
    virtualenvs.in-project true).
  • pixi: files from a named environment are reinstalled as default.
  • The lock files may not accurately represent the packages in the runtime environment.

AI Disclosure

  • No AI used
  • Claude used for reviewing and assistance with documentation updates.

@clarka34 clarka34 self-assigned this Oct 18, 2026
@clarka34 clarka34 linked an issue Oct 18, 2026 that may be closed by this pull request
@clarka34
clarka34 requested a review from woutdenolf October 18, 2026 15:08
@codecov

codecov Bot commented Oct 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@woutdenolf woutdenolf left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good overall. Only pixi can benefit from an improvement

pixi: files from a named environment are reinstalled as default.

Pixi can have multiple environments in one toml file:

[dependencies]
python = "3.12.*"

[feature.image_processing.dependencies]
numpy = ">=2.0"
scipy = "*"

[feature.reporting.dependencies]
pandas = "*"

[environments]
image_processing = ["image_processing"]
reporting = ["reporting"]

We could store the environment being used

{
    "manager": "pixi",
    "environment": "image_processing",
    "files": [
        "pixi.toml",
        "pixi.lock",
    ],
}

E.g. modify _gather_files to pass environment: Environment

# /path/to/project/.pixi/envs/image_processing/bin/python
environment_name = python.parents[2].name

Edit: or just Path(sys.prefix).name. Anyway, you get the idea.

And then ewoks install could do

pixi install --environment image_processing

This solve the default problem and installs only the the environment that is used.

@clarka34

clarka34 commented Oct 19, 2026 •

Copy link
Copy Markdown
Member Author

@woutdenolf I had created this issue about the pixi problem: #355

I will fix the problem here then. Thanks!

@woutdenolf
woutdenolf self-requested a review October 19, 2026 15:05

@woutdenolf woutdenolf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do it in a follow-up PR linked to that issue. Thanks!

@clarka34
clarka34 merged commit 32c4776 into main Oct 20, 2026
13 checks passed
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

Successfully merging this pull request may close these issues.

Ewoks requirements gathering: use existing requirements files

2 participants