Skip to content

Commit 7e48417

Browse files
tomschrscls19fr
authored andcommitted
Fix #85: Improve contribution section (#147)
* Fix #85: Improve contribution section Closes #115 too. This is a mostly a complete rewrite with the following ideas and changes in mind: * Add a brief workflow, starting from forking, cloning, creating a branch, and opening a pull request. * Use "procedure style" and use active voice to make reader aware of an action * Remove intersphinx section for matplotlib (not used) in docs/conf.py * Fix flake8 W391 for Python 3.4 Error message was: W391 blank line at end of file
1 parent f60e11c commit 7e48417

File tree

3 files changed

+65
-13
lines changed

3 files changed

+65
-13
lines changed

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Significant contributors
3333
* Peter Bittner <django@bittner.it>
3434
* robi-wan <robi-wan@suyu.de>
3535
* T. Jameson Little <t.jameson.little@gmail.com>
36+
* Tom Schraitle <tom_schr@web.de>
3637
* Tuure Laurinolli <tuure@laurinolli.net>
3738
* Tyler Cross <tyler@crosscollab.com>
3839
* Zack Lalanne <zack.lalanne@gmail.com>

docs/conf.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,3 @@
171171
author, 'semver', 'One line description of project.',
172172
'Miscellaneous'),
173173
]
174-
175-
176-
intersphinx_mapping = {
177-
"matplotlib": ('http://matplotlib.org', None),
178-
}

docs/development.rst

Lines changed: 64 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
Contributing to semver
22
======================
33

4-
When you make changes to the code please run the tests before pushing your
5-
code to your fork and opening a `pull request`_:
4+
Do you want to contribute? Great! We would like to give you some
5+
helpful tips and tricks.
6+
When you make changes to the code, we would greatly appreciate if you
7+
consider the following requirements:
68

7-
.. code-block:: bash
9+
* Make sure your code adheres to the `Semantic Versioning`_ specification.
10+
11+
* Check if your feature is covered by the Semantic Versioning specification.
12+
If not, ask on its GitHub project https://github.com/semver/semver.
13+
14+
* Write test cases if you implement a new feature.
815

9-
python setup.py test
16+
* Test also for side effects of your new feature and run the complete
17+
test suite.
18+
* Document the new feature.
1019

1120
We use `pytest`_ and `tox`_ to run tests against all supported Python
1221
versions. All test dependencies are resolved automatically, apart from
@@ -16,13 +25,60 @@ virtualenv, which for the moment you still may have to install manually:
1625
1726
pip install "virtualenv<14.0.0" # <14.0.0 needed for Python 3.2 only
1827
19-
You can use the ``clean`` command to remove build and test files and folders:
28+
We recommend to use the following workflow if you would like to contribute:
2029

21-
.. code-block:: bash
30+
1. Fork our project on GitHub using this link:
31+
https://github.com/k-bx/python-semver/fork
32+
33+
2. Clone your forked Git repository (replace ``GITHUB_USER`` with your
34+
account name on GitHub)::
35+
36+
$ git clone git@github.com:GITHUB_USER/python-semver.git
37+
38+
3. Create a new branch. You can name your branch whatever you like, but we
39+
recommend to use some meaningful name. If your fix is based on a
40+
existing GitHub issue, add also the number. Good examples would be:
41+
42+
* ``feature/123-improve-foo`` when implementing a new feature
43+
* ``bugfix/123-fix-security-bar`` when dealing with bugfixes
44+
45+
Use this :command:`git` command::
46+
47+
$ git checkout -b feature/NAME_OF_YOUR_FEATURE
48+
49+
4. Work on your branch. Commit your work. Don't forget to write test cases
50+
for your new feature.
51+
52+
5. Run the test suite. You have the following options:
53+
54+
* To run a complete test use the ``setup.py`` script (shown for Python 3)::
55+
56+
$ python3 setup.py test
57+
58+
This may create some errors as you probably do not have all Python
59+
versions installed on your system. To restrict it to only installed
60+
version (probably 2.7 and 3.x), pass this options::
61+
62+
$ python3 setup.py test -a --skip-missing-interpreters
63+
64+
* To run a test for a specific Python version, use the
65+
:command:`tox` command, for example, for Python 3.6::
66+
67+
$ tox -e py36
68+
69+
6. Create a `pull request`_. Describe in the pull request what you did
70+
and why. If you have open questions, ask.
71+
72+
7. Wait for feedback. If you receive any comments, address these.
73+
74+
8. After your pull request got accepted, delete your branch.
75+
76+
9. Use the ``clean`` command to remove build and test files and folders::
2277

23-
python setup.py clean
78+
$ python setup.py clean
2479

2580

2681
.. _pull request: https://github.com/k-bx/python-semver/pulls
2782
.. _pytest: http://pytest.org/
28-
.. _tox: http://tox.testrun.org/
83+
.. _tox: https://tox.readthedocs.org/
84+
.. _Semantic Versioning: https://semver.org

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy