Skip to content

Commit

Permalink
Merge 5fb5074 into 0ecae4b
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Aug 7, 2020
2 parents 0ecae4b + 5fb5074 commit 55b72d6
Show file tree
Hide file tree
Showing 15 changed files with 351 additions and 83 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -13,3 +13,4 @@ develop-eggs
htmlcov/
parts
src/*.egg-info
docs/_build
4 changes: 4 additions & 0 deletions MANIFEST.in
Expand Up @@ -6,6 +6,10 @@ include tox.ini
include .coveragerc

recursive-include src *
recursive-include docs *.bat
recursive-include docs *.py
recursive-include docs *.rst
recursive-include docs Makefile

global-exclude *.pyc
global-exclude *.so
Expand Down
6 changes: 6 additions & 0 deletions README.rst
Expand Up @@ -10,6 +10,10 @@
:target: https://pypi.org/project/zope.generations/
:alt: Supported Python versions

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

.. image:: https://travis-ci.org/zopefoundation/zope.generations.svg?branch=master
:target: https://travis-ci.org/zopefoundation/zope.generations
:alt: Build Status
Expand All @@ -22,3 +26,5 @@ Generations are a way of updating objects in the database when the application
schema changes. An application schema is essentially the structure of data,
the structure of classes in the case of ZODB or the table descriptions in the
case of a relational database.

See https://zopegenerations.readthedocs.io/ for complete documentation.
20 changes: 20 additions & 0 deletions docs/Makefile
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
42 changes: 42 additions & 0 deletions docs/api.rst
@@ -0,0 +1,42 @@
===================
API Documentation
===================


.. there's actually nothing present in this module,
but it provides a place to link to.
.. automodule:: zope.generations

zope.generations.interfaces
===========================

.. automodule:: zope.generations.interfaces

zope.generations.generations
============================

.. automodule:: zope.generations.generations

zope.generations.utility
========================

.. automodule:: zope.generations.utility


Configuration
=============

There are two ZCML files included in this package.

configure.zcml
--------------

.. literalinclude:: ../src/zope/generations/configure.zcml
:language: xml

subscriber.zcml
---------------

.. literalinclude:: ../src/zope/generations/subscriber.zcml
:language: xml
1 change: 1 addition & 0 deletions docs/changelog.rst
@@ -0,0 +1 @@
.. include:: ../CHANGES.rst
108 changes: 108 additions & 0 deletions docs/conf.py
@@ -0,0 +1,108 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import sys
import os
import pkg_resources
sys.path.append(os.path.abspath('../src'))
sys.path.insert(0, os.path.abspath('.'))
rqmt = pkg_resources.require('zope.generations')[0]


# -- Project information -----------------------------------------------------

project = 'zope.generations'
copyright = '2020, Zope Community'
author = 'Zope Community'


# -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#

# 1.8 was the last version that runs on Python 2; 2.0+ requires Python 3.
# `autodoc_default_options` was new in 1.8
needs_sphinx = "1.8"

# 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',
'sphinx.ext.doctest',
'sphinx.ext.extlinks',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'repoze.sphinx.autointerface',

]

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

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '%s.%s.%s' % tuple(map(int, rqmt.version.split('.')[:3]))
# The full version, including alpha/beta/rc tags.
release = rqmt.version

# The reST default role (used for this markup: `text`) to use for all
# documents.
#
default_role = 'obj'

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = 'alabaster'

# 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']

intersphinx_mapping = {
'https://docs.python.org/': None,
'https://zodb-docs.readthedocs.io/en/latest/': None,
'https://persistent.readthedocs.io/en/latest/': None,

'https://zopecomponent.readthedocs.io/en/latest/': None,
'https://zopeconfiguration.readthedocs.io/en/latest/': None,
'https://zopeevent.readthedocs.io/en/latest/': None,
'https://zopeinterface.readthedocs.io/en/latest/': None,
'https://zopeprocesslifetime.readthedocs.io/en/latest/': None,
}


# Sphinx 1.8+ prefers this to `autodoc_default_flags`. It's documented that
# either True or None mean the same thing as just setting the flag, but
# only None works in 1.8 (True works in 2.0)
autodoc_default_options = {
'members': None,
'show-inheritance': None,
}
autodoc_member_order = 'bysource'
autoclass_content = 'both'
1 change: 1 addition & 0 deletions docs/details.rst
@@ -0,0 +1 @@
.. include:: ../src/zope/generations/README.rst
20 changes: 20 additions & 0 deletions docs/index.rst
@@ -0,0 +1,20 @@
.. include:: ../README.rst

.. toctree::
:maxdepth: 2
:caption: Contents:

details
changelog
api




====================
Indices and tables
====================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
35 changes: 35 additions & 0 deletions docs/make.bat
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
10 changes: 4 additions & 6 deletions setup.py
Expand Up @@ -40,12 +40,6 @@ def read(*rnames):
description='Zope application schema generations',
long_description=(
read('README.rst')
+ '\n\n.. contents::\n\n' +
'======================\n'
'Detailed Documentation\n'
'======================\n'
+ '\n\n' +
read('src', 'zope', 'generations', 'README.rst')
+ '\n\n' +
read('CHANGES.rst')
),
Expand Down Expand Up @@ -75,6 +69,10 @@ def read(*rnames):
namespace_packages=['zope'],
extras_require={
'test': TESTS_REQUIRE,
'docs': [
'Sphinx',
'repoze.sphinx.autointerface',
]
},
install_requires=[
'setuptools',
Expand Down

0 comments on commit 55b72d6

Please sign in to comment.