Gitpod is a browser-based development environment.
These are some benefits to using Gitpod:
Bypass local computer configuration and technical issues
Save time by using a pre-configured virtual environment for contributing to open source
Save space on your local computer
Using Gitpod to Contribute to PyMC#
These instructions are for contributing specifically to the pymc-devs/pymc repo.
Fork the pymc repo: pymc-devs/pymc
Create a Gitpod account. You can login and authorize access via your GitHub account: https://gitpod.io/
Gitpod will show up as an authorized application in your GitHub account here: settings/applications
Grant GitHub / Gitpod integration permissions.
a) Go to: https://gitpod.io/user/integrations
b) Select GitHub and then “Edit Permissions”
c) Select these permission:
Within Gitpod, create a “New Workspace”. Here you will want to select the forked pymc repo. If you do not see it, you can paste your forked repo path into the “Context URL” box. For example:
https://github.com/yourusername/pymc. Then select “New Workspace”.
Gitpod will pull a container and set up the workspace. It will take a few minutes for the container to build.
Once Gitpod is up and running, the interface is similar to a Visual Studio Code (VSC) interface, which will appear in your browser. You will observe installation notices in the terminal window. This can take 5-10 minutes. Once that is complete, the terminal will indicate you are on the “(base)” environment on Gitpod with your forked repo.
Here is an example:
This working environment has been set up with micromamba which is a small, pure-C++ executable with enough functionalities to bootstrap fully functional conda-environments.
Check that your git remotes are correct with
git remote -vat the terminal.
(base) gitpod@reshamas-pymc-0ygu5rf74md:/workspace/pymc$ git remote -v origin https://github.com/reshamas/pymc.git (fetch) origin https://github.com/reshamas/pymc.git (push) upstream https://github.com/pymc-devs/pymc.git (fetch) upstream https://github.com/pymc-devs/pymc.git (push) (base) gitpod@reshamas-pymc-0ygu5rf74md:/workspace/pymc$
Check which version of python and pymc are being used at the terminal.
Check the version of pymc:
pip list | grep pymc
(base) gitpod@reshamas-pymc-vpfb4pvr90z:/workspace/pymc$ pip list | grep pymc pymc 5.1.0 /workspace/pymc pymc-sphinx-theme 0.1
Check the version of python:
(base) gitpod@reshamas-pymc-vpfb4pvr90z:/workspace/pymc$ python3 --version Python 3.11.0
Reminder: Git Workflow#
At the terminal, before beginning work, remember to create a feature branch:
git checkout -b feature-branch
After working on a file, follow the Git workflow:
git add file_name
git commit -m 'message'
git push origin feature-branch
The Gitpod free plan currently allows 500 free credits per month, which is 50 hours of standard workspace usage. Usage information can be found in the Gitpod billing section.
Be sure to check out the Gitpod policies on Workspace Deletion and learn more about:
“Starting” & “Stopping” workspaces
“Workplace Inactivity”: By default, workspaces stop following 30 minutes without user input (e.g. keystrokes or terminal input commands). You can increase the workspace timeout up to a maximum of 24 hours.
Workspaces are deleted after 14 days. Pinned workspaces are never deleted automatically.
You can pin a workspace from your workspace list in the Gitpod dashboard.