Skip to content

Commit edddb2c

Browse files
ColCarrolltwiecki
authored andcommitted
Split up requirements, update CONTRIBUTING.md (#2208)
* Split up requirements, update CONTRIBUTING.md * Add nose parameterized for theano tests * Pare down requirements even more
1 parent 6fe51e5 commit edddb2c

File tree

4 files changed

+45
-22
lines changed

4 files changed

+45
-22
lines changed

CONTRIBUTING.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,20 @@ Please verify that your issue is not being currently addressed by other issues o
1919

2020
While issue reporting is valuable, we strongly encourage users who are inclined to do so to submit patches for new or existing issues via pull requests. This is particularly the case for simple fixes, such as typos or tweaks to documentation, which do not require a heavy investment of time and attention.
2121

22-
Contributors are also encouraged to contribute new code to enhance PyMC's functionality, also via pull requests. Please consult the [PyMC3 documentation](https://pymc-devs.github.io/pymc3/) to ensure that any new contribution does not strongly overlap with existing functionality.
22+
Contributors are also encouraged to contribute new code to enhance PyMC3's functionality, also via pull requests. Please consult the [PyMC3 documentation](https://pymc-devs.github.io/pymc3/) to ensure that any new contribution does not strongly overlap with existing functionality.
2323

2424
The preferred workflow for contributing to PyMC3 is to fork the [GitHUb repository](https://github.com/pymc-devs/pymc3/), clone it to your local machine, and develop on a feature branch.
2525

2626
## Steps:
2727

2828
1. Fork the [project repository](https://github.com/pymc-devs/pymc3/) by clicking on the 'Fork' button near the top right of the main repository page. This creates a copy of the code under your GitHub user account.
2929

30-
2. Clone your fork of the PyMC3 repo from your GitHub account to your local disk:
30+
2. Clone your fork of the PyMC3 repo from your GitHub account to your local disk, and add the base repository as a remote:
3131

3232
```bash
3333
$ git clone [email protected]:<your GitHub handle>/pymc3.git
34-
$ cd pymc3-learn
34+
$ cd pymc3
35+
$ git remote add upstream [email protected]:pymc-devs/pymc3.git
3536
```
3637

3738
3. Create a ``feature`` branch to hold your development changes:
@@ -42,20 +43,36 @@ The preferred workflow for contributing to PyMC3 is to fork the [GitHUb reposito
4243

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

45-
4. Develop the feature on your feature branch. Add changed files using ``git add`` and then ``git commit`` files:
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](http://python-guide-pt-br.readthedocs.io/en/latest/dev/virtualenvs/)) run:
47+
48+
```bash
49+
$ pip install -r requirements.txt
50+
$ pip install -r requirements-dev.txt
51+
```
52+
53+
Alternatively, there is a script to create a docker environment for development. See: [Developing in Docker](#Developing-in-Docker).
54+
55+
5. Develop the feature on your feature branch. Add changed files using ``git add`` and then ``git commit`` files:
4656

4757
```bash
4858
$ git add modified_files
4959
$ git commit
5060
```
5161

52-
to record your changes in Git locally, then push the changes to your GitHub account with:
62+
to record your changes locally.
63+
After committing, it is a good idea to sync with the base repository in case there have been any changes:
64+
```bash
65+
$ git fetch upstream
66+
$ git rebase upstream/master
67+
```
68+
69+
Then push the changes to your GitHub account with:
5370

5471
```bash
5572
$ git push -u origin my-feature
5673
```
5774

58-
5. Go to the GitHub web page of your fork of the PyMC3 repo. Click the 'Pull request' button to send your changes to the project's maintainers fo review. This will send an email to the committers.
75+
6. Go to the GitHub web page of your fork of the PyMC3 repo. Click the 'Pull request' button to send your changes to the project's maintainers for review. This will send an email to the committers.
5976

6077
## Pull request checklist
6178

@@ -96,8 +113,8 @@ tools:
96113
* No PEP8 warnings, check with:
97114

98115
```bash
99-
$ pip install pep8
100-
$ pep8 path/to/module.py
116+
$ pip install pycodestyle
117+
$ pycodestyle path/to/module.py
101118
```
102119

103120
* AutoPEP8 can help you fix some of the easy redundant errors:

requirements-dev.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
numpy>=1.11.0
2+
scipy>=0.12.0
3+
h5py>=2.7.0
4+
numdifftools>=0.9.20
5+
CommonMark>=0.5.4
6+
recommonmark>=0.4.0
7+
sphinx>=1.5.5
8+
nbsphinx>=0.2.13
9+
pytest>=3.0.7
10+
pytest-cov>=2.5.1
11+
mock>=2.0.0; python_version < '3.4'
12+
pyflakes>=1.5.0
13+
pycodestyle>=2.3.1
14+
nose-parameterized==0.6.0

requirements.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
numpy>=1.11.0
2-
scipy>=0.12.0
31
matplotlib>=1.5.0
42
theano>=0.9.0
53
pandas>=0.18.0
64
patsy>=0.4.0
75
joblib>=0.9
86
tqdm>=4.8.4
9-
CommonMark==0.5.4
10-
recommonmark
11-
sphinx
12-
nbsphinx
13-
numdifftools
14-
six
15-
h5py
7+
six>=1.10.0
8+
enum34>=1.1.6; python_version < '3.4'

scripts/create_testenv.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,17 @@ then
3535
fi
3636

3737
pip install jupyter
38-
conda install --yes pyqt matplotlib --channel conda-forge
39-
conda install --yes pyzmq numpy scipy pytest pytest-cov pandas Cython patsy statsmodels joblib coverage mkl-service
38+
conda install --yes matplotlib --channel conda-forge
39+
conda install --yes numpy scipy pytest pytest-cov pandas patsy joblib mkl-service
4040
if [ ${PYTHON_VERSION} == "2.7" ]; then
4141
conda install --yes mock enum34;
4242
fi
4343

4444
pip install --upgrade pip
4545
pip install --no-deps numdifftools
4646
pip install git+https://github.com/Theano/Theano.git
47-
pip install tqdm h5py parameterized
47+
pip install tqdm h5py nose-parameterized==0.6.0
4848

49-
if [ -z ${NO_SETUP} ]
50-
then
49+
if [ -z ${NO_SETUP} ]; then
5150
python setup.py build_ext --inplace
5251
fi

0 commit comments

Comments
 (0)