Skip to content

Commit d1e0347

Browse files
committed
contribution page
1 parent 0a38a36 commit d1e0347

File tree

2 files changed

+74
-6
lines changed

2 files changed

+74
-6
lines changed

CONTRIBUTING.md

Lines changed: 74 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Thank you for your interest in contributing to PyMC and PyMC-experimental!
55
This page outlines the steps to follow if you wish to contribute to the pymc-experimental repo and clone the repo locally.
66

77
## Install locally
8-
**1**: Create a folder `pymc-devs` in your local machine and follow the [cloning PyMC locally](https://www.pymc.io/projects/docs/en/latest/contributing/pr_tutorial.html).
8+
**1**: Create a folder `pymc-devs` in your local machine and follow the steps on [cloning PyMC locally](https://www.pymc.io/projects/docs/en/latest/contributing/pr_tutorial.html).
99

1010
Since PyMC-experimental should integrate with the latest version of PyMC, it is recommended that any development work on PyMC-experimental must also work with the latest version of PyMC.
1111

@@ -19,27 +19,95 @@ cd pymc-experimental
1919
git remote add upstream [email protected]:pymc-devs/pymc-experimental.git
2020
```
2121

22+
You should now have a local copy of PyMC-experimental under `pymc-devs/pymc-experimental`.
23+
2224
Create a new conda environment by first installing the dependencies in the main PyMC repo:
2325
```
2426
conda env create -n pymc-experimental -f /path/to/pymc-devs/pymc/conda-envs/environment-dev.yml
2527
conda activate pymc-experimental
2628
pip install -e /path/to/pymc-devs/pymc
2729
2830
# ignores the specific pymc version to install pymc-experimental
29-
pip install -e /path/to/pymc-devs/pymc-experimental --no-deps --ignore-installed pymc
31+
pip install -e /path/to/pymc-devs/pymc-experimental --ignore-installed pymc
32+
```
33+
34+
**3** Check origin and upstream is correct.
35+
36+
**PyMC**
37+
```
38+
cd /path/to/pymc-devs/pymc
39+
git remote -v
40+
```
41+
Output:
42+
```
43+
origin [email protected]:<your GitHub handle>/pymc.git (fetch)
44+
origin [email protected]:<your GitHub handle>/pymc.git (push)
45+
upstream [email protected]:pymc-devs/pymc.git (fetch)
46+
upstream [email protected]:pymc-devs/pymc.git (push)
3047
```
3148

32-
## Develop the feature
49+
**PyMC-experimental**
50+
```
51+
cd /path/to/pymc-devs/pymc-experimental
52+
git remote -v
53+
```
54+
Output:
55+
```
56+
origin [email protected]:<your GitHub handle>/pymc-experimental.git (fetch)
57+
origin [email protected]:<your GitHub handle>/pymc-experimental.git (push)
58+
upstream [email protected]:pymc-devs/pymc-experimental.git (fetch)
59+
upstream [email protected]:pymc-devs/pymc-experimental.git (push)
60+
```
61+
62+
63+
64+
## Git integration [(from PyMC's main page)](https://www.pymc.io/projects/docs/en/latest/contributing/pr_tutorial.html)
3365

3466
**1** Develop the feature on your feature branch:
3567
```
3668
git checkout -b my-exp-feature
3769
```
3870

71+
**2** Before committing, run pre-commit checks:
72+
```
73+
pip install pre-commit
74+
pre-commit run --all # 👈 to run it manually
75+
pre-commit install # 👈 to run it automatically before each commit
76+
```
77+
78+
**3** Add changed files using git add and then git commit files:
79+
```
80+
git add modified_files
81+
git commit
82+
```
83+
to record your changes locally.
3984

85+
**4** After committing, it is a good idea to sync with the base repository in case there have been any changes:
86+
```
87+
# pymc
88+
cd /path/to/pymc-devs/pymc
89+
git fetch upstream
90+
git rebase upstream/main
4091
41-
You should now have a local copy of PyMC-experimental under `pymc-devs/pymc-experimental`.
92+
# (pymc-dev team) Please double check this
93+
pip install -e /path/to/pymc-devs/pymc
94+
95+
# pymc-exp
96+
cd /path/to/pymc-devs/pymc-experimental
97+
git fetch upstream
98+
git rebase upstream/main
99+
```
100+
Then push the changes to the fork in your GitHub account with:
101+
```
102+
git push -u origin my-exp-feature
103+
```
104+
105+
**5** Go to the GitHub web page of your fork of the PyMC repo. Click the ‘Pull request’ button to send your changes to the project’s maintainers for review. This will send a notification to the committers.
106+
107+
## Final steps
108+
109+
Review contributing guide in [PyMC's main page](https://www.pymc.io/projects/docs/en/latest/contributing/index.html).
42110

43-
**Final steps**: Review contributing guide in [PyMC's main page](https://www.pymc.io/projects/docs/en/latest/contributing/index.html).
111+
FAQ [page](https://github.com/pymc-devs/pymc-experimental#questions).
44112

45-
Page in construction, for now go to https://github.com/pymc-devs/pymc-experimental#questions.
113+
Discussions [page](https://github.com/pymc-devs/pymc-experimental/discussions/5).

a.out

Whitespace-only changes.

0 commit comments

Comments
 (0)