You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+13-24Lines changed: 13 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -38,19 +38,27 @@ The preferred workflow for contributing to PyMC3 is to fork the [GitHub reposito
38
38
3. Create a ``feature`` branch to hold your development changes:
39
39
40
40
```bash
41
-
$ git checkout -b my-feature
41
+
$ git switch -c my-feature
42
42
```
43
43
44
44
Always use a ``feature`` branch. It's good practice to never routinely work on the ``master`` branch of any repository.
45
45
46
-
4. Project requirements are in ``requirements.txt``, and libraries used for development are in ``requirements-dev.txt``. To set up a development environment, you may (probably in a [virtual environment](https://docs.python-guide.org/dev/virtualenvs/)) run:
46
+
4. Project requirements are in ``requirements.txt``, and libraries used for development are in ``requirements-dev.txt``. The easiest (and recommended) way to set up a development environment is via [miniconda](https://docs.conda.io/en/latest/miniconda.html):
47
+
48
+
```bash
49
+
$ conda env create -f environment-dev.yml
50
+
$ conda activate testenv
51
+
$ pip install -e .
52
+
```
53
+
54
+
_Alternatively_ you may (probably in a [virtual environment](https://docs.python-guide.org/dev/virtualenvs/)) run:
47
55
48
56
```bash
49
-
$ pip install -r requirements.txt
57
+
$ pip install -e .
50
58
$ pip install -r requirements-dev.txt
51
59
```
52
60
53
-
Alternatively, there is a script to create a docker environment for development. See: [Developing in Docker](#Developing-in-Docker).
61
+
Yet another alternative is to create a docker environment for development. See: [Developing in Docker](#Developing-in-Docker).
54
62
55
63
5. Develop the feature on your feature branch. Add changed files using ``git add`` and then ``git commit`` files:
56
64
@@ -103,26 +111,7 @@ tools:
103
111
$ pytest --cov=pymc3 pymc3/tests/<name of test>.py
104
112
```
105
113
106
-
* No `pyflakes` warnings, check with:
107
-
108
-
```bash
109
-
$ pip install pyflakes
110
-
$ pyflakes path/to/module.py
111
-
```
112
-
113
-
* No PEP8 warnings, check with:
114
-
115
-
```bash
116
-
$ pip install pycodestyle
117
-
$ pycodestyle path/to/module.py
118
-
```
119
-
120
-
* AutoPEP8 can help you fix some of the easy redundant errors:
121
-
122
-
```bash
123
-
$ pip install autopep8
124
-
$ autopep8 path/to/pep8.py
125
-
```
114
+
* No `pre-commit` errors: see the [Python code style](https://github.com/pymc-devs/pymc3/wiki/PyMC3-Python-Code-Style) and [Jupyter Notebook style](https://github.com/pymc-devs/pymc3/wiki/PyMC's-Jupyter-Notebook-Style) page from our Wiki on how to install and run it.
0 commit comments