72 Commits

Author SHA1 Message Date
Doug Hellmann
2fa5003a05 rearrange existing documentation using the new standard layout
Change-Id: I885f1adf4fbfc1137c6c48039096bd7bdf89cbd3
Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-22 16:08:39 -04:00
Stephen Finucane
a20c108e43 docs: Don't specify pbr version in 'setup.py'
This is no longer the recommended practice.

Change-Id: Id61de0873e1599f7b5b6c63536266adb89c1fc3c
2017-06-20 10:52:34 +01:00
Doug Hellmann
3c059cb701 allow user to override the output location of api docs
Allow the user to specify 'api_doc_dir' in the build_sphinx section of
their setup.cfg to control where the auto-generated API documentation is
written.

Change-Id: I2bd5652bb59cbd9c939931ba2e7db1b37d2b30bb
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-15 12:41:49 -04:00
Jenkins
df95641103 Merge "Make oslosphinx optional" 2017-04-27 13:44:13 +00:00
Stephen Finucane
d4e4efd779 Stop building man pages by default
From pretty much the beginning [1], pbr has defaulted to building both
man page and html output, but has failed to document it anywhere. People
tend to copy-paste their 'setup.py' and 'conf.py', or rely on the
'cookiecutter' project, with very little understanding of what's going
on under the hood (and why would you care - it's docs :)). This means
that the vast majority of folks using 'pbr' (basically everyone in
OpenStack) have been unwittingly building "man pages" as part of their
doc builds for no good reason, which has also led to a lot of confusion
when this magic behavior is the cause of bugs [2][3].

There's no good reason that pbr should default to building both man
pages and html output. For folks that want this functionality, we should
document it so they can use it. For everyone else though, let's do the
sane thing and output html like the standard 'build_sphinx' plugin.

[1] https://github.com/openstack-dev/pbr/commit/5b8b7f1d
[2] https://bugs.launchpad.net/pbr/+bug/1681983
[3] https://bugs.launchpad.net/oslotest/+bug/1379998

Change-Id: I579134a2b7980669180c1666503b848835cc2957
Closes-Bug: #1681983
2017-04-14 18:05:22 +00:00
Stephen Finucane
54fb6e71b7 docs: Use definition lists
These are far more concise and easier to read.

Change-Id: I411685b6e7d5385386b40cbf4b8bd4445b3c6847
2017-04-14 18:04:57 +00:00
Jenkins
5da68b9894 Merge "doc: Document Sphinx integration" 2017-04-14 06:25:13 +00:00
Stephen Finucane
b9c9630966 doc: Document Sphinx integration
This was briefly detailed before, but the variant of 'build_sphinx'
provided by 'pbr' does a lot for us that should be documented somewhere.

Change-Id: I0b1877c565d7771e7f0dfdf9198ff41bcd051dec
2017-04-12 14:44:30 +00:00
Doug Hellmann
16a0a98daa add changelog to published documentation
Include the ChangeLog content in the published documentation to make it
possible to read without downloading the source. Add a link to the new
page to the readme for discoverability.

Change-Id: I3cc06846b6d84f5b175a33a48838c8a6a5e1771d
Closes-Bug: #1681725
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-04-11 09:43:27 -04:00
Jenkins
f377238903 Merge "Remove testr entry point" 2017-03-27 23:12:29 +00:00
Thomas Bechtold
ebd9ae850a Make oslosphinx optional
Avoid cyclic dependencies between pbr and oslosphinx. So if oslosphinx is not
available, continue to be able to generate the documentation.

Change-Id: I4c1f8ea5cded268388dab29931055223f8999c8a
2017-03-09 11:29:48 +01:00
Stephen Finucane
72e8e42a34 Stop using 'warnerrors'
This legacy option provided the ability to fail on doc warnings.
However, this functionality is broken in recent releases and now exists
in Sphinx itself (since 1.5.0). Rather that fixing it and causing a
whole load of doc build errors introduced in the time since this option
was broken, remove it, preferring the new Sphinx option instead.

This allows us to remove a lot of test code which is essentially testing
Sphinx functionality only now, based on the assumption that Sphinx do
adequate testing themselves.

Change-Id: Ia4b6adefcd437cb1ceb4558b004c17359df2486d
2017-02-27 14:20:57 +00:00
Stephen Finucane
028f82e6a7 doc: Clarify sections in 'setup.cfg'
Clarify what tools provide what sections in 'setup.cfg', thus explaining
why, for example, I couldn't find any references to '[build_sphinx]' in
either the pbr or setuptools source.

Comments are not a section, so this little bit of info is moved to a
'note'.

Change-Id: Icfb58195c58813e98ab48943119f53c7711331ec
2017-02-27 14:20:54 +00:00
Ian Wienand
e3ad98ca19 Remove testr entry point
A "testr" entry-point was added to PBR in
I2227adf3643ffe6bcece0c7d2127d23e20d52f7a in Jun 2013.  However,
testrepository had already started providing this same
disutils.commands entry-point in Jan 2013 [1].

I am not sure if it is deterministic who wins when two packages
declare the same entry-point, but at least for me, running "python
setup.py testr ..." was not calling into any of the pbr hooks.  I
discovered this because I wanted to use the --coverage-package-name
argument provided by the pbr testr wrapper because to s/-/_ in dib.

The original change (I8e4bc9bb78be37b4d13f8d6c2edfe2d67554ad78)
overrides the setuptools provided "test" [2] to call testrepository
when it sees a .testr.conf file (falling back to nose for
compatability).  So it seems the intention was not to add a "testr"
command, but that "test" is overridden to run testr automatically when
available.

Therefore I think that testrepository owns the distutils.command
entry-point for "testr".  To avoid confusion we should remove the
duplicate entry-point here and just leave the "test" command
overrides.

I've added documentation on the test command.  The testr/test split is
quite confusing, being only one letter different, so that is called
out explicitly.  Comments in testr_command are updated to reflect
what's happening better.  This also converts the calls in tox.ini to
use the PBR wrapper "test".

[1] 2a36806c69 (diff-2eeaed663bd0d25b7e608891384b7298R96)
[2] https://github.com/pypa/setuptools/blob/master/setuptools/command/test.py

Change-Id: I5b68f03e782fef5c45424c04cc851be5988f9019
2017-02-24 11:30:09 +11:00
zhangyanxian
3b21e33401 Fix typo in the index.rst
Change-Id: Ie9c7b410da434cb31e6ae61b95487bba9a53c0cb
2016-08-11 07:54:32 +00:00
Ian Wienand
87288ccfd8 Move to oslosphinx
I noticed the current API documentation is unreadable [1].  Remove the
inbuilt theme and move to oslosphinx for module/api documentation.

[1] http://docs.openstack.org/developer/pbr/api/pbr.version.html

Change-Id: I8d92d849b8a2ab4baca960ae8c271214d3c2b8f4
2016-06-22 13:18:59 +10:00
Sachi King
9a5a9052ac Restore warnerrors behavior and support Sphinx 1.4
Pass the flag to tell Sphinx to treat warnings as errors.

Add compatability note for versions 1.4.0 and suppress
re-register warnings on subsequent runs.

Change-Id: I680b448471e687919d202e8f2abe57f8ba3b22ee
Closes-Bug: #1496882
Co-Authored-By: Doug Hellmann <doug@doughellmann.com>
2016-06-18 11:18:38 +10:00
Sachi King
dcc49c54f5 Update Preversioning explanation to avoid double that
While there's nothing wrong with a double that, when reading this
section I found that it was a bit distracting and made the section
harder to parse than necessary.

Change-Id: I9ca982a8ad6b3a6fd5c4a8b42b93ad2540b2f1ee
2016-04-14 13:06:31 +10:00
Dougal Matthews
38977864e1 Correct the indentation in the classifiers example
Change-Id: Ibb3bd84c6030b3975366126eb5a43f4ae526addb
2016-03-18 10:39:58 +00:00
Jenkins
38be117a03 Merge "Correct typo - s/enabeld/enabled/" 2016-03-09 12:12:23 +00:00
Jenkins
81b22712bf Merge "Do not silently drop markers that fail to evaluate" 2016-03-09 03:41:33 +00:00
Sachi King
11ffee94fa Do not silently drop markers that fail to evaluate
We are silently dropping requirements that do not parse, do not do this
and bubble the error up.

Change-Id: I5bfce7c7d0be2ccd880e78509856074a09c57166
Closes-Bug: 1554331
2016-03-09 11:26:43 +11:00
James Polley
87dcab88d4 Clarifications around tags and version numbers
Tweak wording to slightly clarify how revision tags get turned into
version numbers.

Depends-On: Ie70cb124120d1012d38e5189044c21b83be20819
Change-Id: I29da8e28047015c3c34f04c4443e09d9ade416dc
2016-03-08 23:49:58 +00:00
James Polley
3ee5171709 Correct typo - s/enabeld/enabled/
Depends-On: Ie70cb124120d1012d38e5189044c21b83be20819
Change-Id: I269f39b4f8e2daee000d6db465816b5dac682e2e
2016-03-08 23:49:15 +00:00
Stephen Finucane
3348fdc75a doc: Trivial cleanup of 'index.rst'
Fix some inconsistencies in the document like different level indents
and missing italic formatting.

Change-Id: I4913fd00bcd885dec360a5e133cd962caaf8bdc2
Partial-bug: #1509376
2015-11-20 23:21:49 +00:00
Stephen Finucane
ff482609fb doc: Add deprecation note for 'requirements-pyN'
This format has been deprecated, per this mail:

  http://lists.openstack.org/pipermail/openstack-dev/2015-June/068193.html

State as much.

Change-Id: I302f1c84b9a321887de3aefc055912202fd2c0e0
Partial-bug: #1509376
2015-11-20 23:19:56 +00:00
Stephen Finucane
250816189c doc: Restructure 'Requirements' section
The section on 'requirements.txt' files is rather detailed. This
particular section, given its location in the document, should provide
an overview of what pbr does RE: requirements files without going into
implementation specifics. These implementation specifics should instead
be covered in the 'Usage' section.

Rework the existing 'Requirements' sub-section within the 'What It
Does' section such that it only provides a high-level overview. Add the
more detailed explanation of this feature as a new sub-section within
the 'Usage' section.

Change-Id: Id1d6954e647baae93ee0148445946d78d9d36ca5
Partial-bug: #1509376
2015-11-20 23:19:56 +00:00
Stephen Finucane
934491c093 doc: Restructure 'Usage' section
The usage section isn't very clear: it assumes a lot of setuptools
knowledge on behalf of the user when one of the goals is to abstract
away this knowledge.

Begin reworking it by restructuring the existing content. Move the
'setup.py' sub-section to the top, as it's arguably the most important
file, then slightly rework the 'setup.cfg' sub-section.

Change-Id: I85e136e8817e294ce9b536b4f3ee7f262cc3cd2c
Partial-bug: #1509376
2015-11-20 23:19:56 +00:00
Stephen Finucane
04afb060c9 doc: Add details of manifest generation
pbr is capable of generating a manifest without the need for an explicit
'MANIFEST.in' file, yet this is not stated anywhere. Correct this
oversight.

Change-Id: If9f8a5de20e78286d47da07adc558ace88e039df
Partial-bug: #1509376
2015-11-20 23:19:28 +00:00
Thomas Bechtold
3198305003 Fix docs for markers
When having a requirement for just a specific python version,
the correct check for i.e. python 2.6 is "python_version=='2.6'"

Change-Id: I65a7481dd0575f105839685ad037d8921d64286a
2015-10-30 15:11:23 +09:00
Robert Collins
925010e69f We require the use of setuptools.
distribute is long gone.

Change-Id: Id8bf46d997327977e675f3c5e2988827e536d4fd
2015-08-10 11:41:36 +12:00
Brant Knudson
1e4d883684 Fix docs for environment markers in extras
The docs for environment markers in setup.cfg [extras] had a
couple of issues.

1) There was a space after the package name.
2) python_environment was used where python_version is the marker.

Change-Id: Idbc72c45ae240356ca39eeba6db754f56c6a0f23
2015-07-30 15:08:19 -05:00
Matt Riedemann
07292c2d84 Add more documentation around building docs
After digging in pbr and sphinx source code for a day to figure out
what I was doing wrong, let's update the pbr docs with respect to
building docs using the autodoc features in pbr.

Specifically, document the autodoc_tree_excludes and warnerrors
options and point out that you will probably need to set the
exclude_patterns options in your sphinx config when excluding
modules from the docs build and warnerrors=True.  Also provide
some links to the Sphinx docs for more details.

Related-Bug: #1260495
Related-Bug: #1472276

Change-Id: Ib43830d08a156f37a3763ad2807d5c1f4cdbe3fe
2015-07-08 08:13:40 -07:00
Sachi King
868ea6a967 This documents the use of comments that work between 2.6, 2.7 and 3.4
Comments are not directly handled by PBR, this documents a reasonable working
set of comments that can be used in setup.cfg.

Comments are parsed out over three locations, configparser, which varies rather
significantly between two and three, pkg_resources, and lastly when pip runs.

Change-Id: Iedebc5baca4e21081708971540d6eab89e043f05
2015-06-22 13:31:54 +10:00
Jenkins
dceb9e56dd Merge "builddoc: allow to use fnmatch-style exclusion for autodoc" 2015-06-07 04:06:15 +00:00
Jenkins
d8ee71542e Merge "doc: add some basic doc about pbr doc options" 2015-06-07 04:06:12 +00:00
Jeremy Stanley
9298ddc6cb More explicit data_files install location docs
Make it obvious to the reader that data_files installation target
location translates to the actual system-wide root filesystem tree
when installed with sufficient permissions to do so.

Change-Id: I67a4dc61ab89b96b4f5e1f99f0199e5a3247412a
2015-06-04 15:53:45 +00:00
Julien Danjou
e943f76085 builddoc: allow to use fnmatch-style exclusion for autodoc
This allows to use patterns such as heat.tests.* to exlude modules from
autodoc genereation.

Change-Id: Ibfc4161670fd9344da88c4a85a3aea992fcdf519
2015-05-21 15:00:47 -07:00
Julien Danjou
3cec7c8782 doc: add some basic doc about pbr doc options
Change-Id: Iccb0ba35a008596cb63e1d6954bd9cb8fa50ae78
2015-05-21 15:00:47 -07:00
James Polley
f6cd7b7419 Add home-page into sample setup.cfg
Change-Id: I033cc482f441d59a193b4b1a87ddcbc96fd99885
2015-05-21 14:05:43 -07:00
Jenkins
9026f3627b Merge "Teach pbr to read extras and env markers" 2015-05-15 13:12:41 +00:00
James Polley
2b29c4fc2b Teach pbr to read extras and env markers
This adds support for reading extras from setup.cfg.

It also adds support for handling environment markers, both in the
extras section and in install_requires and in requirements.txt.

Change-Id: I6fd8276012e65f82934df9c374613b1ce6856b5a
2015-05-15 21:31:21 +10:00
Robert Collins
d67f22fc3f Finish removing invocations of pip.
We don't depend on recursive installations via pip - and pip certainly
doesn't support that. We removed part of it recently, finish removing
it all.

Change-Id: I29bc4070b355e52124ceae459ea20403d134b60a
2015-05-12 09:31:20 +12:00
Robert Collins
0971d6f63a Stop testing setup.py easy_install behaviour
Instead test pip install more thoroughly.

Also document that we don't support setup.py install's easy-install
behaviour.

Change-Id: I87872a69425f9d4f17047e584c12516508d57b16
2015-04-29 18:49:36 +12:00
lifeless
5ad364f251 Revert "Support platform-specific requirements files"
This reverts commit 8cdb41cf1264e71fd2f479efa7decd38c1f91cfa.

https://www.python.org/dev/peps/pep-0426/#environment-markers is the
right approach for this, and as we haven't released master its safe to
back this out.

Change-Id: Ic7298fcbde54c6beda67c3c897efa75f1b60b78f
2015-04-17 11:38:55 +12:00
Robert Collins
2465a4cac7 Fixup semver
The semver doc that Monty wrote was great, but doesn't work in the
real world. Specifically because 1.dev1 < 1.a1, we're unable to
depend on alphas without our testing getting locked down to the alpha
on PyPI rather than the revision we're trying to test.

This update fixes that by allowing 1.a1.dev1, audits for consistency
with PEP-440, fixes up the contact details now that this is team
maintained and notes that its as much Python specific as Linux
specific. We also remove the never-in-a-release
SemanticVersion.to_release method, as YAGNI.

Change-Id: I005a2386842633e9fcda76adfc523196c8c2c95d
Sem-Ver: feature
2015-04-15 19:06:05 +12:00
Jenkins
0c6d3fb97b Merge "Support platform-specific requirements files" 2014-12-04 18:43:47 +00:00
Thomas Goirand
c8d6048371 Packagers vs package maintainers
The doc uses a familliar word of "packager", but the real name
should be "package maintainer". This fixes it.

Change-Id: Ieab50fe7ed0d666c9c6eff4c0b986765765f1ac4
2014-12-02 23:18:18 +08:00
Claudiu Popa
8cdb41cf12 Support platform-specific requirements files
This patch adds support for choosing a requirements file, based on the
current OS, with the format 'requirements-{osname}'. This can be combined
with the current approach of choosing a requirement file based on the
Python version. The motivation for this is to replace conditional
choosing of packages inside setup.py.

Change-Id: I30c56082bb9b9bcd80128eedcef17b6beb793cf8
2014-11-24 11:20:32 +02:00
Doug Hellmann
19848e6cf1 Clean up links and docs
Move some developer information for running tests out of the README to
the documentation.

Change the home page link to point to the launchpad page.

Add a link to the bug tracker to the README.

Change-Id: I29bdb071eb64bccc561844c130a256b8f998da5f
Closes-Bug: #1318548
2014-10-08 16:49:59 -04:00