Skip to content
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

Keep user venv a subset of the author venv #17

Open
mwermelinger opened this issue Aug 7, 2023 · 0 comments
Open

Keep user venv a subset of the author venv #17

mwermelinger opened this issue Aug 7, 2023 · 0 comments
Labels
priority: low type: idea Issue not yet fully specified

Comments

@mwermelinger
Copy link
Member

Follow a process, preferably w/ a Unix script, to create the book authoring venv (virtual environment) and keep it in sync with the book's user (student/AL) venv. The script could take the presentation year YY as argument and:

  • create a ~/venvs/book-YYJ venv and activate it
  • pip install rise matplotlib networkx to install latest versions of Jupyter et al
  • pip freeze > user.txt
  • pip install pytype nbsphinx sphinx_rtd_theme to also install latest sphinx
  • pip freeze > author.txt
  • create aliases to activate user and author environments (or defer this to the installation script, see below)

While updating the book, up/downgrade packages and install new ones as needed, updating author.txt.
Then use diff user.txt author.txt | fgrep '<' to find out which user packages need to be updated to match the author version.

Update the installation scripts to use user.txt instead of requirements.txt. Update the Unix script to install the pytype version in author.txt.

(This is all a bit too manual, would be good to automate more.)

The installation script could take an option (or simply ask the user if they want) to additionally install the authoring environment. This could be handy if I need to reinstall the venv of if someone else in the module team also needs the author venv.

@mwermelinger mwermelinger added priority: low type: idea Issue not yet fully specified labels Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low type: idea Issue not yet fully specified
Projects
None yet
Development

No branches or pull requests

1 participant