Skip to content

Commit

Permalink
Fix template projects example tests (#4159)
Browse files Browse the repository at this point in the history
* Fix: Switch ConfigLoader to OmegaConfigLoader

Signed-off-by: Janne Holopainen <manezki@gmail.com>

* Fix: Add env to KedroContext

Signed-off-by: Janne Holopainen <manezki@gmail.com>

* Doc: Add changes to RELEASE.md

Signed-off-by: Janne Holopainen <manezki@gmail.com>

---------

Signed-off-by: Janne Holopainen <manezki@gmail.com>
  • Loading branch information
Manezki authored Sep 16, 2024
1 parent 7e02653 commit 91765e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Enhanced `OmegaConfigLoader` configuration validation to detect duplicate keys at all parameter levels, ensuring comprehensive nested key checking.
## Bug fixes and other changes
* Fixed bug where using dataset factories breaks with `ThreadRunner`.
* Fixed template projects example tests.

## Breaking changes to the API
* Removed `ShelveStore` to address a security vulnerability.
Expand All @@ -18,6 +19,7 @@
## Community contributions
* [Puneet](https://github.com/puneeter)
* [ethanknights](https://github.com/ethanknights)
* [Manezki](https://github.com/Manezki)

# Release 0.19.8

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,23 @@

import pytest

from kedro.config import ConfigLoader
from kedro.config import OmegaConfigLoader
from kedro.framework.context import KedroContext
from kedro.framework.hooks import _create_hook_manager
from kedro.framework.project import settings


@pytest.fixture
def config_loader():
return ConfigLoader(conf_source=str(Path.cwd() / settings.CONF_SOURCE))
return OmegaConfigLoader(conf_source=str(Path.cwd() / settings.CONF_SOURCE))


@pytest.fixture
def project_context(config_loader):
return KedroContext(
package_name="{{ cookiecutter.python_package }}",
project_path=Path.cwd(),
env="local",
config_loader=config_loader,
hook_manager=_create_hook_manager(),
)
Expand Down

0 comments on commit 91765e3

Please sign in to comment.