Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DataCatalog2.0]:
KedroDataCatalog
with dict interface (#4218)
* Added a skeleton for AbstractDataCatalog and KedroDataCatalog Signed-off-by: Elena Khaustova <[email protected]> * Removed from_config method Signed-off-by: Elena Khaustova <[email protected]> * Implemented _init_datasets method Signed-off-by: Elena Khaustova <[email protected]> * Implemented get dataset Signed-off-by: Elena Khaustova <[email protected]> * Started resolve_patterns implementation Signed-off-by: Elena Khaustova <[email protected]> * Implemented resolve_patterns Signed-off-by: Elena Khaustova <[email protected]> * Fixed credentials resolving Signed-off-by: Elena Khaustova <[email protected]> * Updated match pattern Signed-off-by: Elena Khaustova <[email protected]> * Implemented add from dict method Signed-off-by: Elena Khaustova <[email protected]> * Updated io __init__ Signed-off-by: Elena Khaustova <[email protected]> * Added list method Signed-off-by: Elena Khaustova <[email protected]> * Implemented _validate_missing_keys Signed-off-by: Elena Khaustova <[email protected]> * Added datasets access logic Signed-off-by: Elena Khaustova <[email protected]> * Added __contains__ and comments on lazy loading Signed-off-by: Elena Khaustova <[email protected]> * Renamed dataset_name to ds_name Signed-off-by: Elena Khaustova <[email protected]> * Updated some docstrings Signed-off-by: Elena Khaustova <[email protected]> * Fixed _update_ds_configs Signed-off-by: Elena Khaustova <[email protected]> * Fixed _init_datasets Signed-off-by: Elena Khaustova <[email protected]> * Implemented add_runtime_patterns Signed-off-by: Elena Khaustova <[email protected]> * Fixed runtime patterns usage Signed-off-by: Elena Khaustova <[email protected]> * Moved pattern logic out of data catalog, implemented KedroDataCatalog Signed-off-by: Elena Khaustova <[email protected]> * KedroDataCatalog updates Signed-off-by: Elena Khaustova <[email protected]> * Added property to return config Signed-off-by: Elena Khaustova <[email protected]> * Added list patterns method Signed-off-by: Elena Khaustova <[email protected]> * Renamed and moved ConfigResolver Signed-off-by: Elena Khaustova <[email protected]> * Renamed ConfigResolver Signed-off-by: Elena Khaustova <[email protected]> * Cleaned KedroDataCatalog Signed-off-by: Elena Khaustova <[email protected]> * Cleaned up DataCatalogConfigResolver Signed-off-by: Elena Khaustova <[email protected]> * Docs build fix attempt Signed-off-by: Elena Khaustova <[email protected]> * KedroDataCatalog draft Signed-off-by: Elena Khaustova <[email protected]> * Removed KedroDataCatalog Signed-off-by: Elena Khaustova <[email protected]> * Updated from_config method Signed-off-by: Elena Khaustova <[email protected]> * Updated constructor and add methods Signed-off-by: Elena Khaustova <[email protected]> * Updated _get_dataset method Signed-off-by: Elena Khaustova <[email protected]> * Updated __contains__ Signed-off-by: Elena Khaustova <[email protected]> * Updated __eq__ and shallow_copy Signed-off-by: Elena Khaustova <[email protected]> * Added __iter__ and __getitem__ Signed-off-by: Elena Khaustova <[email protected]> * Removed unused imports Signed-off-by: Elena Khaustova <[email protected]> * Added TODO Signed-off-by: Elena Khaustova <[email protected]> * Updated runner.run() Signed-off-by: Elena Khaustova <[email protected]> * Updated session Signed-off-by: Elena Khaustova <[email protected]> * Added confil_resolver property Signed-off-by: Elena Khaustova <[email protected]> * Updated catalog list command Signed-off-by: Elena Khaustova <[email protected]> * Updated catalog create command Signed-off-by: Elena Khaustova <[email protected]> * Updated catalog rank command Signed-off-by: Elena Khaustova <[email protected]> * Updated catalog resolve command Signed-off-by: Elena Khaustova <[email protected]> * Remove some methods Signed-off-by: Elena Khaustova <[email protected]> * Removed ds configs from catalog Signed-off-by: Elena Khaustova <[email protected]> * Fixed lint Signed-off-by: Elena Khaustova <[email protected]> * Fixed typo Signed-off-by: Elena Khaustova <[email protected]> * Added module docstring Signed-off-by: Elena Khaustova <[email protected]> * Renaming methods Signed-off-by: Elena Khaustova <[email protected]> * Removed None from Pattern type Signed-off-by: Elena Khaustova <[email protected]> * Fixed docs failing to find class reference Signed-off-by: Elena Khaustova <[email protected]> * Fixed docs failing to find class reference Signed-off-by: Elena Khaustova <[email protected]> * Updated Patterns type Signed-off-by: Elena Khaustova <[email protected]> * Fix tests (#4149) * Fix most tests Signed-off-by: Ankita Katiyar <[email protected]> * Fix most tests Signed-off-by: Ankita Katiyar <[email protected]> --------- Signed-off-by: Ankita Katiyar <[email protected]> * Returned constants to avoid breaking changes Signed-off-by: Elena Khaustova <[email protected]> * Udapted KedroDataCatalog for recent changes Signed-off-by: Elena Khaustova <[email protected]> * Minor fix Signed-off-by: Elena Khaustova <[email protected]> * Updated test_sorting_order_with_other_dataset_through_extra_pattern Signed-off-by: Elena Khaustova <[email protected]> * Removed odd properties Signed-off-by: Elena Khaustova <[email protected]> * Updated tests Signed-off-by: Elena Khaustova <[email protected]> * Removed None from _fetch_credentials input Signed-off-by: Elena Khaustova <[email protected]> * Updated specs and context Signed-off-by: Elena Khaustova <[email protected]> * Updated runners Signed-off-by: Elena Khaustova <[email protected]> * Updated default catalog validation Signed-off-by: Elena Khaustova <[email protected]> * Updated default catalog validation Signed-off-by: Elena Khaustova <[email protected]> * Updated contains and added exists methods for KedroDataCatalog Signed-off-by: Elena Khaustova <[email protected]> * Fixed docs Signed-off-by: Elena Khaustova <[email protected]> * Fixing docs and lint Signed-off-by: Elena Khaustova <[email protected]> * Fixed docs Signed-off-by: Elena Khaustova <[email protected]> * Fixed docs Signed-off-by: Elena Khaustova <[email protected]> * Fixed unit tests Signed-off-by: Elena Khaustova <[email protected]> * Added __eq__ Signed-off-by: Elena Khaustova <[email protected]> * Renamed DataCatalogConfigResolver to CatalogConfigResolver Signed-off-by: Elena Khaustova <[email protected]> * Renamed _init_configs to _resolve_config_credentials Signed-off-by: Elena Khaustova <[email protected]> * Moved functions to the class Signed-off-by: Elena Khaustova <[email protected]> * Refactored resolve_dataset_pattern Signed-off-by: Elena Khaustova <[email protected]> * Fixed refactored part Signed-off-by: Elena Khaustova <[email protected]> * Changed the order of arguments for DataCatalog constructor Signed-off-by: Elena Khaustova <[email protected]> * Replaced __getitem__ with .get() Signed-off-by: Elena Khaustova <[email protected]> * Updated catalog commands Signed-off-by: Elena Khaustova <[email protected]> * Moved warm up block outside of the try block Signed-off-by: Elena Khaustova <[email protected]> * Fixed linter Signed-off-by: Elena Khaustova <[email protected]> * Removed odd copying Signed-off-by: Elena Khaustova <[email protected]> * Renamed DataCatalogConfigResolver to CatalogConfigResolver Signed-off-by: Elena Khaustova <[email protected]> * Renamed AbstractDataCatalog to BaseDataCatalog Signed-off-by: Elena Khaustova <[email protected]> * Moved validate_dataset_config inside catalog Signed-off-by: Elena Khaustova <[email protected]> * Renamed _init_dataset to _add_from_config Signed-off-by: Elena Khaustova <[email protected]> * Fix lint Signed-off-by: Elena Khaustova <[email protected]> * Updated release notes Signed-off-by: Elena Khaustova <[email protected]> * Returned DatasetError Signed-off-by: Elena Khaustova <[email protected]> * Added _dataset_patterns and _default_pattern to _config_resolver to avoid breaking change Signed-off-by: Elena Khaustova <[email protected]> * Made resolve_dataset_pattern return just dict Signed-off-by: Elena Khaustova <[email protected]> * Fixed linter Signed-off-by: Elena Khaustova <[email protected]> * Added Catalogprotocol draft Signed-off-by: Elena Khaustova <[email protected]> * Implemented CatalogProtocol Signed-off-by: Elena Khaustova <[email protected]> * Updated types Signed-off-by: Elena Khaustova <[email protected]> * Fixed linter Signed-off-by: Elena Khaustova <[email protected]> * Added _ImplementsCatalogProtocolValidator Signed-off-by: Elena Khaustova <[email protected]> * Updated docstrings Signed-off-by: Elena Khaustova <[email protected]> * Fixed tests Signed-off-by: Elena Khaustova <[email protected]> * Fixed docs Signed-off-by: Elena Khaustova <[email protected]> * Excluded Potocol from coverage Signed-off-by: Elena Khaustova <[email protected]> * Fixed docs Signed-off-by: Elena Khaustova <[email protected]> * Renamed catalog source to kedro_data_catalog Signed-off-by: Elena Khaustova <[email protected]> * Renamed data set to dataset in docstrings Signed-off-by: Elena Khaustova <[email protected]> * Updated add_from_dict Signed-off-by: Elena Khaustova <[email protected]> * Revised comments and TODOs Signed-off-by: Elena Khaustova <[email protected]> * Updated error message to point to specific catalog type Signed-off-by: Elena Khaustova <[email protected]> * Fixed tests Signed-off-by: Elena Khaustova <[email protected]> * Merged with protocol Signed-off-by: Elena Khaustova <[email protected]> * Removed reference to DataCatalog in docstrings Signed-off-by: Elena Khaustova <[email protected]> * Fixed docs Signed-off-by: Elena Khaustova <[email protected]> * Reordered methods Signed-off-by: Elena Khaustova <[email protected]> * Removed add_all from protocol Signed-off-by: Elena Khaustova <[email protected]> * Changed the order of arguments Signed-off-by: Elena Khaustova <[email protected]> * Updated docstrings Signed-off-by: Elena Khaustova <[email protected]> * Updated docstrings Signed-off-by: Elena Khaustova <[email protected]> * Added __repr__ Signed-off-by: Elena Khaustova <[email protected]> * Made __getitem__ return deepcopy Signed-off-by: Elena Khaustova <[email protected]> * Fixed bug in get_dataset() Signed-off-by: Elena Khaustova <[email protected]> * Fixed __eq__ Signed-off-by: Elena Khaustova <[email protected]> * Fixed docstrings Signed-off-by: Elena Khaustova <[email protected]> * Added __setitem__ Signed-off-by: Elena Khaustova <[email protected]> * Unit tests for `KedroDataCatalog` (#4171) * Added KedroDataCatlog tests template Signed-off-by: Elena Khaustova <[email protected]> * Added test save/load unregistered dataset Signed-off-by: Elena Khaustova <[email protected]> * Added test_feed_dict Signed-off-by: Elena Khaustova <[email protected]> * Added exists tests Signed-off-by: Elena Khaustova <[email protected]> * Added tests for list() Signed-off-by: Elena Khaustova <[email protected]> * Added test_eq Signed-off-by: Elena Khaustova <[email protected]> * Added test init/add datasets Signed-off-by: Elena Khaustova <[email protected]> * Updated test_adding_datasets_not_allowed Signed-off-by: Elena Khaustova <[email protected]> * Added shallow copy tests Signed-off-by: Elena Khaustova <[email protected]> * Added TestKedroDataCatalogFromConfig Signed-off-by: Elena Khaustova <[email protected]> * Added missing tests Signed-off-by: Elena Khaustova <[email protected]> --------- Signed-off-by: Elena Khaustova <[email protected]> * Updated RELEASE.md Signed-off-by: Elena Khaustova <[email protected]> * Removed deep copies Signed-off-by: Elena Khaustova <[email protected]> * Removed some interface that will be changed in the next version Signed-off-by: Elena Khaustova <[email protected]> * Removed key completions Signed-off-by: Elena Khaustova <[email protected]> * Fixinf typos Signed-off-by: Elena Khaustova <[email protected]> * Removed key completions test Signed-off-by: Elena Khaustova <[email protected]> * Replaced data set with dataset Signed-off-by: Elena Khaustova <[email protected]> * Added docstring for get_dataset() method Signed-off-by: Elena Khaustova <[email protected]> * Renamed pytest fixture Signed-off-by: Elena Khaustova <[email protected]> * Addressed review comments Signed-off-by: Elena Khaustova <[email protected]> * Updated _assert_requirements_ok starters test Signed-off-by: Elena Khaustova <[email protected]> * Revert "Updated _assert_requirements_ok starters test" This reverts commit 5208321. Signed-off-by: Elena Khaustova <[email protected]> * Updated error message Signed-off-by: Elena Khaustova <[email protected]> * Replaced typo Signed-off-by: Elena Khaustova <[email protected]> * Replaced data set with dataset in docstrings Signed-off-by: Elena Khaustova <[email protected]> * Updated tests Signed-off-by: Elena Khaustova <[email protected]> * Made KedroDataCatalog subclass from CatalogProtocol Signed-off-by: Elena Khaustova <[email protected]> * Updated release notes Signed-off-by: Elena Khaustova <[email protected]> * Implemented iter, getitem, setitem Signed-off-by: Elena Khaustova <[email protected]> * Updated add_data and TODOs Signed-off-by: Elena Khaustova <[email protected]> * Added key completions Signed-off-by: Elena Khaustova <[email protected]> * Maded behavior dict like Signed-off-by: Elena Khaustova <[email protected]> * Merged with main Signed-off-by: Elena Khaustova <[email protected]> * Removed add_data() method Signed-off-by: Elena Khaustova <[email protected]> * Added usage example and updated docstrings with experimental feature note Signed-off-by: Elena Khaustova <[email protected]> * Added len and get Signed-off-by: Elena Khaustova <[email protected]> * Implemented unit tests Signed-off-by: Elena Khaustova <[email protected]> * Update RELEASE.md Co-authored-by: Merel Theisen <[email protected]> Signed-off-by: ElenaKhaustova <[email protected]> * Update kedro/io/kedro_data_catalog.py Co-authored-by: Merel Theisen <[email protected]> Signed-off-by: ElenaKhaustova <[email protected]> * Fixed lint Signed-off-by: Elena Khaustova <[email protected]> * Updated load_data and save_data to use new interface Signed-off-by: Elena Khaustova <[email protected]> * Updated load_data and save_data to use new interface Signed-off-by: Elena Khaustova <[email protected]> * Returned usage of get_dataset() Signed-off-by: Elena Khaustova <[email protected]> * Fixed lint Signed-off-by: Elena Khaustova <[email protected]> * Updated __getitem__ to use old get_dataset() method Signed-off-by: Elena Khaustova <[email protected]> * Removed regex_search from values() Signed-off-by: Elena Khaustova <[email protected]> * Fixed type annotation for __iter__ Signed-off-by: Elena Khaustova <[email protected]> * Fixed linter Signed-off-by: Elena Khaustova <[email protected]> * Revert lint fix Signed-off-by: Elena Khaustova <[email protected]> * Returned short names for save and load Signed-off-by: Elena Khaustova <[email protected]> * Removed regex_search from keys and items Signed-off-by: Elena Khaustova <[email protected]> * Updated release notes Signed-off-by: Elena Khaustova <[email protected]> * Maded regex_search non optional Signed-off-by: Elena Khaustova <[email protected]> * Changed default for regex_flags Signed-off-by: Elena Khaustova <[email protected]> * Returned list() method Signed-off-by: Elena Khaustova <[email protected]> * Fixed __iter__ return type Signed-off-by: Elena Khaustova <[email protected]> --------- Signed-off-by: Elena Khaustova <[email protected]> Signed-off-by: Ankita Katiyar <[email protected]> Signed-off-by: ElenaKhaustova <[email protected]> Co-authored-by: Ankita Katiyar <[email protected]> Co-authored-by: Merel Theisen <[email protected]>
- Loading branch information