ContextLab / ContextLab/davos

provide a way to indicate that imported modules should also be parsed for smuggle statements

Open
#12 0 comments 0 reactions 1 assignee Claimed by @paxtonfitzpatrick View on GitHub
enhancement pure Python
Dominant language
TeX
Stars
37
Forks
8
PR merge metrics
No merged PRs in 30d

Description

When we write the pure Python implementation, I think it'd be worth coming up with some way for a user to notate that an imported (or smuggled, I guess) module should be parsed for any smuggle statements it may contain. I think this should only apply at a depth of 1 (i.e., indicating you want to parse an imported module does not cause everything *that* module imports to be parsed). But I could foresee this being useful for a simple setup where you have, say, `main.py`script and `helpers.py` scripts, and you want to smuggle some modules into each.

We could implement this as some sort of comment similar to how you specify installer arguments for smuggled packages, or as some variation on the smuggle statement (`smuggleR` for "smuggle recursive" or something like that).

Also, because you can import pure Python modules from Jupyter/Colab notebooks, we'll want to make this work in IPython as well. This shouldn't be *too* much more complex, but it will mean temporarily reconfiguring the `Davos` object from an IPython setup to a Python setup and back again, probably just via a context manager or something.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.