Skip to content
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
02e8d4d
initial gitpod instructions
reshamas Feb 27, 2023
a30de8f
update url
reshamas Feb 27, 2023
fbabe67
spelling
reshamas Feb 28, 2023
d5ceff2
Merge branch 'main' of github.com:pymc-devs/pymc into rs-gitpod
reshamas Mar 2, 2023
cade7c5
Merge branch 'rs-gitpod' of github.com:reshamas/pymc into rs-gitpod
reshamas Mar 2, 2023
000e6cb
more instructions on gitpod
reshamas Mar 2, 2023
4d50352
new line at end of file
reshamas Mar 2, 2023
55d66b0
fix trailing whitespace
reshamas Mar 2, 2023
e4c63c3
fix trailing whitespace
reshamas Mar 2, 2023
3b33f9e
fix trailing whitespace
reshamas Mar 2, 2023
092a0bd
fix wording
reshamas Mar 2, 2023
f455036
try image
reshamas Mar 2, 2023
63d4d16
try sphinx image code
reshamas Mar 3, 2023
f30f7a6
add link format
reshamas Mar 3, 2023
78be28b
add link format
reshamas Mar 3, 2023
cc2f5bb
add link format
reshamas Mar 3, 2023
3ccafa5
add link format
reshamas Mar 3, 2023
d1d35e4
try html for image
reshamas Mar 3, 2023
6804bc6
add blank line
reshamas Mar 3, 2023
ba5636c
try image code
reshamas Mar 3, 2023
b9029ae
spacing, fix commit errors
reshamas Mar 3, 2023
645ec95
backticks
reshamas Mar 3, 2023
9b804c2
try image option again
reshamas Mar 3, 2023
c267466
terminal instructions
reshamas Mar 5, 2023
70731bf
Merge branch 'rs-gitpod' of github.com:reshamas/pymc into rs-gitpod
reshamas Mar 5, 2023
cbb5c1e
clarify instructions
reshamas Mar 5, 2023
234d6df
fix image agai
reshamas Mar 5, 2023
8b362ed
fix precommit spacing errors
reshamas Mar 5, 2023
e07c7f6
try admonition
reshamas Mar 5, 2023
a6f3573
try double indent
reshamas Mar 5, 2023
1a893ec
resize image
reshamas Mar 5, 2023
3b5c6c4
pre-commit error
reshamas Mar 5, 2023
6fc083e
add workspace image
reshamas Mar 5, 2023
967ec24
clean up formatting
reshamas Mar 5, 2023
df7652c
fix pre-commit error
reshamas Mar 5, 2023
848bd37
fix pre-commit error
reshamas Mar 5, 2023
961aa5f
pre-commit error
reshamas Mar 5, 2023
b4e9c79
use generic user name
reshamas Mar 5, 2023
8ab9af5
Merge branch 'main' of github.com:pymc-devs/pymc into rs-gitpod
reshamas Mar 6, 2023
fe91317
indent note
reshamas Mar 8, 2023
75913af
use console instead of bash for backticks content
reshamas Mar 8, 2023
f5c67c8
indent list
reshamas Mar 8, 2023
fe9b3ac
verb grammar
reshamas Mar 8, 2023
293fcfc
use console instead of bash
reshamas Mar 8, 2023
c2ddb79
Merge branch 'main' of github.com:pymc-devs/pymc into rs-gitpod
reshamas Mar 8, 2023
514fbc6
Merge branch 'rs-gitpod' of github.com:reshamas/pymc into rs-gitpod
reshamas Mar 8, 2023
cd9ae23
clean up text
reshamas Mar 8, 2023
ea82e46
clean up text and formatting
reshamas Mar 8, 2023
5b714b5
indent
reshamas Mar 8, 2023
0b8e0a0
indent
reshamas Mar 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/source/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ implementing_distribution
build_docs
running_the_test_suite
review_pr_pymc_examples
using_gitpod
:::

:::{toctree}
Expand Down
129 changes: 129 additions & 0 deletions docs/source/contributing/using_gitpod.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
(using_gitpod)=
# Using Gitpod

## About Gitpod
[Gitpod](https://www.gitpod.io/) 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](https://github.com/pymc-devs/pymc) repo.

### Gitpod Workflow

1. Fork the pymc repo: [https://github.com/pymc-devs/pymc](https://github.com/pymc-devs/pymc)

2. Create a Gitpod account. You can login and authorize access via your GitHub account: [https://gitpod.io/](https://gitpod.io/)

:::{note}
Gitpod will show up as an authorized application in your GitHub account here: [https://github.com/settings/applications](https://github.com/settings/applications)
:::

3. Grant GitHub / Gitpod integration permissions.

a) Go to: [https://gitpod.io/user/integrations](https://gitpod.io/user/integrations)

b) Select GitHub and then "Edit Permissions"

c) Select these permission: `user:email`, `public_repo`, `repo`, `workflow`

:::{figure-md} Gitpod integration

![gitpod_integration](gitpod/gitpod_integration.png)

Gitpod [integration options](https://gitpod.io/user/integrations)
:::

4. Within Gitpod, create a ["New Workspace"](https://gitpod.io/workspaces). 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".

:::{figure-md} Gitpod workspace

![gitpod_workspace](gitpod/gitpod_workspace.png)

Gitpod [workspace](https://gitpod.io/workspaces)
:::

:::{note}
Gitpod will pull a container and set up the workspace. It will take a few minutes for the container to build.
:::

5. 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:

```console
(base) gitpod@reshamas-pymc-0ygu5rf74md:/workspace/pymc$
```

:::{note}
This working environment has been set up with [micromamba](https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html) which is a small, pure-C++ executable with enough functionalities to bootstrap fully functional conda-environments.
:::

6. Check that your git remotes are correct with `git remote -v` at the terminal.

Example:

```console
(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$
```

7. Check which version of python and pymc are being used at the terminal.

Check the version of pymc: `pip list | grep pymc`

Example:

```console
(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: `python3 --version`

Example:

```console
(base) gitpod@reshamas-pymc-vpfb4pvr90z:/workspace/pymc$ python3 --version
Python 3.11.0
```

### Reminder: Git Workflow

:::{attention}
At the terminal, before beginning work, remember to create a feature branch:

```console
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`
:::

### Gitpod Notes

#### Billing
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](https://gitpod.io/user/billing).

:::{caution}
Be sure to check out the Gitpod policies on [Workspace Deletion](https://www.gitpod.io/docs/configure/workspaces/workspace-lifecycle#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.
:::