Closed jack-mcivor closed 5 months ago
Sure! Poetry doesn't support [project]
tables (yet, they claim it they will support it, in fact switch to it, in 2.0 eventually. I think it might come sooner, there's a PR). So you have to use Poetry's custom tool table for everything (or switch to PDM, which is just like Poetry but follows standards ;) ). They call entry-points "plugins":
[tool.poetry.plugins."repo_review.checks"]
examples = "ex_repo_review.checks:repo_review_checks"
(PS: you can't ever mix and match project tables with another form of config; if you have a project table, all metadata must come from it unless listed in project.dynamic
. Static analysis tools like GitHub dependency graph are allowed to assume the table is complete expect for that list. Poetry's the only major build backend left with a non-PEP 621 style config, so it's really mostly relevant for Poetry)
Thanks, works a treat!
Is it possible to write custom checks whilst using a poetry style pyproject.toml setup?
My attempt is:
But this does not seem to register the plugin
I guess the poetry way of describing entry points might be required, but I cannot get this to work also
Causes an error on
poetry install
My project structure is
And this seems to work fine without poetry & a standard
[project]
table.I suspect maybe I'm doing something incorrect with the quoting but can't wrap my head around it