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

Add support for setting up Python through renv #15

Merged
merged 133 commits into from
May 26, 2023

Conversation

milanmlft
Copy link

It's now possible to create new lessons with Python support added using create_lesson(..., add_python = TRUE). The Python environment is controlled by renv and the existing sandpaper functions such as manage_deps() will take Python dependencies into account.

Also adds two helper functions:

  • use_python() sets up Python environment in existing lesson
  • py_install("<package>") installs Python packages in the correct environment and records them in "requirements.txt"

Closes #12
See also carpentries#448

Current known problems

sandpaper::update_cache() does not play nicely yet with this implementation; when a Python package is recorded in requirements.txt but not installed, calling update_cache() will not install the Python dependency and overwrite the requirements.txt file, removing the dependency.

zkamvar and others added 30 commits March 16, 2023 07:55
Provision references.md to fix Glossary 404; Maintainer QOL improvements
allow references file to be included in dropdown
there was an issue with numbered list
update function name in the text to match code block
…2023-03

update workflows to give explicit permissions
@milanmlft milanmlft marked this pull request as ready for review May 23, 2023 10:05
@sabaferdous12 sabaferdous12 merged commit eddf254 into LearnToDiscover:l2d May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Streamline Python setup for lessons
7 participants