-
Notifications
You must be signed in to change notification settings - Fork 928
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
Make kedro commands work from inside subdirectories in project #3683
Changes from 7 commits
c73ef68
d9d7c44
caf3eb0
b318f42
451477e
c39b2fd
fccf145
e5a9667
b261c99
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
from kedro.framework.session.store import BaseSessionStore | ||
from kedro.io.core import generate_timestamp | ||
from kedro.runner import AbstractRunner, SequentialRunner | ||
from kedro.utils import _find_kedro_project | ||
|
||
|
||
def _describe_git(project_path: Path) -> dict[str, dict[str, Any]]: | ||
|
@@ -104,7 +105,9 @@ def __init__( # noqa: PLR0913 | |
save_on_close: bool = False, | ||
conf_source: str | None = None, | ||
): | ||
self._project_path = Path(project_path or Path.cwd()).resolve() | ||
self._project_path = Path( | ||
project_path or _find_kedro_project(Path.cwd()).resolve() or Path.cwd() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Previously we called There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated! |
||
) | ||
self.session_id = session_id | ||
self.save_on_close = save_on_close | ||
self._package_name = package_name | ||
|
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.
_is_project
and_find_kedro_project
are private methods, but it might be worth mentioning in the release notes section "Breaking changes to the API" that these were moved tokedro.utils
, just in case people are using them.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.
Updated!