Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jczhong84
Copy link
Collaborator

Automatically injects DataDoc variables into Python runtime when document loads or variables change, allowing Python cells to reference them directly.

  • Added injectVariables() method to Python kernel and context
  • Enhanced DataDoc component to monitor variable changes with useEffect
  • Auto-converts DataDoc variables to Python-compatible format

namespaceId: number,
variables: Record<string, any>
): Promise<void> => {
if (!kernelRef.current) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be done lazily? if the kernel is not started, then remember to inject it on the next kernel start?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@jczhong84 jczhong84 merged commit 4c3d1b6 into pinterest:master Sep 10, 2025
3 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.

2 participants