- Install uv on your machine
- Clone this repo to your own machine using
git cloneor GitHub Desktop - Open in Positron / RStudio / VSCode
- Run
uv syncin terminal - You may have to reopen the project to activate the environment for the notebook, or run
source .venv/bin/activatein terminal - Open the
ipynbfile, make sure that the right kernel is open (should be Python 13.2 with the name of your environment, which should be "(mcr_python)") - Try running everything in the notebook!
- In Positron, I made a new folder from template, using the python Template
- Run
uv initin terminal - Add packages using
uv add <package>such asuv add geopandas git initto initialize a git repogit add .andgit commit -m "starting"- Publish to a remote using GitHub Desktop Publish.
If you are the in the middle of analysis, you might not have had the chance to use uv, or you just learned about it. There is a path to making your analysis reproducible:
- Using
pip freeze > requirements.txtwill get you part of the way there, - Or in your notebook use:
session_info.show(na=True, os=True, cpu=False, jupyter=None,
dependencies=None, write_req_file=True,
req_file_name="requirements.txt") using the session-info package (note that the package name is a hyphen, not an underscore, and module uses an underscore). This will create a requirements.txt file in your folder.
- Run
uv initin terminal, which will create youruv.lockand your.venvdirectory. - Run
uv add -r requirements.txt- this will install everything and modify youruv.lockfile git add .andgit commit. Push to GitHub using Github Desktop.- Test it out by cloning and using the process above.
- I used the
quarto use bindercommand after making this a quarto project usingquarto create project, then committed everything.