-
Notifications
You must be signed in to change notification settings - Fork 113
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-2165] Remove get_project_context() #324
Conversation
acfac69
to
0e962a3
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.
LGTM!
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.
LGTM! 🧑🍳
dataset_to_layer = {} | ||
for layer, dataset_names in _CATALOG.layers.items(): | ||
dataset_to_layer.update({dataset_name: layer for dataset_name in dataset_names}) |
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.
🤔 ?
dataset_to_layer = {} | |
for layer, dataset_names in _CATALOG.layers.items(): | |
dataset_to_layer.update({dataset_name: layer for dataset_name in dataset_names}) | |
dataset_to_layer = { | |
dataset_name: layer | |
for layer, dataset_names in _CATALOG.layers.items() | |
for dataset_name in dataset_names | |
} |
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.
I find double for-loops in list comprehensions quite hard to read so I prefer to leave it as it was before.
Co-authored-by: Dmitrii Deriabin <44967953+DmitriiDeriabinQB@users.noreply.github.com>
7a4c9d6
to
6a482b4
Compare
Description
get_project_context
was kept for compatibility with Kedro 0.14.*.Now that we no longer support old versions of Kedro (<0.15), we can replace the calls with
load_context()
orKedroSession.load_context()
.get_project_context
will also be removed in future major release of Kedro.Development notes
DataCatalog.layers
is a definite thing from 0.16.x onwards, no need to check for the old way of having thelayer
attribute on the dataset class).develop
, and changing the__version__
to 0.17.0 (as well asproject_version
inpyproject.toml
in a newly generated kedro project).QA notes
Checklist
RELEASE.md
fileLegal notice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":
I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.
I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.