-
Notifications
You must be signed in to change notification settings - Fork 930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[KED-2565] Register DataCatalog
in settings instead of through the registration hook.
#1064
Conversation
5f54348
to
f97f6b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for picking this up and making it such a clean PR to review. Made a few suggestions, let me know what you think. Everything looks good otherwise.
...eps/test_starter/{{ cookiecutter.repo_name }}/src/{{ cookiecutter.python_package }}/hooks.py
Show resolved
Hide resolved
...emplates/project/{{ cookiecutter.repo_name }}/src/{{ cookiecutter.python_package }}/hooks.py
Show resolved
Hide resolved
1b02c30
to
02f55c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff! 💥
03798c2
to
4c6a7b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General 👍 👍 👍 from me but with a few questions...
- Do we want to be exposing
DATA_CATALOG_ARGS
as we doCONFIG_LOADER_ARGS
? I don't know if this has been considered already. Personally I have no strong feelings on it - we can always add it on in a separate PR or some time in the future if it turns out it's needed. I suspect @lorenabalan or @idanov would know the answer to whether we want to do this anyway - Maybe I missed it, but I couldn't see any tests to make sure this is actually working ok? You have the
BadCatalog
but I didn't see any happy path tests analogous to the config loader tests that useMyConfigLoader
Completely separate from this PR, but before we release 0.18 we should really go through the release notes and reorganise them. e.g. to put all the registration hook change stuff together. Same goes for settings.py actually, to make sure that it's all nicely ordered and clear and consistent.
Good question. I'm not sure if we've discussed this or not 🤔 The
The happy paths are the already existing tests. Follow up to this task will be to remove the catalog from KedroContext, so I think it makes sense to revisit/rewrite the tests as part of that as well. |
I don't think the fact that it's constructed from
...analogous to how we do
Overall to me, at a glance it makes sense that we should provide
Do these test what happens if I overwrite |
Co-authored-by: Antony Milne <49395058+AntonyMilneQB@users.noreply.github.com>
My personal preference would be to leave it as is for now because I don't think we know enough information about that workflow, if it even exists. With the If the workflow exists, I would rather make the catalog go through the same exercise as the config loader, and see if we can define a clearer interface, rather than force it now and feel patchy. We can add it later as a feature addition, not a breaking change. |
Thanks for your input @lorenabalan and @AntonyMilneQB! I will merge this PR now as is and if we find that users need to pass arguments to the catalog we can create a follow up task to investigate and add this functionality. |
Description
DataCatalog
is currently registered via hooks - however we would like this to be viasettings.py
instead.Development notes
DataCatalog
registration as done for theConfigLoader
DataCatalog
as part of theKedroContext
for this PR. The removal will happen seperately.register_catalog
hook_impl
has been removedDATA_CATALOG_CLASS
has been added to_ProjectSettings
class implDATA_CATALOG_CLASS
has been added (commented) tosettings.py
DATA_CATALOG_CLASS
is set tokedro.io.DataCatalog
ProjectHooks
in place for now as we have a separate task in the backlog to get rid of the registration hooks fully.Checklist
RELEASE.md
file