@@ -3,157 +3,121 @@ Contributing
3
3
============
4
4
5
5
Contributions are welcome, and they are greatly appreciated! Every little bit
6
- helps, and credit will always be given. For issues that contributors have
7
- experienced in the past, see the FAQ at the bottom of this document.
6
+ helps, and credit will always be given.
8
7
9
8
You can contribute in many ways:
10
9
11
- Types of Contributions
12
- ----------------------
13
-
14
10
Report Bugs
15
- ~~~~~~~~~~~
16
-
17
- Report bugs using the `issue tracker <https://github.com/opencobra/cobrapy/issues >`__
11
+ ===========
18
12
19
- If you are reporting a bug, please include:
13
+ Report bugs at https://github.com/opencobra/cobrapy/issues.
20
14
21
- * Your operating system name and version.
22
- * Your Python and cobrapy version.
23
- * Any details about your local setup that might be helpful in troubleshooting.
24
- * Detailed steps to reproduce the bug.
15
+ If you are reporting a bug, please follow the template guide lines. The more
16
+ detailed your report, the easier and thus faster we can help you.
25
17
26
18
Fix Bugs
27
- ~~~~~~~~
19
+ ========
28
20
29
- Look through the GitHub `issues <https://github.com/opencobra/cobrapy/issues >`__
30
- for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants
31
- to implement it.
21
+ Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
22
+ wanted" is open to whoever wants to implement it.
32
23
33
24
Implement Features
34
- ~~~~~~~~~~~~~~~~~~
25
+ ==================
35
26
36
- Look through the GitHub `issues <https://github.com/opencobra/cobrapy/issues >`__
37
- and `projects <https://github.com/opencobra/cobrapy/projects >`__ for features.
38
- Anything tagged with "enhancement" and "help wanted" is open to whoever wants to
39
- implement it.
27
+ Look through the GitHub issues for features. Anything tagged with "enhancement"
28
+ and "help wanted" is open to whoever wants to implement it.
40
29
41
30
Write Documentation
42
- ~~~~~~~~~~~~~~~~~~~
31
+ ===================
43
32
44
33
cobrapy could always use more documentation, whether as part of the official
45
- cobrapy docs , in docstrings, or even on the web in blog posts, articles, and
46
- such - all contributions are welcome!
34
+ documentation , in docstrings, or even on the web in blog posts, articles, and
35
+ such.
47
36
48
37
Submit Feedback
49
- ~~~~~~~~~~~~~~~
38
+ ===============
50
39
51
- The best way to send feedback is to file an
52
- ` issue < https://github.com/opencobra/cobrapy/issues >`__ .
40
+ The best way to send feedback is to file an issue at
41
+ https://github.com/opencobra/cobrapy/issues.
53
42
54
43
If you are proposing a feature:
55
44
56
45
* Explain in detail how it would work.
57
46
* Keep the scope as narrow as possible, to make it easier to implement.
58
- * Remember that this is a volunteer-driven project, and that contributions
59
- are welcome :)
60
-
61
- If you like cobrapy please remember to 'star' our github page (click on the star
62
- at top right corner), that way we also have an idea of who is using cobrapy!
47
+ * Remember that this is a volunteer-driven project, and that contributions are
48
+ welcome :)
63
49
64
50
Get Started!
65
- ------------
66
-
67
- Want to contribute a new feature or improvement? Consider starting by raising an
68
- issue and assign it to yourself to describe what you want to achieve. This way,
69
- we reduce the risk of duplicated efforts and you may also get suggestions on how
70
- to best proceed, e.g. there may be half-finished work in some branch that you
71
- could start with.
72
-
73
- Here's how to set up `cobrapy ` for local development to contribute smaller
74
- features or changes that you can implement yourself.
75
-
76
- 1. Fork the `cobrapy ` repository on GitHub.
77
- 2. Clone your fork locally::
78
-
79
- $ git clone [email protected] :<your Github name>/cobrapy.git
80
-
81
- 3. Install libglpk using your package manager. For macOS::
82
-
83
- $ brew install homebrew/science/glpk
84
-
85
- For Debian-based Linux systems (including Ubuntu and Mint)::
86
-
87
- $ sudo apt-get install libglpk-dev
88
-
89
- 4. If virtualenvwrapper is not installed,
90
- `follow the directions <https://virtualenvwrapper.readthedocs.io/en/latest/ >`__
91
- to install virtualenvwrapper.
92
-
93
- 5. Install your local copy of cobrapy into a virtualenv with virtualenvwrapper::
94
-
95
- $ cd cobrapy
96
- $ mkvirtualenv cobrapy
97
-
98
- Use the ``--python`` option to select a specific version of Python for the
99
- virtualenv. Note on macOS, matplotlib requires Python be installed as a
100
- framework but virtualenv creates a non-framework build of Python. See the
101
- `matplotlib FAQ <http://matplotlib.org/1.5.3/faq/virtualenv_faq.html>`__ for
102
- details on a workaround.
103
-
104
- 6. Install the required packages for development in the virtualenv using pip install::
51
+ ============
105
52
106
- (cobrapy)$ pip install --upgrade pip setuptools wheel
107
- (cobrapy)$ pip install -r develop-requirements.txt
53
+ Ready to contribute? Here's how to set up cobrapy for local development.
108
54
109
- If you want to work on the Matlab interface, please also install
110
- ``pymatbridge``::
55
+ 1. Fork the https://github.com/opencobra/cobrapy repository on GitHub. If you
56
+ have never done this before, `follow the official guide
57
+ <https://guides.github.com/activities/forking/> `_
58
+ 2. Clone your fork locally as described in the same guide.
59
+ 3. Install your local copy into a a Python virtual environment. You can `read
60
+ this guide to learn more
61
+ <https://realpython.com/python-virtual-environments-a-primer/> `_ about them
62
+ and how to create one. Alternatively, particularly if you are a Windows or
63
+ Mac user, you can also use `Anaconda <https://docs.anaconda.com/anaconda/ >`_.
64
+ Assuming you have virtualenvwrapper installed, this is how you set up your
65
+ fork for local development
111
66
112
- (cobrapy)$ pip install pymatbridge
67
+ .. code-block :: console
113
68
114
- 7. Check out the branch that you want to contribute to. Most likely that will be
115
- ``devel ``::
69
+ mkvirtualenv my-env
70
+ cd cobrapy/
71
+ pip install -e ".[development]"
116
72
117
- (cobrapy)$ git checkout devel
73
+ 4. Create a branch for local development using the ``devel `` branch as a
74
+ starting point. Use ``fix ``, ``refactor ``, or ``feat `` as a prefix
118
75
119
- 8. Create a branch for local development based on the previously checked out
120
- branch (see below for details on the branching model)::
76
+ .. code-block :: console
121
77
122
- (cobrapy)$ git checkout -b name-of-your-bugfix-or-feature
78
+ git checkout devel
79
+ git checkout -b fix-name-of-your-bugfix
123
80
124
81
Now you can make your changes locally.
125
82
126
- 9. Setup cobrapy for development::
83
+ 5. When making changes locally, it is helpful to ``git commit `` your work
84
+ regularly. On one hand to save your work and on the other hand, the smaller
85
+ the steps, the easier it is to review your work later. Please use `semantic
86
+ commit messages
87
+ <http://karma-runner.github.io/2.0/dev/git-commit-msg.html> `_.
127
88
128
- (cobrapy)$ python setup.py develop
89
+ .. code-block :: console
129
90
130
- or::
91
+ git add .
92
+ git commit -m "fix: Your summary of changes"
131
93
132
- (cobrapy)$ pip install -e .
94
+ 6. When you're done making changes, check that your changes pass our test suite.
95
+ This is all included with tox
133
96
134
- 10. When you are done making changes, check that your changes pass pep8
135
- and the tests with tox for your local Python version::
97
+ .. code-block :: console
136
98
137
- (cobrapy)$ tox -e pep8
99
+ tox
138
100
139
- and likely one of::
101
+ You can run all tests in parallel using detox. To get detox, just pip install
102
+ it into your virtualenv.
140
103
141
- (cobrapy)$ tox -e py27
142
- (cobrapy)$ tox -e py34
143
- (cobrapy)$ tox -e py35
104
+ 7. Push your branch to GitHub.
144
105
145
- 11. Commit your changes and push your branch to GitHub::
106
+ .. code-block :: console
146
107
147
- (cobrapy)$ git add .
148
- (cobrapy)$ git commit -m "Your detailed description of your changes."
149
- (cobrapy)$ git push origin name-of-your-bugfix-or-feature
108
+ git push origin fix-name-of-your-bugfix
150
109
151
- 12. Submit a pull request through the GitHub website. Once you submit a pull
152
- request your changes will be tested automatically against multiple Python
153
- versions and operating systems. Further errors might appear during those
154
- tests.
110
+ 8. Open the link displayed in the message when pushing your new branch in order
111
+ to submit a pull request. Please follow the template presented to you in the
112
+ web interface to complete your pull request.
155
113
156
- For larger features that you want to work on collaboratively with other cobrapy team members, you may consider to first request to join the cobrapy developers team to get write access to the repository so that you can create a branch in the main repository (or simply ask the maintainer to create a branch for you). Once you have a new branch you can push your changes directly to the main repository and when finished, submit a pull request from that branch to ``devel ``.
114
+ For larger features that you want to work on collaboratively with other cobrapy
115
+ team members, you may consider to first request to join the cobrapy developers
116
+ team to get write access to the repository so that you can create a branch in
117
+ the main repository (or simply ask the maintainer to create a branch for you).
118
+ Once you have a new branch you can push your changes directly to the main
119
+ repository and when finished, submit a pull request from that branch to
120
+ ``devel ``.
157
121
158
122
Pull Request Guidelines
159
123
-----------------------
0 commit comments