Hi guys, another question: what is this line <here...
# questions
m
Hi guys, another question: what is this line here in the
pyproject.toml
for? I have been tinkering with the configuration to use Poetry instead of setuptools and it seems to be fine for running
kedro package
, but my linter gives an error when I switch from one tool to another with two errors: • "name" is a required property • {"entry-points":{"kedro.hooks":{}}} is not valid under any of the given schemas Could anyone help me explaining the behaviour of this line in the "vanilla" version so I can further investigate what is happening when I attempt switching to Poetry?
j
hi @Manoel Pereira de Queiroz! hmm I can't see if Poetry is compatible with PEP 621 entry points... can you try
Copy code
[tool.poetry.plugins."kedro.hooks"]
instead?
yeah support for this in Poetry is work in progress it seems https://github.com/python-poetry/poetry/pull/9135/
m
@Juan Luis, well, it doesn't trigger any messages from the linter, hahaha but I'm actually more interested in what the original
project*.*entry-points*.*"kedro.hooks"
serve for, this way I can dig depper into Poetry configuration to come back when I get a better grasp of any problems to take the most of your time 😃 I'm also aware that an initiative to implement Poetry integrated with Kedro is already going forward in the project! I believe I myself commented in one issue or another in support for the feature. Love to see when it releases, keep up the good work!
j
so,
[project.entry-points]
is the old
entry_points
from `setup.py`: https://packaging.python.org/en/latest/specifications/pyproject-toml/#entry-points and
[project.entry-points."kedro.hooks"]
is how plugins can declare/register hooks https://docs.kedro.org/en/stable/extend_kedro/plugins.html#hooks
about supporting Poetry in Kedro, we took the stance of supporting all PEP 621-compatible frontends, so when https://github.com/python-poetry/poetry/pull/9135 is merged, Poetry support will be automatic!
🄳 1