cloud-custodian / poetry-plugin-freeze

poetry plugin to freeze dependency versions in wheels
22 stars 4 forks source link

fix: don't freeze dev dependencies, include nested deps with extra markers #11

Closed ajkerrigan closed 1 year ago

ajkerrigan commented 1 year ago

Looks like when this plugin checks path deps, it's looking at the dev group by default and bringing extras (and their dep trees) into the frozen wheel.

Summary of the changes:

This change effectively looks to mirror the utility of requirements.txt files created with poetry export, but specifies extras at install time rather than build time. For example:

# Export Flow (without extras)
poetry export -f requirements.txt > requirements.txt && pip install -r requirements.txt
# Freeze-wheel Flow
poetry build && poetry freeze-wheel && pip install my_frozen_wheel

# Export Flow (with extras)
poetry export --extras gcp -f requirements.txt && pip install -r requirements.txt
# Freeze-wheel Flow
poetry build && poetry freeze-wheel && pip install my_frozen_wheel[gcp]

Addresses https://github.com/cloud-custodian/cloud-custodian/issues/8488

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +2.86 :tada:

Comparison is base (b6ebff8) 87.73% compared to head (5287e23) 90.59%.

:exclamation: Current head 5287e23 differs from pull request most recent head 3092d9c. Consider uploading reports for the commit 3092d9c to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #11 +/- ## ========================================== + Coverage 87.73% 90.59% +2.86% ========================================== Files 1 1 Lines 163 202 +39 ========================================== + Hits 143 183 +40 + Misses 20 19 -1 ``` | [Impacted Files](https://app.codecov.io/gh/cloud-custodian/poetry-plugin-freeze/pull/11?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cloud-custodian) | Coverage Δ | | |---|---|---| | [src/poetry\_plugin\_freeze/app.py](https://app.codecov.io/gh/cloud-custodian/poetry-plugin-freeze/pull/11?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cloud-custodian#diff-c3JjL3BvZXRyeV9wbHVnaW5fZnJlZXplL2FwcC5weQ==) | `90.59% <100.00%> (+2.86%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.