Skip to content

Commit

Permalink
Added usage example and updated docstrings with experimental feature …
Browse files Browse the repository at this point in the history
…note

Signed-off-by: Elena Khaustova <[email protected]>
  • Loading branch information
ElenaKhaustova committed Oct 7, 2024
1 parent b4ae279 commit 5bdf16b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
6 changes: 4 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
* Moved pattern resolution logic from `DataCatalog` to a separate component - `CatalogConfigResolver`. Updated `DataCatalog` to use `CatalogConfigResolver` internally.
* Made packaged Kedro projects return `session.run()` output to be used when running it in the interactive environment.
* Enhanced `OmegaConfigLoader` configuration validation to detect duplicate keys at all parameter levels, ensuring comprehensive nested key checking.

**Note:** ``KedroDataCatalog`` is an experimental feature, so please mind possible breaking changes while using it.

Check warning on line 16 in RELEASE.md

View workflow job for this annotation

GitHub Actions / vale

[vale] RELEASE.md#L16

[Kedro.words] Use '' instead of 'please'.
Raw output
{"message": "[Kedro.words] Use '' instead of 'please'.", "location": {"path": "RELEASE.md", "range": {"start": {"line": 16, "column": 63}}}, "severity": "WARNING"}

## Bug fixes and other changes
* Fixed bug where using dataset factories breaks with `ThreadRunner`.
* Fixed a bug where `SharedMemoryDataset.exists` would not call the underlying `MemoryDataset`.
* Fixed template projects example tests.
* Made credentials loading consistent between `KedroContext._get_catalog()` and `resolve_patterns` so that both us
e `_get_config_credentials()`
* Made credentials loading consistent between `KedroContext._get_catalog()` and `resolve_patterns` so that both use `_get_config_credentials()`

## Breaking changes to the API
* Removed `ShelveStore` to address a security vulnerability.
Expand Down
13 changes: 13 additions & 0 deletions kedro/io/kedro_data_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
use a ``KedroDataCatalog``, you need to instantiate it with a dictionary of datasets.
Then it will act as a single point of reference for your calls, relaying load and
save functions to the underlying datasets.
``KedroDataCatalog`` is an experimental feature aimed to replace ``DataCatalog`` in the future.
Expect possible breaking changes while using it.
"""

from __future__ import annotations
Expand Down Expand Up @@ -44,6 +47,9 @@ def __init__(
single point of reference for your calls, relaying load and save
functions to the underlying datasets.
Note: ``KedroDataCatalog`` is an experimental feature, so please mind
possible breaking changes while using it.
Args:
datasets: A dictionary of dataset names and dataset instances.
raw_data: A dictionary with data to be added in memory as `MemoryDataset`` instances.
Expand All @@ -56,6 +62,13 @@ def __init__(
case-insensitive string that conforms with operating system
filename limitations, b) always return the latest version when
sorted in lexicographical order.
Example:
::
>>> # settings.py
>>> from kedro.io import KedroDataCatalog
>>>
>>> DATA_CATALOG_CLASS = KedroDataCatalog
"""
self._config_resolver = config_resolver or CatalogConfigResolver()
self._datasets = datasets or {}
Expand Down

0 comments on commit 5bdf16b

Please sign in to comment.