Author: | David Goodger; open to all Docutils developers |
---|---|
Contact: | docutils-develop@lists.sourceforge.net |
Date: | 2022-06-22 |
Revision: | 9092 |
Copyright: | This document has been placed in the public domain. |
Contents
The Docutils project group is a meritocracy based on code contribution and lots of discussion [1]. A few quotes sum up the policies of the Docutils project. The IETF's classic credo (by MIT professor Dave Clark) is an ideal we can aspire to:
We reject: kings, presidents, and voting. We believe in: rough consensus and running code.
As architect, chief cook and bottle-washer, David Goodger currently functions as BDFN (Benevolent Dictator For Now). (But he would happily abdicate the throne given a suitable candidate. Any takers?)
Eric S. Raymond, anthropologist of the hacker subculture, writes in his essay The Magic Cauldron:
The number of contributors [to] projects is strongly and inversely correlated with the number of hoops each project makes a user go through to contribute.
We will endeavour to keep the barrier to entry as low as possible. The policies below should not be thought of as barriers, but merely as a codification of experience to date. These are "best practices"; guidelines, not absolutes. Exceptions are expected, tolerated, and used as a source of improvement. Feedback and criticism is welcome.
As for control issues, Emmett Plant (CEO of the Xiph.org Foundation, originators of Ogg Vorbis) put it well when he said:
Open source dictates that you lose a certain amount of control over your codebase, and that's okay with us.
[1] | Phrase borrowed from Ben Collins-Sussman of the Subversion project. |
Contributed code will not be refused merely because it does not strictly adhere to these conditions; as long as it's internally consistent, clean, and correct, it probably will be accepted. But don't be surprised if the "offending" code gets fiddled over time to conform to these conventions.
The Docutils project shall follow the generic coding conventions as specified in the Style Guide for Python Code and Docstring Conventions PEPs, summarized, clarified, and extended as follows:
Docutils documentation is written using reStructuredText, of course.
Use 7-bit ASCII if at all possible, and Unicode substitutions when necessary.
Use the following section title adornment styles:
================ Document Title ================ -------------------------------------------- Document Subtitle, or Major Division Title -------------------------------------------- Section ======= Subsection ---------- Sub-Subsection `````````````` Sub-Sub-Subsection ..................
Use two blank lines before each section/subsection/etc. title. One blank line is sufficient between immediately adjacent titles.
Add a bibliographic field list immediately after the document title/subtitle. See the beginning of this document for an example.
Add an Emacs "local variables" block in a comment at the end of the document. See the end of this document for an example.
The majority of the Docutils project code and documentation has been placed in the public domain (see Copying Docutils).
Unless clearly and explicitly indicated otherwise, any patches (modifications to existing files) submitted to the project for inclusion (via Subversion, SourceForge trackers, mailing lists, or private email) are assumed to be in the public domain as well.
Any new files contributed to the project should clearly state their intentions regarding copyright, in one of the following ways:
Public domain (preferred): include the statement "This module/document has been placed in the public domain."
Copyright & open source license: include a copyright notice, along with either an embedded license statement, a reference to an accompanying license file, or a license URL.
The license should be well known, simple and compatible with other open source software licenses. To keep the number of different licenses at a minimum, using the 2-Clause BSD license (local copy) is recommended.
Please see the repository documentation for details on how to access Docutils' Subversion repository. Anyone can access the repository anonymously. Only project developers can make changes. (If you would like to become a project developer, just ask!) Also see Setting Up For Docutils Development below for some useful info.
Unless you really really know what you're doing, please do not use svn import. It's quite easy to mess up the repository with an import.
(These branch policies go into effect with Docutils 0.4.)
The "docutils" directory of the trunk (a.k.a. the Docutils core) is used for active -- but stable, fully tested, and reviewed -- development.
If we need to cut a bugfix release, we'll create a maintenance branch based on the latest feature release. For example, when Docutils 0.5 is released, this would be branches/docutils-0.5, and any existing 0.4.x maintenance branches may be retired. Maintenance branches will receive bug fixes only; no new features will be allowed here.
Obvious and uncontroversial bug fixes with tests can be checked in directly to the core and to the maintenance branches. Don't forget to add test cases! Many (but not all) bug fixes will be applicable both to the core and to the maintenance branches; these should be applied to both. No patches or dedicated branches are required for bug fixes, but they may be used. It is up to the discretion of project developers to decide which mechanism to use for each case.
Feature additions and API changes will be done in feature branches. Feature branches will not be managed in any way. Frequent small check-ins are encouraged here. Feature branches must be discussed on the docutils-develop mailing list and reviewed before being merged into the core.
Before a new feature, an API change, or a complex, disruptive, or controversial bug fix can be checked in to the core or into a maintenance branch, it must undergo review. These are the criteria:
The review process will ensure that at least one other set of eyeballs & brains sees the code before it enters the core. In addition to the above, the general Check-ins policy (below) also applies.
Changes or additions to the Docutils core and maintenance branches carry a commitment to the Docutils user community. Developers must be prepared to fix and maintain any code they have committed.
The Docutils core (trunk/docutils directory) and maintenance branches should always be kept in a stable state (usable and as problem-free as possible). All changes to the Docutils core or maintenance branches must be in good shape, usable, documented, tested, and reasonably complete. Starting with version 1.0, they must also comply with the backwards compatibility policy.
If you really want to check code directly into the Docutils core, you can, but you must ensure that it fulfills the above criteria first. People will start to use it and they will expect it to work! If there are any issues with your code, or if you only have time for gradual development, you should put it on a branch or in the sandbox first. It's easy to move code over to the Docutils core once it's complete.
It is the responsibility and obligation of all developers to keep the Docutils core and maintenance branches stable. If a commit is made to the core or maintenance branch which breaks any test, the solution is simply to revert the change. This is not vindictive; it's practical. We revert first, and discuss later.
Docutils will pursue an open and trusting policy for as long as possible, and deal with any aberrations if (and hopefully not when) they happen. We'd rather see a torrent of loose contributions than just a trickle of perfect-as-they-stand changes. The occasional mistake is easy to fix. That's what version control is for!
The state of development of the current Docutils codebase is stored in two forms: the sequence docutils.__version_info__ and the PEP 440 conformant text string docutils.__version__. See also the Docutils Release Procedure
docutils.__version_info__ is an instance of docutils.VersionInfo based on collections.namedtuple. It is modelled on sys.version_info and has the following attributes:
Releases that change the micro number (x.y.z, e.g. 0.4.1) will be bug-fix releases. No new features will be introduced in these releases; only bug fixes will be included.
The micro number is omitted from docutils.__version__ when it equals zero.
The release level indicates the development status (or phase) of the project's codebase:
Release Level | Label [2] | Description |
---|---|---|
alpha | a | Reserved for use after major experimental changes, to indicate an unstable codebase. |
beta | b | Indicates active development, between releases. |
candidate | rc | Release candidate: indicates that the codebase is ready to release unless significant bugs emerge. |
final | Indicates an official project release. |
[2] | The labels are used in the docutils.__version__ pre-release segment. |
docutils.__version_info__ can be used to test for a minimally required version, e.g.
docutils.__version_info__ >= (0, 13)
is True for all versions after "0.13".
The text string docutils.__version__ is a human readable, PEP 440-conforming version specifier. For version comparison operations, use docutils.__version_info__.
docutils.__version__ takes the following form:
"<major>.<minor>[.<micro>][<releaselevel>[<serial>]][.dev]" <--- release segment ---><-- pre-release segment -><- development ->
Examples of docutils.__version__ identifiers, over the course of normal development (without branches), in ascending order:
Release Level | Version Identifier |
---|---|
final (release) | 0.14 |
beta (development) [3] | 0.15b.dev |
beta (release) [4] | 0.15b |
candidate 1 (dev.) | 0.15rc1.dev |
candidate 1 (release) | 0.15rc1 |
candidate 2 (dev.) [4] | 0.15rc2.dev |
candidate 2 (release) [4] | 0.15rc2 |
... | |
final (release) | 0.15 |
beta (development) [3] | 0.16b.dev |
[3] | (1, 2) Default active development state between releases. |
[4] | (1, 2, 3) These steps may be skipped. |
Note
The backwards compatibility policy outlined below is a stub.
Docutils' backwards compatibility policy follows the rules for Python in PEP 387.
A majority of projects depends on Docutils indirectly, via the Sphinx document processor.
Changes that may affect end-users (e.g. by requiring changes to the configuration file or potentially breaking custom style sheets) should be announced with a FutureWarning.
Snapshot tarballs can be downloaded from the repository (see the "download snapshot" button in the head of the code listing table).
When making changes to the code, testing is a must. The code should be run to verify that it produces the expected results, and the entire test suite should be run too. The modified Docutils code has to be accessible to Python for the tests to have any meaning. See editable installs for ways to keep the Docutils code accessible during development.
Developers are recommended to subscribe to all Docutils mailing lists.