-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Per notebook requirements.txt #96
Comments
@yarikoptic yes this is possible! But it works slightly differently from how you described -- the idea is that E.g., if the
you could get rid of that file entirely and replace your import statements in the notebook with:
When the notebook is run,
in each notebook, before your |
that is what I was hoping to avoid -- to need modifying import statements ;-) |
i bet "someone" could write a script to:
%pip install davos
import davos
|
I did something like this for the neuromatch materials-- e.g. here's a script for going through a bunch of folders and adding an "install davos" cell (plus some other stuff...but you could lightly tweak it to do what you want): https://github.com/ContextLab/course-content/blob/main/chatify/process_notebooks.py |
but that is what I wondered to avoid by just some top level magic to e.g. shim the |
we were generally uncomfortable with the idea of "replacing" or "co-opting" an existing keyword, hence the current design. but in principle i agree that it'd be neat to retain the same code in some circumstances. we chose to prioritize making it explicit when things were being run through davos vs. when the "original" keyword was being used. |
Is davos would be something to help us to setup per notebook venv? e.g. in https://github.com/dandi/example-notebooks/ we have some notebooks with specific requirements.txt:
and it would be great if we could just use smth like
and then
davos
would do the magic to ensure that all followup imports would happen from the environment which was configured according to thatrequirements.txt
. Is that possible?backref on issue which inspired the question: dandi/handbook#95
The text was updated successfully, but these errors were encountered: