I just noticed that convert_poetry_to_requirements works by running poetry export --with=dev and feeding the output to safety check.
When a project has 'extra' dependencies, they are not included in the output of poetry export --with-dev.
Here's a demonstration using https://github.com/yrro/hitron-exporter/:
$ poetry export --with=dev | grep '^[^ ]' | wc -l
30
$ poetry export --with=dev -E freeipa-vault -E container | grep '^[^ ]' | wc -l
48
Unfortunately poetry export dosn't have a way to include all extra dependencies; you probably have to parse pyproject.toml and construct the list of extras by looking for this part:
[tool.poetry.extras]
freeipa-vault = ["ipaclient", "ipapython"]
container = ["gunicorn", "setproctitle"]
I just noticed that
convert_poetry_to_requirementsworks by runningpoetry export --with=devand feeding the output tosafety check.When a project has 'extra' dependencies, they are not included in the output of
poetry export --with-dev.Here's a demonstration using https://github.com/yrro/hitron-exporter/:
Unfortunately
poetry exportdosn't have a way to include all extra dependencies; you probably have to parsepyproject.tomland construct the list of extras by looking for this part: