-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
Use individual notebook requirements #606
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
for more information, see https://pre-commit.ci
…is in single cell" This reverts commit 02a05d6.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I think this will be a good change for users!
I'd like to discuss one implication of this change, which is that in this new way of managing requirements, pinning dependencies now requires updating many files. It would be nice if we didn't have to keep track of this. But I can't think of a better way of managing that! Thoughts?
Relatedly, I can see a use case (at least for us as developers) for wanting to be able to install all dependencies in one go. The old top-level requirements.txt file provided this. Would it make sense to provide a makefile command that just loops through all of the tutorial directories and installs all requirements?
Yes it's a good idea! Unfortunately there are a few cases where the version for the same requirement differs, making it hard to have a single, top-level set of requirements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jeffjennings -- LGTM!
Removes the top-level
requirements.txt
in favor of individualrequirements.txt
specified in each folder intutorials
.Applies these individual requirements in the
execute
andconvert
commands of theMakefile
. There, packages are force re-installed (not re-installed if the cache already contains the same version) for each group of notebooks (a group is the set of notebooks in each folder intutorials
).Adds a cell near the top of each notebook specifying the required packages to run the notebook (pulled from the relevant
requirements.txt
.Note to reviewer: The diffs for the notebook files are showing changes to metadata, even though it seems like the pre-commit is supposed to strip that. The only change to each notebook file is the addition of the cell printing the required packages (and in a few cases the consolidation of markdown cells at the top of the notebook that constitute the preamble, to adhere to the 'Template intro guide' in case some search indexing is done that assumes the entire preamble is contained in the first cell).
Closes #601