Skip to content

Commit 441828d

Browse files
committed
update contributing
1 parent 162fd92 commit 441828d

File tree

4 files changed

+28
-42
lines changed

4 files changed

+28
-42
lines changed

.github/workflows/arviz_compat.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,15 @@ jobs:
3838
channel-priority: strict
3939
environment-file: environment-dev.yml
4040
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
41-
- run: |
41+
- name: Install pymc3
42+
run: |
4243
conda activate testenv
43-
conda remove arviz -y
44+
pip install -e .
45+
- name: Install latest arviz
46+
run: |
47+
conda activate testenv
48+
pip uninstall arviz -y
4449
pip install git+git://github.com/arviz-devs/arviz.git
50+
- name: Run tests
51+
run: |
4552
python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET

.github/workflows/pytest.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,12 @@ jobs:
7878
channel-priority: strict
7979
environment-file: environment-dev.yml
8080
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
81-
- run: |
81+
- name: Install-pymc3
82+
run: |
83+
conda activate testenv
84+
pip install -e .
85+
- name: Run tests
86+
run: |
8287
conda activate testenv
8388
python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
8489
- name: Upload coverage to Codecov

CONTRIBUTING.md

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,27 @@ The preferred workflow for contributing to PyMC3 is to fork the [GitHub reposito
3838
3. Create a ``feature`` branch to hold your development changes:
3939

4040
```bash
41-
$ git checkout -b my-feature
41+
$ git switch -c my-feature
4242
```
4343

4444
Always use a ``feature`` branch. It's good practice to never routinely work on the ``master`` branch of any repository.
4545

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:
4755

4856
```bash
49-
$ pip install -r requirements.txt
57+
$ pip install -e .
5058
$ pip install -r requirements-dev.txt
5159
```
5260

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).
5462

5563
5. Develop the feature on your feature branch. Add changed files using ``git add`` and then ``git commit`` files:
5664

@@ -103,26 +111,7 @@ tools:
103111
$ pytest --cov=pymc3 pymc3/tests/<name of test>.py
104112
```
105113

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.
126115

127116
## Developing in Docker
128117

environment-dev.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,9 @@ dependencies:
1313
- fastprogress>=0.2
1414
- h5py>=2.7
1515
- typing-extensions>=3.7
16-
- bokeh>=0.12
17-
- coverage>=5.1
18-
- python-graphviz
1916
- ipython>=7.16
20-
- nbsphinx>=0.4
21-
- nose>=1.3
22-
- nose-parameterized>=0.6
23-
- numpydoc>=0.9
24-
- pre-commit>=2.8.0
2517
- pytest-cov>=2.5
2618
- pytest>=3.0
27-
- recommonmark>=0.4
28-
- seaborn>=0.8
29-
- sphinx-autobuild>=0.7
30-
- sphinx>=1.5
31-
- watermark
32-
- parameterized
33-
- ipywidgets
3419
- dataclasses # python_version < 3.7
3520
- contextvars # python_version < 3.7
3621
- mkl-service

0 commit comments

Comments
 (0)