Skip to content

Split up requirements, update CONTRIBUTING.md #2208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
33 changes: 25 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,20 @@ Please verify that your issue is not being currently addressed by other issues o

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.

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

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.

## Steps:

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.

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

```bash
$ git clone [email protected]:<your GitHub handle>/pymc3.git
$ cd pymc3-learn
$ cd pymc3
$ git remote add upstream [email protected]:pymc-devs/pymc3.git
```

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

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

4. Develop the feature on your feature branch. Add changed files using ``git add`` and then ``git commit`` files:
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:

```bash
$ pip install -r requirements.txt
$ pip install -r requirements-dev.txt
```

Alternatively, there is a script to create a docker environment for development. See: [Developing in Docker](#Developing-in-Docker).

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

```bash
$ git add modified_files
$ git commit
```

to record your changes in Git locally, then push the changes to your GitHub account with:
to record your changes locally.
After committing, it is a good idea to sync with the base repository in case there have been any changes:
```bash
$ git fetch upstream
$ git rebase upstream/master
```

Then push the changes to your GitHub account with:

```bash
$ git push -u origin my-feature
```

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

## Pull request checklist

Expand Down Expand Up @@ -96,8 +113,8 @@ tools:
* No PEP8 warnings, check with:

```bash
$ pip install pep8
$ pep8 path/to/module.py
$ pip install pycodestyle
$ pycodestyle path/to/module.py
```

* AutoPEP8 can help you fix some of the easy redundant errors:
Expand Down
14 changes: 14 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
numpy>=1.11.0
scipy>=0.12.0
h5py>=2.7.0
numdifftools>=0.9.20
CommonMark>=0.5.4
recommonmark>=0.4.0
sphinx>=1.5.5
nbsphinx>=0.2.13
pytest>=3.0.7
pytest-cov>=2.5.1
mock>=2.0.0; python_version < '3.4'
pyflakes>=1.5.0
pycodestyle>=2.3.1
nose-parameterized==0.6.0
11 changes: 2 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
numpy>=1.11.0
scipy>=0.12.0
matplotlib>=1.5.0
theano>=0.9.0
pandas>=0.18.0
patsy>=0.4.0
joblib>=0.9
tqdm>=4.8.4
CommonMark==0.5.4
recommonmark
sphinx
nbsphinx
numdifftools
six
h5py
six>=1.10.0
enum34>=1.1.6; python_version < '3.4'
9 changes: 4 additions & 5 deletions scripts/create_testenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,17 @@ then
fi

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

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

if [ -z ${NO_SETUP} ]
then
if [ -z ${NO_SETUP} ]; then
python setup.py build_ext --inplace
fi