Skip to content

Implement better dependency tracking for ipynb.fs.defs #11

Description

@yuvipanda

Right now, we only include assignments where the LHS is all caps. However, LHS all caps might have dependencies on RHS that's not all caps. These will not be evaluated, causing strange amounts of confusion.

Instead, we should attempt to track the dependencies on the RHS of such assignments, and eval those too (recursively). We should do this in such a way that the rules are very clear to explain to people.

This should still only be done for top level imports though.

Activity

  1. yuvipanda commented on Nov 8, 2016

    @yuvipanda
    CollaboratorAuthor

    Hmm, can we get away with supporting only top-level things? What do we do with:

    if a == 5:
        b = 6
    
    C = b * 5

    In this case I'll have to include all the the code, including the if (and the dependent a definition, wherever that comes from).

  2. yuvipanda commented on Nov 8, 2016

    @yuvipanda
    CollaboratorAuthor

    And what do you do with:

    if a == 5:
        b = 6
    else:
        b = 9
        doSomethingReallyExpensiveWithLotsOfSideEffects()
    
    C = b * 5

    Do we strip out doSomethingReallyExpensiveWithLotsOfSideEffects() but leave b = 9? That seems like very unintuitive behavior.

  3. yuvipanda commented on Nov 10, 2016

    @yuvipanda
    CollaboratorAuthor

    @ellisonbg suggested we use notebook tags, and I like that much better than magical solutions that involve AST munging or bytecode disassembly.

  4. parente commented on Nov 10, 2016

    @parente
    Member

    FWIW, we went down the same introspection path in https://github.com/jupyter-incubator/contentmanagement and instead backed off to using comment syntax as a stopgap tagging UI.

  5. added a commit that references this issue on Jan 2, 2020
    d5c86ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions