Skip to content

Commit e5e34fc

Browse files
authored
Doc: Move sample workflow out of the main document
The Contributing docs were too long to read. Move the longness out, which should emphasize you'll be fine with the usual Git workflows. python-ldap#115
1 parent 2ad72f2 commit e5e34fc

File tree

2 files changed

+94
-82
lines changed

2 files changed

+94
-82
lines changed

Doc/contributing.rst

Lines changed: 9 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ If you'd like to contribute (be it code, documentation, maintenance effort,
88
or anything else), this guide is for you.
99

1010

11+
.. toctree::
12+
:hidden:
13+
14+
sample_workflow.rst
15+
16+
1117
Communication
1218
=============
1319

@@ -54,8 +60,8 @@ If required, write to coordinate a more secure channel.
5460
All other communication should be public.
5561

5662

57-
Process for Code contributions
58-
==============================
63+
Contributing code
64+
=================
5965

6066
If you're used to open-source Python development with Git, here's the gist:
6167

@@ -76,86 +82,7 @@ Or, if you prefer to avoid closed-source services:
7682
.. _Read the Docs: http://python-ldap.readthedocs.io/
7783

7884
If you're new to some aspect of the project, you're welcome to use (or adapt)
79-
the workflow below.
80-
81-
82-
Sample workflow
83-
---------------
84-
85-
We assume that, as a user of python-ldap you're not new to software
86-
development in general, so these instructions are terse.
87-
If you need additional detail, please do ask on the mailing list.
88-
89-
.. note::
90-
91-
The following instructions are for Linux.
92-
If you can translate them to another system, please contribute your
93-
translation!
94-
95-
96-
Install `Git`_ and `tox`_.
97-
98-
Clone the repository::
99-
100-
$ git clone https://github.com/python-ldap/python-ldap
101-
$ cd python-ldap
102-
103-
Create a `virtual environment`_ to ensure you in-development python-ldap won't
104-
affect the rest of your system::
105-
106-
$ python3 -m venv __venv__
107-
108-
(For Python 2, install `virtualenv`_ and use it instead of ``python3 -m venv``.)
109-
110-
.. _git: https://git-scm.com/
111-
.. _virtual environment: https://docs.python.org/3/library/venv.html
112-
.. _virtualenv: https://virtualenv.pypa.io/en/stable/
113-
114-
Activate the virtual environment::
115-
116-
$ source __venv__/bin/activate
117-
118-
Install python-ldap to it in `editable mode`_::
119-
120-
(__venv__)$ python -m pip install -e .
121-
122-
This way, importing a Python module from python-ldap will directly
123-
use the code from your source tree.
124-
If you change C code, you will still need to recompile
125-
(using the ``pip install`` command again).
126-
127-
.. _editable mode: https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs
128-
129-
Change the code as desired.
130-
131-
132-
To run tests, install and run `tox`_::
133-
134-
(__venv__)$ python -m pip install tox
135-
(__venv__)$ tox --skip-missing-interpreters
136-
137-
This will run tests on all supported versions of Python that you have
138-
installed, skipping the ones you don't.
139-
To run a subset of test environments, run for example::
140-
141-
(__venv__)$ tox -e py27,py36
142-
143-
In addition to ``pyXY`` environments, we have extra environments
144-
for checking things independent of the Python version:
145-
146-
* ``doc`` checks syntax and spelling of the documentation
147-
* ``coverage-report`` generates a test coverage report for Python code.
148-
It must be used last, e.g. ``tox -e py27,py36,coverage-report``.
149-
* ``py2-nosasltls`` and ``py3-nosasltls`` check functionality without
150-
SASL and TLS bindings compiled in.
151-
152-
153-
When your change is ready, commit to Git, and submit a pull request on GitHub.
154-
You can take a look at the `committer instructions`_ to see what we are looking
155-
for in a pull request.
156-
157-
If you don't want to open a GitHub account, please send patches as attachments
158-
to the python-ldap mailing list.
85+
our :ref:`sample workflow <sample workflow>`.
15986

16087

16188
.. _additional tests:

Doc/sample_workflow.rst

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
2+
.. _sample workflow:
3+
4+
Sample workflow for python-ldap development
5+
-------------------------------------------
6+
7+
This document will guide you through the process of contributing a change
8+
to python-ldap.
9+
10+
We assume that, as a user of python-ldap, you're not new to software
11+
development in general, so these instructions are terse.
12+
If you need additional detail, please do ask on the mailing list.
13+
14+
.. note::
15+
16+
The following instructions are for Linux.
17+
If you can translate them to another system, please contribute your
18+
translation!
19+
20+
21+
Install `Git`_, `tox`_ and the :ref:`build prerequisites`.
22+
23+
.. _tox: https://tox.readthedocs.io/en/latest/
24+
25+
Clone the repository::
26+
27+
$ git clone https://github.com/python-ldap/python-ldap
28+
$ cd python-ldap
29+
30+
Create a `virtual environment`_ to ensure you in-development python-ldap won't
31+
affect the rest of your system::
32+
33+
$ python3 -m venv __venv__
34+
35+
(For Python 2, install `virtualenv`_ and use it instead of ``python3 -m venv``.)
36+
37+
.. _git: https://git-scm.com/
38+
.. _virtual environment: https://docs.python.org/3/library/venv.html
39+
.. _virtualenv: https://virtualenv.pypa.io/en/stable/
40+
41+
Activate the virtual environment::
42+
43+
$ source __venv__/bin/activate
44+
45+
Install python-ldap to it in `editable mode`_::
46+
47+
(__venv__)$ python -m pip install -e .
48+
49+
This way, importing a Python module from python-ldap will directly
50+
use the code from your source tree.
51+
If you change C code, you will still need to recompile
52+
(using the ``pip install`` command again).
53+
54+
.. _editable mode: https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs
55+
56+
Change the code as desired.
57+
58+
59+
To run tests, install and run `tox`_::
60+
61+
(__venv__)$ python -m pip install tox
62+
(__venv__)$ tox --skip-missing-interpreters
63+
64+
This will run tests on all supported versions of Python that you have
65+
installed, skipping the ones you don't.
66+
To run a subset of test environments, run for example::
67+
68+
(__venv__)$ tox -e py27,py36
69+
70+
In addition to ``pyXY`` environments, we have extra environments
71+
for checking things independent of the Python version:
72+
73+
* ``doc`` checks syntax and spelling of the documentation
74+
* ``coverage-report`` generates a test coverage report for Python code.
75+
It must be used last, e.g. ``tox -e py27,py36,coverage-report``.
76+
* ``py2-nosasltls`` and ``py3-nosasltls`` check functionality without
77+
SASL and TLS bindings compiled in.
78+
79+
80+
When your change is ready, commit to Git, and submit a pull request on GitHub.
81+
You can take a look at the :ref:`committer instructions` to see what we are looking
82+
for in a pull request.
83+
84+
If you don't want to open a GitHub account, please send patches as attachments
85+
to the python-ldap mailing list.

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