feat: add ipython autocomplete support for MetaflowObject instances#1348
Merged
romain-intel merged 1 commit intoApr 12, 2023
Merged
Conversation
savingoyal
approved these changes
Apr 11, 2023
Collaborator
savingoyal
left a comment
There was a problem hiding this comment.
lgtm! @romain-intel any thoughts here?
Contributor
|
This looks great. I did do some research about adding in constructor but yes, it's not straightforward so we can merge this. Thanks for the contribution. |
4 tasks
4 tasks
11 tasks
talsperre
added a commit
that referenced
this pull request
May 31, 2026
#3071) ## PR Type - [ ] Bug fix - [x] New feature - [ ] Core Runtime change - [ ] Docs / tooling - [ ] Refactoring ## Summary Adds IPython tab-completion support for the `Metaflow` class (`Metaflow()['<TAB>']` suggests flow names) and the `MetaflowData` class (`task.data.<TAB>` suggests artifact names). This closes the remaining gaps from issue #1114 after PR #1348 added completions to `MetaflowObject`. ## Issue Fixes #1114 ## Tests - [ ] Unit tests added/updated - [ ] Reproduction script provided - [ ] CI passes - [x] If tests are impractical: The changes are two small method additions (`_ipython_key_completions_` and `__dir__`) that follow the exact same pattern already merged in PR #1348. They can be verified interactively in a Jupyter notebook. ## Non-Goals Does not add completions for other Metaflow objects since those were already handled by PR #1348. ## AI Tool Usage - [ ] No AI tools were used in this contribution - [x] AI tools were used (describe below) Claude Sonnet 4.6 was used to explore and help me understand the codebase and identify the gaps. Co-authored-by: Shashank Srikanth <s.shashank2401@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
relates to #1114
The autocomplete for objects works with this simple addition of returning children ids. Suggestions when initiating classes like
Flow("could be helpful too but I couldn't find a way to do this. But for the class instances of Flow, Run, Step, Task, the autocomplete works and for reference the options are printed by calling the function that ipython would use.Any thoughts @romain-intel ?