Skip to content

Commit

Permalink
Polish documentation for RTD. (#49)
Browse files Browse the repository at this point in the history
* Polish documentation for RTD.

Fixes #39
  • Loading branch information
Michael Howitz committed Dec 5, 2017
1 parent 2281567 commit f86bd60
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ local.cfg
parts
src
var
docs/_build/

# VirtualEnv on Windows:
Include/
Expand Down
18 changes: 17 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
``Products.GenericSetup``
=========================

.. image:: https://img.shields.io/pypi/v/Products.GenericSetup.svg
:target: https://pypi.python.org/pypi/Products.GenericSetup/
:alt: Latest release

.. image:: https://img.shields.io/pypi/pyversions/Products.GenericSetup.svg
:target: https://pypi.org/project/Products.GenericSetup/
:alt: Supported Python versions

.. image:: https://travis-ci.org/zopefoundation/Products.GenericSetup.svg?branch=master
:target: https://travis-ci.org/zopefoundation/Products.GenericSetup

.. image:: https://coveralls.io/repos/github/zopefoundation/Products.GenericSetup/badge.svg?branch=master
:target: https://coveralls.io/github/zopefoundation/Products.GenericSetup?branch=master

.. image:: https://readthedocs.org/projects/productsgenericsetup/badge/?version=latest
:target: https://productsgenericsetup.readthedocs.io/
:alt: Documentation Status


This product provides a mini-framework for expressing the configured
state of a Zope Site as a set of filesystem artifacts. These artifacts
consist of declarative XML files, which spell out the configuration
settings for each "tool" in the site , and supporting scripts / templates,
in their "canonical" filesystem representations.

See ``docs/index.rst`` for full documentation. This documentation can
also be found online: http://packages.python.org/Products.GenericSetup/
also be found online: https://productsgenericsetup.readthedocs.io/
1 change: 1 addition & 0 deletions doc-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.[docs]
1 change: 1 addition & 0 deletions docs/CHANGES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../CHANGES.rst
89 changes: 73 additions & 16 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@
# Products.GenericSetup documentation build configuration file, created by
# sphinx-quickstart on Sat Sep 27 12:26:01 2008.
#
# This file is execfile()d with the current directory set to its containing dir.
# This file is execfile()d with the current directory set to its
# containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleable (module imports are okay, they're removed automatically).
# that aren't pickleable (module imports are okay, they're removed
# automatically).
#
# All configuration values have a default value; values that are commented out
# serve to show the default value.

import sys, os
import sys
import os
import pkg_resources
sys.path.append(os.path.abspath('../src'))
rqmt = pkg_resources.require('Products.GenericSetup')[0]


# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
Expand All @@ -21,12 +28,12 @@
# General configuration
# ---------------------

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']
templates_path = ['_templates']

# The suffix of source filenames.
source_suffix = '.rst'
Expand All @@ -36,21 +43,26 @@

# General substitutions.
project = 'Products.GenericSetup'
copyright = '2008, Zope CMF Developers'
copyright = '2008-2017, Zope CMF Developers'

# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
#
# The short X.Y version.
version = '1.7'
version = '%s.%s' % tuple(map(int, rqmt.version.split('.')[:2]))
# The full version, including alpha/beta/rc tags.
release = '1.7.0'
release = rqmt.version

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
today_fmt = '%B %d, %Y'
#today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']


# List of documents that shouldn't be included in the build.
#unused_docs = []
Expand Down Expand Up @@ -80,10 +92,9 @@
# Options for HTML output
# -----------------------

# The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths
# given in html_static_path.
html_style = 'default.css'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
Expand All @@ -104,11 +115,11 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['.static']
#html_static_path = ['.static']

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = '%b %d, %Y'
#html_last_updated_fmt = '%b %d, %Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
Expand Down Expand Up @@ -177,3 +188,49 @@

# If false, no module index is generated.
#latex_use_modindex = True

# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'productsgenericsetup', 'Products.GenericSetup Documentation',
['Zope CMF Developers'], 1)
]

# If true, show URL addresses after external links.
#man_show_urls = False


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'productsgenericsetup', 'Products.GenericSetup Documentation',
'Zope CMF Developers', 'productsgenericsetup',
'One line description of project.', 'Miscellaneous'),
]

# Documents to append as an appendix to all manuals.
#texinfo_appendices = []

# If false, no module index is generated.
#texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'

# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'https://docs.python.org/': None,
}

autodoc_default_flags = ['members', 'show-inheritance']
autoclass_content = 'both'
autodoc_member_order = 'bysource'
3 changes: 2 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ Other Documentation
install
handlers
profiles
../CHANGES
CHANGES
HISTORY
CREDITS
glossary

Expand Down
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def _package_doc(name):
keywords='web application server zope zope2 cmf',
author="Zope Foundation and Contributors",
author_email="zope-cmf@zope.org",
url="https://pypi.python.org/pypi/Products.GenericSetup",
license="ZPL 2.1 (http://www.zope.org/Resources/License/ZPL-2.1)",
url="https://github.com/zopefoundation/Products.GenericSetup",
license="ZPL 2.1",
packages=find_packages(),
include_package_data=True,
namespace_packages=['Products'],
Expand All @@ -61,6 +61,12 @@ def _package_doc(name):
tests_require=[
'zope.testrunner',
],
extras_require=dict(
docs=[
'Sphinx',
'repoze.sphinx.autointerface',
],
),
test_loader="zope.testrunner.eggsupport:SkipLayers",
test_suite="Products.GenericSetup.tests",
entry_points="""
Expand Down
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[tox]
minversion = 1.9
envlist =
py27,
py34,
py35,
py36,
flake8,
coverage,
docs,

[testenv]
commands =
Expand Down Expand Up @@ -45,3 +47,12 @@ commands =
- flake8 --format=html --htmldir={toxinidir}/parts/flake8 --doctests Products tests setup.py {posargs}
flake8 --doctests Products tests setup.py {posargs}


[testenv:docs]
basepython =
python2.7
pip_pre = True
commands =
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
deps =
.[docs]

0 comments on commit f86bd60

Please sign in to comment.