From 0a852da59af04f98c50e0cbd8fbd68f2ab5fefbe Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Mon, 11 Sep 2017 07:14:45 -0500 Subject: Add test environments for ZOPE_WATCH_CHECKERS They cover both the pure-python and C cases. This modified two existing test environments, but without loss of test coverage (since PyPy will always cover the pure-python case). --- docs/conf.py | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/conf.py b/docs/conf.py index 2bcdf49..caabf00 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,8 +11,16 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os +import os +import sys +import pkg_resources +sys.path.append(os.path.abspath('../src')) +rqmt = pkg_resources.require('zope.security')[0] + +# We can't have ZOPE_WATCH_CHECKERS set because it interferes +# with doctests +os.environ['ZOPE_WATCH_CHECKERS'] = '0' # 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. @@ -28,6 +36,7 @@ import sys, os extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', + 'sphinx.ext.extlinks', 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode', 'repoze.sphinx.autointerface', @@ -54,9 +63,9 @@ copyright = u'2012, Zope Foundation Contributors ' # built documents. # # The short X.Y version. -version = '4.0' +version = '%s.%s' % tuple(map(int, rqmt.version.split('.')[:2])) # The full version, including alpha/beta/rc tags. -release = '4.0dev' +release = rqmt.version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -249,4 +258,21 @@ texinfo_documents = [ # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'http://docs.python.org/': None} +intersphinx_mapping = { + 'https://docs.python.org/': None, + 'https://zopeinterface.readthedocs.io/en/latest': None, + 'https://zopeproxy.readthedocs.io/en/latest': None, + 'https://zopeschema.readthedocs.io/en/latest': None, +} + +extlinks = {'issue': ('https://github.com/zopefoundation/zope.datetime/issues/%s', + 'issue #'), + 'pr': ('https://github.com/zopefoundation/zope.datetime/pull/%s', + 'pull request #')} + +autodoc_default_flags = [ + 'members', + 'show-inheritance', +] +autoclass_content = 'both' +autodoc_member_order = 'bysource' -- cgit v1.2.1