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
ENH: Add Dockerfile for development inside a container (#1527)
* Add Dockerfile for development inside a container
* Use /Users/austin for portability
* Put Dockerfile with scripts
* Add script for starting development Docker container
* Really add script this time
* Modify options to create_testenv.sh
* Shift while parsing arguments
* Update dockerfile to run test suite
* Add documentation for docker
* Typo
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+27-8Lines changed: 27 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,17 +11,17 @@ There are 4 main ways of contributing to the PyMC3 project (in descending order
11
11
12
12
# Opening issues
13
13
14
-
We appreciate being notified of problems with the existing PyMC code. We prefer that issues be filed the on [Gitub Issue Tracker](https://github.com/pymc-devs/pymc3/issues), rather than on social media or by direct email to the developers.
14
+
We appreciate being notified of problems with the existing PyMC code. We prefer that issues be filed the on [Gitub Issue Tracker](https://github.com/pymc-devs/pymc3/issues), rather than on social media or by direct email to the developers.
15
15
16
16
Please verify that your issue is not being currently addressed by other issues or pull requests by using the GitHub search tool to look for key words in the project issue tracker.
17
17
18
18
# Contributing code via pull requests
19
19
20
-
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.
20
+
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.
21
21
22
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.
23
23
24
-
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.
24
+
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.
25
25
26
26
## Steps:
27
27
@@ -33,13 +33,13 @@ The preferred workflow for contributing to PyMC3 is to fork the [GitHUb reposito
3. Create a ``feature`` branch to hold your development changes:
38
38
39
39
```bash
40
40
$ git checkout -b my-feature
41
41
```
42
-
42
+
43
43
Always use a ``feature`` branch. It's good practice to never routinely work on the ``master`` branch of any repository.
44
44
45
45
4. Develop the feature on your feature branch. Add changed files using ``git add`` and then ``git commit`` files:
@@ -63,11 +63,12 @@ We recommended that your contribution complies with the following guidelines bef
63
63
64
64
* If your pull request addresses an issue, please use the pull request title to describe the issue and mention the issue number in the pull request description. This will make sure a link back to the original issue is created.
65
65
66
-
* All public methods must have informative docstrings with sample usage presented as doctests when appropriate.
66
+
* All public methods must have informative docstrings with sample usage when appropriate.
67
67
68
68
* Please prefix the title of incomplete contributions with `[WIP]` (to indicate a work in progress). WIPs may be useful to (1) indicate you are working on something to avoid duplicated work, (2) request broad review of functionality or API, or (3) seek collaborators.
69
69
70
-
* All other tests pass when everything is rebuilt from scratch.
70
+
* All other tests pass when everything is rebuilt from scratch. See
71
+
[Developing in Docker](#Developing-in-Docker) for information on running the test suite locally.
71
72
72
73
* When adding additional functionality, provide at least one example script or Jupyter Notebook in the ``pymc3/examples/`` folder. Have a look at other examples for reference. Examples should demonstrate why the new functionality is useful in practice and, if possible, compare it to other methods available in PyMC3.
73
74
@@ -104,9 +105,27 @@ tools:
104
105
$ autopep8 path/to/pep8.py
105
106
```
106
107
108
+
## Developing in Docker
109
+
110
+
We have provided a Dockerfile which helps for isolating build problems, and local development.
111
+
Install [Docker](https://www.docker.com/) for your operating system, clone this repo, then
112
+
run `./scripts/start_container.sh`. This should start a local docker container called `pymc3`,
113
+
as well as a [`jupyter`](http://jupyter.org/) notebook server running on port 8888. The repo
114
+
will be running the code from your local copy of `pymc3`, so it is good for development. You may
115
+
also use it to run the test suite, with
116
+
117
+
```bash
118
+
$ docker exec -it pymc3 bash # logon to the container
119
+
$ cd~/pymc3
120
+
$ . ./scripts/test.sh # takes a while!
121
+
```
122
+
123
+
This should be quite close to how the tests run on TravisCI.
124
+
125
+
107
126
## Style guide
108
127
109
128
Follow [TensorFlow's style guide](https://www.tensorflow.org/versions/master/how_tos/style_guide.html) or the [Google style guide](https://google.github.io/styleguide/pyguide.html) for writing code, which more or less follows PEP 8.
110
129
111
130
112
-
#### This guide was derived from the [scikit-learn guide to contributing](https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md)
131
+
#### This guide was derived from the [scikit-learn guide to contributing](https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md)
0 commit comments