-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from stevepiercy/sphinx-40-compat
Add Sphinx 4.0 compatibility, drop EOLed Pythons
- Loading branch information
Showing
12 changed files
with
227 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Build and test | ||
|
||
on: | ||
# Build on pushes to master | ||
push: | ||
branches: | ||
- master | ||
# Temporarily add for CI on stevepiercy's fork | ||
- sphinx-40-compat | ||
tags: | ||
# Build pull requests | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
# We want to see all failures: | ||
fail-fast: false | ||
matrix: | ||
py: | ||
- "3.6" | ||
- "3.7" | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "pypy-3.7" | ||
os: | ||
- "ubuntu-latest" | ||
- "windows-latest" | ||
- "macos-latest" | ||
architecture: | ||
- x64 | ||
- x86 | ||
|
||
exclude: | ||
# Linux and macOS don't have x86 python | ||
- os: "ubuntu-latest" | ||
architecture: x86 | ||
- os: "macos-latest" | ||
architecture: x86 | ||
# PyPy3 on Windows doesn't seem to work | ||
- os: "windows-latest" | ||
py: "pypy-3.7" | ||
|
||
name: "Python: ${{ matrix.py }}-${{ matrix.architecture }} on ${{ matrix.os }}" | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
architecture: ${{ matrix.architecture }} | ||
- run: pip install tox | ||
- name: Running tox | ||
run: tox -e py -- ${{ matrix.pytest-args }} | ||
# This block is temporarily commented out to speed up testing and until I add | ||
# a lint tox env. | ||
# lint: | ||
# runs-on: ubuntu-latest | ||
# name: Lint the package | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: Setup python | ||
# uses: actions/setup-python@v2 | ||
# with: | ||
# python-version: 3.10 | ||
# architecture: x64 | ||
# - run: pip install tox | ||
# - run: tox -e lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
*.pyc | ||
*$py.class | ||
.coverage | ||
build/ | ||
dist/ | ||
*~ | ||
.tox | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,3 +105,5 @@ Contributors | |
|
||
- Tres Seaver, 2011/03/22 | ||
- Jason Madden, 2013/01/10 | ||
- Steve Piercy, 2021/05/11 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
graft repoze | ||
|
||
include README.rst | ||
include CHANGES.rst | ||
include CONTRIBUTORS.txt LICENSE.txt COPYRIGHT.txt | ||
|
||
include tox.ini .travis.yml | ||
include TODO.txt | ||
graft .github | ||
|
||
global-exclude __pycache__ *.py[cod] | ||
global-exclude .DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,68 @@ | ||
repoze.sphinx.autointerface README | ||
================================== | ||
|
||
.. image:: https://travis-ci.org/repoze/repoze.sphinx.autointerface.png?branch=master | ||
:target: https://travis-ci.org/repoze/repoze.sphinx.autointerface | ||
.. image:: https://github.com/repoze/repoze.sphinx.autointerface/actions/workflows/ci-tests.yml/badge.svg | ||
:target: https://github.com/repoze/repoze.sphinx.autointerface/actions/workflows/ci-tests.yml | ||
|
||
.. image:: https://img.shields.io/pypi/v/repoze.sphinx.autointerface.svg | ||
:target: https://pypi.python.org/pypi/repoze.sphinx.autointerface | ||
:target: https://pypi.python.org/pypi/repoze.sphinx.autointerface | ||
|
||
.. image:: https://img.shields.io/pypi/pyversions/repoze.sphinx.autointerface.svg | ||
:target: https://pypi.python.org/pypi/repoze.sphinx.autointerface | ||
:target: https://pypi.python.org/pypi/repoze.sphinx.autointerface | ||
|
||
|
||
Overview | ||
-------- | ||
|
||
Thie package defines an extension for the | ||
`Sphinx <http://sphinx.pocool.org>`_ documentation system. The extension | ||
allows generation of API documentation by introspection of | ||
`zope.interface <http://pypi.python.org/pypi/zope.interface>`_ instances in | ||
`Sphinx <https://www.sphinx-doc.org/en/master/>`_ documentation system. | ||
The extension allows generation of API documentation by introspection of | ||
`zope.interface <https://pypi.org/project/zope.interface/>`_ instances in | ||
code. | ||
|
||
|
||
Installation | ||
------------ | ||
|
||
Install via `easy_install | ||
<http://peak.telecommunity.com/DevCenter/EasyInstall>`_:: | ||
Install via ``pip``: | ||
|
||
$ bin/easy_install repoze.sphinx.autointerface | ||
.. code-block:: bash | ||
or any other means which gets the package on your ``PYTHONPATH``. | ||
pip install repoze.sphinx.autointerface | ||
Registering the Extension | ||
------------------------- | ||
|
||
Add ``repoze.sphinx.autointerface`` to the ``extensions`` list in the | ||
``conf.py`` of the Sphinx documentation for your product. E.g.:: | ||
``conf.py`` of the Sphinx documentation for your product. | ||
|
||
.. code-block:: python | ||
extensions = ['sphinx.ext.autodoc', | ||
'sphinx.ext.doctest', | ||
'repoze.sphinx.autointerface', | ||
] | ||
extensions = [ | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.doctest", | ||
"repoze.sphinx.autointerface", | ||
] | ||
Using the Extension | ||
------------------- | ||
|
||
At appropriate points in your document, call out the interface | ||
autodocs via:: | ||
At appropriate points in your document, call out the autodoc interface. | ||
|
||
.. code-block:: rst | ||
.. autointerface:: yourpackage.interfaces.IFoo | ||
.. autointerface:: yourpackage.interfaces.IFoo | ||
Output from the directive includes | ||
|
||
- the fully-qualified interface name | ||
- any base interfaces | ||
- the doctstring from the interface, rendered as reSTX. | ||
- the members of the interface (methods and attributes). | ||
- the docstring from the interface, rendered as reStructuredText | ||
- the members of the interface (methods and attributes) | ||
|
||
* For each attribute, the output includes the attribute name | ||
and its description. | ||
* For each method, the output includes the method name, its signature, | ||
and its docstring (also rendered as reSTX). | ||
and its docstring (also rendered as reStructuredText). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.