Skip to content

feat: added IPython autocomplete for Metaflow and MetaflowData classes#3071

Merged
talsperre merged 2 commits into
Netflix:masterfrom
a-coder4:autocomplete-support
May 31, 2026
Merged

feat: added IPython autocomplete for Metaflow and MetaflowData classes#3071
talsperre merged 2 commits into
Netflix:masterfrom
a-coder4:autocomplete-support

Conversation

@a-coder4
Copy link
Copy Markdown
Contributor

PR Type

  • Bug fix
  • 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

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
  • AI tools were used (describe below)

Claude Sonnet 4.6 was used to explore and help me understand the codebase and identify the gaps.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 31, 2026

Greptile Summary

This PR adds IPython tab-completion support to two classes that were missed in PR #1348: __dir__ on MetaflowData (enabling task.data.<TAB>) and _ipython_key_completions_ on Metaflow (enabling Metaflow()['<TAB>']). Both additions correctly mirror the existing pattern in MetaflowObject and interact naturally with the classes' existing __getattr__/__getitem__ implementations.

Confidence Score: 5/5

Safe to merge — two small, well-scoped additions with no logic or security concerns.

Both new methods follow an established pattern already in the codebase, have no side effects outside of IPython completion, and the only finding is a missing docstring (P2 style).

No files require special attention.

Vulnerabilities

No security concerns identified.

Important Files Changed

Filename Overview
metaflow/client/core.py Adds __dir__ to MetaflowData for attribute tab-completion and _ipython_key_completions_ to Metaflow for key tab-completion, both following the pattern already established in MetaflowObject.

Reviews (2): Last reviewed commit: "Merge branch 'master' into autocomplete-..." | Re-trigger Greptile

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 9, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@c8258d1). Learn more about missing BASE report.

Files with missing lines Patch % Lines
metaflow/client/core.py 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #3071   +/-   ##
=========================================
  Coverage          ?   25.89%           
=========================================
  Files             ?      374           
  Lines             ?    51218           
  Branches          ?     9042           
=========================================
  Hits              ?    13263           
  Misses            ?    37170           
  Partials          ?      785           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@talsperre talsperre self-assigned this May 31, 2026
@talsperre talsperre self-requested a review May 31, 2026 18:19
@talsperre talsperre merged commit 3a388c2 into Netflix:master May 31, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support auto-completion of Metaflow objects/API in notebooks

2 participants