-
Notifications
You must be signed in to change notification settings - Fork 913
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
e2e-test for %load_node magic #3528
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
8ff3c0d
e2e draft
noklam 9e11536
Merge branch 'main' into noklam/load-node-e2e
noklam eeed38a
Merge branch 'noklam/load-node-e2e' of github.com:kedro-org/kedro int…
noklam a7c52cf
Fix name collision
noklam bcd9a77
Add e2e test
noklam 1674e4c
protect script under __name__
noklam 6abb874
Fix test
noklam be53f77
remove test notebook
noklam 3bfaeb3
remove debug statement
noklam 77d59be
revert changes
noklam f50053c
Merge branch 'main' into noklam/load-node-e2e
noklam 70ae03f
fix test
noklam 4c475b8
Merge branch 'noklam/load-node-e2e' of github.com:kedro-org/kedro int…
noklam 08632b2
clean up notebook e2etest
noklam 262d01b
fix test after node rename
noklam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Feature: load_node in new project | ||
|
||
Background: | ||
Given I have prepared a config file | ||
And I have run a non-interactive kedro new with starter "default" | ||
|
||
Scenario: Execute ipython load_node magic | ||
When I execute the load_node magic command | ||
Then the logs should show that load_node executed successfully |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
features/steps/test_starter/{{ cookiecutter.repo_name }}/ipython_script.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
if __name__ == "__main__": | ||
from IPython.testing.globalipapp import get_ipython | ||
ip = get_ipython() | ||
ip.run_line_magic("load_ext", "kedro.ipython") | ||
# Assume cwd is project root | ||
ip.run_line_magic("reload_kedro", "") | ||
ip.run_line_magic("load_node", "split_data_node") | ||
# ip.rl_next_input is what you see in the terminal input | ||
ip.run_cell(ip.rl_next_input) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is an anchor statement so that the e2e test and ensure
%load_node
is run properly without asserting the function definition.