Repository navigation
Conversation
Read PEP 621/639 [project] and [tool.poetry] simultaneously in pyproject2component and pyproject2dependencies so hybrid Poetry v2 manifests work with --pyproject without KeyError on name. Part of CycloneDX#839 Signed-off-by: Kemal Yilmaz <kemalylmz@gmail.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | ✅ 13 (≤ 20 complexity) |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Reduce branching in pyproject2component and poetry2dependencies to keep cyclomatic complexity delta well within repository thresholds. Signed-off-by: Kemal Yilmaz <kemalylmz@gmail.com>
|
does this implement a new feature, or is it pure refactoring? |
| from packaging.requirements import Requirement | ||
|
|
||
|
|
||
| def _merge_poetry_into_component(component: 'Component', |
There was a problem hiding this comment.
wrong scope.
tis is poetry-specific, so it belongs into the poetry implementation.
|
thanks for working on this topic. This looks a bit like AI snap/slop - it changes things without proper understanding of design and architecture. Changes should be kept to a scoped minim and follow a understandable and maintainable path. To save me some time, I did not review it entirely, and I will not, unless a human clarifies what is the intent here is, and what the scope might be. Putting this in DRAFT mode for now. |
|
Thanks for keeping this open, @jkowalleck. Honestly, I let AI tooling get ahead of the architecture and mixed in a refactor commit, so I see why it looked that way. The intent is a feature step for #839, not refactoring: reading Poetry v2 Should this PR cover only the shared |
Description
Part of #839 (Poetry CLI builder support will follow in a separate PR).
Read
[project](PEP 621/639) and[tool.poetry]simultaneously inpyproject2componentandpyproject2dependenciesinstead of returning early when[tool.poetry]is present:[project]when present and fall back to[tool.poetry]for omitted ordynamicfields (version,description,license,classifiers) while deduplicating external references and keeping PEP 639 license precedence.[project]and[tool.poetry]inpyproject2dependenciesand handle list-valued multi-constraint extras inpoetry2dependencies.KeyError('name')failure when passing a hybrid Poetry v2pyproject.tomlto--pyproject(for example inrequirements,pipenv, andenvironment).AI Tool Disclosure
Google AntigravityGeminiMerge [project] (PEP 621/639) and [tool.poetry] simultaneously in pyproject2component and pyproject2dependencies with unit and CLI integration tests.Affirmation
Disclosure: Assisted by AI tooling (Google Antigravity / Gemini). Code and tests verified by contributor.