././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0373344 sphinx_automodapi-0.18.0/0000755000175100001770000000000000000000000016141 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/.coveragerc0000644000175100001770000000112600000000000020262 0ustar00runnerdocker00000000000000[run] source = sphinx_automodapi omit = sphinx_automodapi/tests/* */sphinx_automodapi/tests/* [report] exclude_lines = # Have to re-enable the standard pragma pragma: no cover # Don't complain about packages we have installed except ImportError # Don't complain if tests don't hit assertions raise AssertionError raise NotImplementedError # Don't complain about script hooks def main\(.*\): # Ignore branches that don't pertain to this version of Python pragma: py{ignore_python_version} # Don't complain about IPython completion helper def _ipython_key_completions_ ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0013344 sphinx_automodapi-0.18.0/.github/0000755000175100001770000000000000000000000017501 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/.github/dependabot.yml0000644000175100001770000000102100000000000022323 0ustar00runnerdocker00000000000000# To get started with Dependabot version updates, you'll need to specify which # package ecosystems to update and where the package manifests are located. # Please see the documentation for all configuration options: # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates version: 2 updates: - package-ecosystem: "github-actions" # See documentation for possible values directory: ".github/workflows" # Location of package manifests schedule: interval: "weekly" ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0013344 sphinx_automodapi-0.18.0/.github/workflows/0000755000175100001770000000000000000000000021536 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/.github/workflows/check_milestone.yml0000644000175100001770000000215200000000000025415 0ustar00runnerdocker00000000000000name: Check PR milestone on: # So it cannot be skipped. pull_request_target: types: [opened, synchronize, milestoned, demilestoned] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: contents: read jobs: # https://stackoverflow.com/questions/69434370/how-can-i-get-the-latest-pr-data-specifically-milestones-when-running-yaml-jobs milestone_checker: runs-on: ubuntu-latest steps: - uses: actions/github-script@v7 if: github.repository == 'astropy/sphinx-automodapi' with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const { data } = await github.request("GET /repos/{owner}/{repo}/pulls/{pr}", { owner: context.repo.owner, repo: context.repo.repo, pr: context.payload.pull_request.number }); if (data.milestone) { core.info(`This pull request has a milestone set: ${data.milestone.title}`); } else { core.setFailed(`A maintainer needs to set the milestone for this pull request.`); } ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/.github/workflows/ci_workflows.yml0000644000175100001770000000564300000000000025001 0ustar00runnerdocker00000000000000name: CI on: pull_request: push: branches: [ main ] tags: '*' workflow_dispatch: schedule: # Weekly cron - cron: '0 8 * * 1' concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: tests: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: include: - name: Code style checks os: ubuntu-latest python-version: 3.x toxenv: codestyle # Linux - test different Sphinx versions - os: ubuntu-latest python-version: 3.8 toxenv: py38-test-sphinx_oldest - os: ubuntu-latest python-version: 3.8 toxenv: py38-test-sphinx53 - os: ubuntu-latest python-version: 3.9 toxenv: py39-test-sphinx62 - os: ubuntu-latest python-version: 3.9 toxenv: py39-test-sphinx70 - os: ubuntu-latest python-version: '3.10' toxenv: py310-test-sphinx71 - os: ubuntu-latest python-version: '3.11' toxenv: py311-test-sphinx72-cov-clocale - os: ubuntu-latest python-version: '3.12' toxenv: py312-test-sphinx80 - os: ubuntu-latest python-version: '3.12' toxenv: py312-test-sphinxdev # MacOS X - just the stable and dev - os: macos-latest python-version: '3.10' toxenv: py310-test-sphinx80-clocale - os: macos-latest python-version: '3.11' toxenv: py311-test-sphinxdev # Windows - just the oldest, stable, and dev - os: windows-latest python-version: 3.8 toxenv: py38-test-sphinx_oldest - os: windows-latest python-version: '3.10' toxenv: py310-test-sphinx80 - os: windows-latest python-version: '3.11' toxenv: py311-test-sphinxdev steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install graphviz on Linux if: startsWith(matrix.os, 'ubuntu') run: | sudo apt-get update sudo apt-get install graphviz - name: Install graphviz on OSX if: startsWith(matrix.os, 'macos') run: | brew update brew install graphviz - name: Install graphviz on Windows if: startsWith(matrix.os, 'windows') run: choco install graphviz - name: Install tox run: python -m pip install tox - name: Run tox run: tox ${{ matrix.toxargs }} -v -e ${{ matrix.toxenv }} - name: Upload coverage to codecov if: ${{ contains(matrix.toxenv,'-cov') }} uses: codecov/codecov-action@v4 with: file: ./coverage.xml ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/.github/workflows/publish.yml0000644000175100001770000000247700000000000023741 0ustar00runnerdocker00000000000000name: Release on: pull_request: push: tags: - '*' jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI runs-on: ubuntu-latest if: ((github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || contains(github.event.pull_request.labels.*.name, 'Build wheels')) steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: actions/setup-python@v5 with: python-version: 3.8 - name: Install dependencies run: | sudo apt-get update sudo apt-get install graphviz python -m pip install pip build "twine>=3.3" -U - name: Build package run: python -m build --sdist --wheel . - name: List result run: ls -l dist - name: Check dist run: python -m twine check --strict dist/* - name: Test package run: | cd .. python -m venv testenv testenv/bin/pip install pip -U testenv/bin/pip install pytest cython sphinx-automodapi/dist/*.whl testenv/bin/pytest sphinx-automodapi/sphinx_automodapi/tests - name: Publish distribution 📦 to PyPI if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.pypi_password }} ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/.gitignore0000644000175100001770000000105100000000000020126 0ustar00runnerdocker00000000000000# Compiled files *.py[cod] *.a *.o *.so *.pyd __pycache__ # Ignore .c files by default to avoid including generated code. If you want to # add a non-generated .c extension, use `git add -f filename.c`. *.c # Other generated files MANIFEST sphinx_automodapi/version.py # Sphinx _build _generated # Packages/installer info *.egg *.egg-info dist build eggs parts bin var sdist develop-eggs .installed.cfg distribute-*.tar.gz # Other .cache .tox .*.swp *~ .project .pydevproject .settings .coverage cover htmlcov # Mac OSX .DS_Store # PyCharm .idea ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/.readthedocs.yml0000644000175100001770000000075600000000000021237 0ustar00runnerdocker00000000000000# .readthedocs.yml # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details version: 2 build: os: ubuntu-22.04 tools: python: "3.11" jobs: post_checkout: - git fetch --shallow-since=2023-01-01 || true sphinx: builder: html configuration: docs/conf.py fail_on_warning: true python: install: - method: pip path: . extra_requirements: - rtd # Don't build any extra formats formats: [] ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/CHANGES.rst0000644000175100001770000001024000000000000017740 0ustar00runnerdocker00000000000000Changes in sphinx-automodapi ============================ 0.18.0 (2024-09-13) ------------------- - Fixed an issue where items defined in ``__all__`` but originally imported from elsewhere, e.g. a private module, were not documented. [#190] 0.17.0 (2024-02-22) ------------------- - Fixes issue where ``__slots__`` hides class variables. [#181] - Minimum supported Python version is now 3.8. [#177] - Fixed issue with non-ascii characters in object names. [#184] 0.16.0 (2023-08-17) ------------------- - Fixed broken inheritance-diagram links due to the smart resolver. [#172] - Compatibility with Sphinx 7.2. [#172] - Minimum supported Sphinx version is now 4. [#170] 0.15.0 (2023-03-13) ------------------- - Silenced spurious warnings on configuring ``:nosignatures:``. [#158] - Fixed issue with non-ascii characters in object members when the encoding is not ``utf8``. [#153] - Allow use of ``:noindex:``, propagating this flag to autodoc. [#150] 0.14.1 (2022-01-12) ------------------- - Fixed issue with ``:skip:`` introduced by ``:include:`` feature. [#142] 0.14.0 (2021-12-22) ------------------- - Set default value for ``env.intersphinx_named_inventory``. [#136] - Sphinx 4 compatibility w.r.t. logger warning. [#129] - Add ``:include:`` option to do the opposite of ``:skip:``. [#127] - Various infrastructure/packaging updates and code clean-ups. Minimum supported Python version is now 3.7 and Sphinx 2. [#120, #124, #126, #133, #139] 0.13 (2020-09-24) ----------------- - Fixed implementation of ``allowed-package-names`` option (which did not work at all). [#111] - Ensure that generated files are always in .rst. [#112] - Update minimum required Python version to 3.6. [#117] - Fixed compatibility with Sphinx 3.0 and later. [#100] 0.12 (2019-08-15) ----------------- - Fixed compatibility with Sphinx 2.0 and later. [#86] - Updated required version of Sphinx to 1.7 and later. [#88] 0.11 (2019-05-29) ----------------- - Added a global configuration option ``automodapi_inheritance_diagram`` to control whether inheritance diagrams are shown by default. [#75] - Fix bug with smart_resolver when intersphinx inventory doesn't include any py:class entries. [#76] - Fixed compatibility with Sphinx 2.0 and later. [#79] 0.10 (2019-01-09) ----------------- - Fixed compatibility with latest developer version of Sphinx. [#61] 0.9 (2018-11-07) ---------------- - Fix issue with ABC-derived classes (``abc`` and ``collections.abc`` modules) having their members ignored in Python 3. This was only an issue when ``:inherited-members:`` was not in effect. [#53] 0.8 (2018-10-18) ---------------- - Fixed compatibility with Sphinx 1.8.x. [#51] - Make all extensions parallel-friendly. [#44] 0.7 (2018-01-18) ---------------- - Fix compatibility with Sphinx 1.7.x. [#43] 0.6 (2017-07-05) ---------------- - Fix encoding issues on platforms that default to e.g. ASCII encoding. [#33] 0.5 (2017-05-29) ---------------- - Fix a bug that caused the :inherited-members: option to apply to all subsequent automodapi directives. [#25] 0.4 (2017-05-24) ---------------- - Fix compatibility with Sphinx 1.6 and 1.7. [#22, #23] - Introduce a new ``:include-all-objects:`` option to ``automodapi`` that will include not just functions and classes in a module, but also all other objects. To help this, introduce a new ``:variables-only:`` option for ``automodsumm``. [#24] 0.3 (2017-02-20) ---------------- - Fixed installation on Python 3.4. [#21] 0.2 (2016-12-28) ---------------- - Suppress warning about re-defining autoattribute in recent versions of Sphinx. [#8] - Avoid hard-coding sphinx_automodapi module name in case this extension is bundled into another package. [#12] - Fix use of automodapi when source files are inside a source directory. [#16] - Make sure generated rst is tidy and doesn't include extraneous whitespace. [#18] 0.1 (2016-12-12) ---------------- - Fixed a bug that caused the automodapi directive to not work properly when the main module docstring was not included. [#3] - Fixed a bug that caused skipped classes in automodapi directives to still be included in inheritance diagrams. [#3] - Original code taken out of astropy-helpers ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/LICENSE.rst0000644000175100001770000000273000000000000017757 0ustar00runnerdocker00000000000000Copyright (c) 2014-2016, Astropy Developers All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Astropy Team nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/MANIFEST.in0000644000175100001770000000015500000000000017700 0ustar00runnerdocker00000000000000include README.rst include CHANGES.rst include LICENSE.rst include setup.cfg exclude *.pyc *.o prune build ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0373344 sphinx_automodapi-0.18.0/PKG-INFO0000644000175100001770000000546100000000000017244 0ustar00runnerdocker00000000000000Metadata-Version: 2.1 Name: sphinx-automodapi Version: 0.18.0 Summary: Sphinx extension for auto-generating API documentation for entire modules Home-page: https://github.com/astropy/sphinx-automodapi Author: The Astropy Developers Author-email: astropy.team@gmail.com License: BSD 3-Clause License Classifier: Development Status :: 3 - Alpha Classifier: Intended Audience :: Developers Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Operating System :: OS Independent Classifier: License :: OSI Approved :: BSD License Requires-Python: >=3.8 Description-Content-Type: text/x-rst License-File: LICENSE.rst Requires-Dist: sphinx>=4 Provides-Extra: test Requires-Dist: pytest; extra == "test" Requires-Dist: pytest-cov; extra == "test" Requires-Dist: cython; extra == "test" Requires-Dist: coverage; extra == "test" Requires-Dist: setuptools; python_version >= "3.12" and extra == "test" Provides-Extra: rtd Requires-Dist: sphinx<7; extra == "rtd" Requires-Dist: sphinx-rtd-theme; extra == "rtd" |DOI| |PyPI| |Docs| |CI Status| |Coverage Status| About ===== This is a Sphinx extension to automatically generate API pages for whole modules. It was originally developed for the Astropy project but is now available as a standalone package since it can be used for any other package. The documentation can be found on `ReadTheDocs `_. Running tests ------------- To run the tests, you can either do:: pytest sphinx_automodapi or if you have `tox `_ installed:: tox -e test .. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.5799977.svg :target: https://doi.org/10.5281/zenodo.5799977 .. |PyPI| image:: https://img.shields.io/pypi/v/sphinx-automodapi.svg :target: https://pypi.python.org/pypi/sphinx-automodapi .. |Docs| image:: https://readthedocs.org/projects/sphinx-automodapi/badge/?version=latest :target: https://sphinx-automodapi.readthedocs.io/en/latest/?badge=latest .. |CI Status| image:: https://github.com/astropy/sphinx-automodapi/workflows/CI/badge.svg :target: https://github.com/astropy/sphinx-automodapi/actions .. |Coverage Status| image:: https://codecov.io/gh/astropy/sphinx-automodapi/branch/main/graph/badge.svg :target: https://codecov.io/gh/astropy/sphinx-automodapi Development status ------------------ Due to the limitations of FOSS development model, the Astropy Project does not have enough bandwidth to add new features or fixes to this package beyond what is necessary for the project itself. Therefore, we apologize for any inconvenience caused by unresolved open issues and unmerged stale pull requests. If you have any questions or concerns, please contact the project via https://www.astropy.org/help . Thank you for your interest in this package! ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/README.rst0000644000175100001770000000342600000000000017635 0ustar00runnerdocker00000000000000|DOI| |PyPI| |Docs| |CI Status| |Coverage Status| About ===== This is a Sphinx extension to automatically generate API pages for whole modules. It was originally developed for the Astropy project but is now available as a standalone package since it can be used for any other package. The documentation can be found on `ReadTheDocs `_. Running tests ------------- To run the tests, you can either do:: pytest sphinx_automodapi or if you have `tox `_ installed:: tox -e test .. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.5799977.svg :target: https://doi.org/10.5281/zenodo.5799977 .. |PyPI| image:: https://img.shields.io/pypi/v/sphinx-automodapi.svg :target: https://pypi.python.org/pypi/sphinx-automodapi .. |Docs| image:: https://readthedocs.org/projects/sphinx-automodapi/badge/?version=latest :target: https://sphinx-automodapi.readthedocs.io/en/latest/?badge=latest .. |CI Status| image:: https://github.com/astropy/sphinx-automodapi/workflows/CI/badge.svg :target: https://github.com/astropy/sphinx-automodapi/actions .. |Coverage Status| image:: https://codecov.io/gh/astropy/sphinx-automodapi/branch/main/graph/badge.svg :target: https://codecov.io/gh/astropy/sphinx-automodapi Development status ------------------ Due to the limitations of FOSS development model, the Astropy Project does not have enough bandwidth to add new features or fixes to this package beyond what is necessary for the project itself. Therefore, we apologize for any inconvenience caused by unresolved open issues and unmerged stale pull requests. If you have any questions or concerns, please contact the project via https://www.astropy.org/help . Thank you for your interest in this package! ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0013344 sphinx_automodapi-0.18.0/docs/0000755000175100001770000000000000000000000017071 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/docs/Makefile0000644000175100001770000001674200000000000020543 0ustar00runnerdocker00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " applehelp to make an Apple Help Book" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " epub3 to make an epub3" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" @echo " coverage to run coverage check of the documentation (if enabled)" @echo " dummy to check syntax errors of document sources" .PHONY: clean clean: rm -rf $(BUILDDIR)/* .PHONY: html html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." .PHONY: dirhtml dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." .PHONY: singlehtml singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." .PHONY: pickle pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." .PHONY: json json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." .PHONY: htmlhelp htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." .PHONY: qthelp qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/sphinx-automodapi.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/sphinx-automodapi.qhc" .PHONY: applehelp applehelp: $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp @echo @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." @echo "N.B. You won't be able to view it unless you put it in" \ "~/Library/Documentation/Help or install it in your application" \ "bundle." .PHONY: devhelp devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/sphinx-automodapi" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/sphinx-automodapi" @echo "# devhelp" .PHONY: epub epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." .PHONY: epub3 epub3: $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 @echo @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." .PHONY: latex latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." .PHONY: latexpdf latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." .PHONY: latexpdfja latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." .PHONY: text text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." .PHONY: man man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." .PHONY: texinfo texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." .PHONY: info info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." .PHONY: gettext gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." .PHONY: changes changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." .PHONY: linkcheck linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." .PHONY: doctest doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." .PHONY: coverage coverage: $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage @echo "Testing of coverage in the sources finished, look at the " \ "results in $(BUILDDIR)/coverage/python.txt." .PHONY: xml xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." .PHONY: pseudoxml pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." .PHONY: dummy dummy: $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy @echo @echo "Build finished. Dummy builder generates no files." ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/docs/automodapi.rst0000644000175100001770000000177400000000000021776 0ustar00runnerdocker00000000000000Automatically generating module documentation with automodapi ============================================================= .. _automodapi: Overview -------- The main Sphinx directive provided by the sphinx-automodapi package is the ``automodapi`` directive. As described in the :ref:`quickstart` guide, before you use the directive, you will need to make sure the following extension is included in the ``extensions`` entry of your documentation's ``conf.py`` file:: extensions = ['sphinx_automodapi.automodapi'] You can then add an ``automodapi`` block anywhere that you want to generate documentation for a module:: .. automodapi:: mypackage.mymodule This will add a section with the docstring of the module, followed by a list of functions, and by a list of classes. For each function and class, a full API page will be generated. The automodapi directive and allowed options are described in more detail below. In detail --------- .. automodule:: sphinx_automodapi.automodapi ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/docs/automodsumm.rst0000644000175100001770000000154400000000000022201 0ustar00runnerdocker00000000000000Generating tables of module objects with automodsumm ==================================================== .. _automodsumm: Overview -------- The ``automodsumm`` directive takes all objects in a module and generates a table of these objects and associated API pages. The :ref:`automodapi ` directive then calls ``automodsumm`` once for functions and once for classes, and adds the module docstring - but effectively, the bulk of the work in creating the API tables and pages is done by ``automodsumm``. Nevertheless, in most cases, users should not need to call ``automodsumm`` directly, except if finer control is desired. The syntax of the directive is:: .. automodsumm:: mypackage.mymodule The automodsumm directive is described in more detail below. In detail --------- .. automodule:: sphinx_automodapi.automodsumm ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/docs/conf.py0000644000175100001770000000375600000000000020403 0ustar00runnerdocker00000000000000#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # -- General configuration ------------------------------------------------ from sphinx_automodapi import __version__ # 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.autosummary'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: source_suffix = '.rst' # The main toctree document. master_doc = 'index' # General information about the project. project = 'sphinx-automodapi' copyright = '2016, The Astropy Developers' author = 'The Astropy Developers' # 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 full version, including alpha/beta/rc tags. release = __version__ # The short X.Y version. version = '.'.join(release.split('.')[:2]) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = 'en' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # -- 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 = 'sphinx_rtd_theme' # Output file base name for HTML help builder. htmlhelp_basename = 'sphinx-automodapidoc' nitpicky = True ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/docs/index.rst0000644000175100001770000000540500000000000020736 0ustar00runnerdocker00000000000000Documentation for sphinx-automodapi =================================== The sphinx-automodapi package provides Sphinx directives that help faciliate the automatic generation of API documentation pages for Python package modules. It was originally developped for the Astropy project, but is now developed as a standalone package that can be used for any project. Installation ------------ This extension requires Sphinx 1.7 or later, and can be installed with:: pip install sphinx-automodapi The extension is also available through conda package management system. It can be installed with:: conda install -c conda-forge sphinx-automodapi .. _quickstart: Quick start ----------- To use this extension, you will need to add the following entry to the ``extensions`` list in your Sphinx ``conf.py`` file:: extensions = ['sphinx_automodapi.automodapi'] numpydoc_show_class_members = False You can then add an ``automodapi`` block anywhere that you want to generate documentation for a module:: .. automodapi:: mypackage.mymodule This will add a section with the docstring of the module, followed by a list of functions, and by a list of classes. For each function and class, a full API page will be generated. The ``numpydoc_show_class_members=False`` option is needed to avoid having methods and attributes of classes being shown multiple times. By default, sphinx_automodapi will try and make a diagram showing an inheritance graph of all the classes in the module. This requires graphviz to be installed. To disable the inheritance diagram, you can do:: .. automodapi:: mypackage.mymodule :no-inheritance-diagram: The ``automodapi`` directive takes other options that are described in more detail in the `User guide`_ below. If you are documenting a module which imports classes from other files, and you want to include an inheritance diagram for the classes, you may run into Sphinx warnings, because the class may be documented as e.g. ``astropy.table.Table`` but the class really lives at ``astropy.table.core.Table``. To fix this you can make use of the ``'sphinx_automodapi.smart_resolver'`` Sphinx extension, which will automatically try and resolve such differences. In this, case, be sure to include:: extensions = ['sphinx_automodapi.automodapi', 'sphinx_automodapi.smart_resolver'] in your ``conf.py`` file. User guide ---------- .. toctree:: :maxdepth: 1 automodapi.rst automodsumm.rst Dependency Version Guidelines ----------------------------- As a general guideline, automodapi dependencies (at the time of writing, just Sphinx) aim to maintain compatibility with versions <= 2 years old. Dependencies may be newer, however, if specific features become important to help automodapi work better or be more maintainable. ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/pyproject.toml0000644000175100001770000000031600000000000021055 0ustar00runnerdocker00000000000000[build-system] requires = ["setuptools>=30.3.0", "setuptools_scm", "wheel"] build-backend = 'setuptools.build_meta' [tool.setuptools_scm] write_to = "sphinx_automodapi/version.py" ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0373344 sphinx_automodapi-0.18.0/setup.cfg0000644000175100001770000000366000000000000017767 0ustar00runnerdocker00000000000000[metadata] name = sphinx-automodapi description = Sphinx extension for auto-generating API documentation for entire modules long_description = file:README.rst long_description_content_type = text/x-rst author = The Astropy Developers author_email = astropy.team@gmail.com license = BSD 3-Clause License url = https://github.com/astropy/sphinx-automodapi classifiers = Development Status :: 3 - Alpha Intended Audience :: Developers Programming Language :: Python Programming Language :: Python :: 3 Operating System :: OS Independent License :: OSI Approved :: BSD License [options] zip_safe = False packages = find: python_requires = >=3.8 install_requires = sphinx>=4 [options.extras_require] test = pytest pytest-cov cython coverage setuptools;python_version>='3.12' rtd = sphinx<7 sphinx-rtd-theme [options.package_data] sphinx_automodapi = templates/*/*.rst sphinx_automodapi.tests = cases/*/*.*, cases/*/*/*.*, cases/*/*/*/*.*, cases/*/*/*/*/*.*, duplicated_warning/docs/* [tool:pytest] minversion = 4.6 testpaths = sphinx_automodapi xfail_strict = true filterwarnings = error ignore:The `docutils\.parsers\.rst\.directive\.html` module will be removed:DeprecationWarning ignore:'contextfunction' is renamed to 'pass_context':DeprecationWarning ignore:'environmentfilter' is renamed to 'pass_environment':DeprecationWarning ignore:distutils Version classes are deprecated:DeprecationWarning ignore:'imghdr' is deprecated and slated for removal in Python 3.13:DeprecationWarning ignore:The alias 'sphinx\.util\.SkipProgressMessage' is deprecated ignore:The alias 'sphinx\.util\.progress_message' is deprecated ignore:Deprecated call to.*pkg_resources\.declare_namespace:DeprecationWarning ignore:pkg_resources is deprecated as an API:DeprecationWarning [flake8] max-line-length = 125 exclude = sphinx_automodapi/tests/test_autodoc_enhancements.py,sphinx_automodapi/tests/test_automodapi.py [egg_info] tag_build = tag_date = 0 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/setup.py0000644000175100001770000000007500000000000017655 0ustar00runnerdocker00000000000000#!/usr/bin/env python from setuptools import setup setup() ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0053344 sphinx_automodapi-0.18.0/sphinx_automodapi/0000755000175100001770000000000000000000000021674 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/__init__.py0000644000175100001770000000006400000000000024005 0ustar00runnerdocker00000000000000from .version import version as __version__ # noqa ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/autodoc_enhancements.py0000644000175100001770000000524600000000000026443 0ustar00runnerdocker00000000000000""" Miscellaneous enhancements to help autodoc along. """ from sphinx.ext.autodoc import AttributeDocumenter __all__ = [] class_types = (type,) MethodDescriptorType = type(type.__subclasses__) # See # https://github.com/astropy/astropy-helpers/issues/116#issuecomment-71254836 # for further background on this. def type_object_attrgetter(obj, attr, *defargs): """ This implements an improved attrgetter for type objects (i.e. classes) that can handle class attributes that are implemented as properties on a metaclass. Normally `getattr` on a class with a `property` (say, "foo"), would return the `property` object itself. However, if the class has a metaclass which *also* defines a `property` named "foo", ``getattr(cls, 'foo')`` will find the "foo" property on the metaclass and resolve it. For the purposes of autodoc we just want to document the "foo" property defined on the class, not on the metaclass. For example:: >>> class Meta(type): ... @property ... def foo(cls): ... return 'foo' ... >>> class MyClass(metaclass=Meta): ... @property ... def foo(self): ... \"\"\"Docstring for MyClass.foo property.\"\"\" ... return 'myfoo' ... >>> getattr(MyClass, 'foo') 'foo' >>> type_object_attrgetter(MyClass, 'foo') >>> type_object_attrgetter(MyClass, 'foo').__doc__ 'Docstring for MyClass.foo property.' The last line of the example shows the desired behavior for the purposes of autodoc. """ for base in obj.__mro__: if attr in base.__dict__: if isinstance(base.__dict__[attr], property): # Note, this should only be used for properties--for any other # type of descriptor (classmethod, for example) this can mess # up existing expectations of what getattr(cls, ...) returns return base.__dict__[attr] break return getattr(obj, attr, *defargs) def setup(app): # Must have the autodoc extension set up first so we can override it app.setup_extension('sphinx.ext.autodoc') app.add_autodoc_attrgetter(type, type_object_attrgetter) suppress_warnings_orig = app.config.suppress_warnings[:] if 'app.add_directive' not in app.config.suppress_warnings: app.config.suppress_warnings.append('app.add_directive') try: app.add_autodocumenter(AttributeDocumenter) finally: app.config.suppress_warnings = suppress_warnings_orig return {'parallel_read_safe': True, 'parallel_write_safe': True} ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/automodapi.py0000644000175100001770000004330500000000000024415 0ustar00runnerdocker00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This directive takes a single argument that must be a module or package. It will produce a block of documentation that includes the docstring for the package, an :ref:`automodsumm` directive, and an :ref:`automod-diagram` if there are any classes in the module. If only the main docstring of the module/package is desired in the documentation, use `automodule`_ instead of `automodapi`_. It accepts the following options: * ``:include-all-objects:`` If present, include not just functions and classes, but all objects. This includes variables, for which a possible docstring after the variable definition will be shown. * ``:inheritance-diagram:`` / ``:no-inheritance-diagram:`` Specify whether or not to show the inheritance diagram for classes. This overrides the default global configuration set in ``automodapi_inheritance_diagram``. * ``:skip: str`` This option results in the specified object being skipped, that is the object will *not* be included in the generated documentation. This option may appear any number of times to skip multiple objects. * ``:include: str`` This option is the opposite of :skip: -- if specified, only the object names that match any of the names passed to :include: will be included in the generated documentation. This option may appear multiple times to include multiple objects. * ``:no-main-docstr:`` If present, the docstring for the module/package will not be generated. The function and class tables will still be used, however. * ``:headings: str`` Specifies the characters (in one string) used as the heading levels used for the generated section. This must have at least 2 characters (any after 2 will be ignored). This also *must* match the rest of the documentation on this page for sphinx to be happy. Defaults to "-^", which matches the convention used for Python's documentation, assuming the automodapi call is inside a top-level section (which usually uses '='). * ``:no-heading:`` If specified do not create a top level heading for the section. That is, do not create a title heading with text like "packagename Package". The actual docstring for the package/module will still be shown, though, unless ``:no-main-docstr:`` is given. * ``:allowed-package-names: str`` Specifies the packages that functions/classes documented here are allowed to be from, as comma-separated list of package names. If not given, only objects that are actually in a subpackage of the package currently being documented are included. * ``:inherited-members:`` / ``:no-inherited-members:`` The global sphinx configuration option ``automodsumm_inherited_members`` decides if members that a class inherits from a base class are included in the generated documentation. The option ``:inherited-members:`` or ``:no-inherited-members:`` allows the user to overrride the global setting. * ``:noindex:`` Propagates the ``noindex`` flag to autodoc. Use it to avoid duplicate objects warnings. * ``:sort:`` If the module contains ``__all__``, sort the module's objects alphabetically (if ``__all__`` is not present, the objects are found using `dir`, which always gives a sorted list). This extension also adds five sphinx configuration options: * ``automodapi_inheritance_diagram`` Should be a boolean that indicates whether to show inheritance diagrams by default. This can be overriden on a case by case basis with ``:inheritance-diagram:`` and ``:no-inheritance-diagram:``. Defaults to ``True``. * ``automodapi_toctreedirnm`` This must be a string that specifies the name of the directory the automodsumm generated documentation ends up in. This directory path should be relative to the documentation root (e.g., same place as ``index.rst``). Defaults to ``'api'``. * ``automodapi_writereprocessed`` Should be a bool, and if `True`, will cause `automodapi`_ to write files with any `automodapi`_ sections replaced with the content Sphinx processes after `automodapi`_ has run. The output files are not actually used by sphinx, so this option is only for figuring out the cause of sphinx warnings or other debugging. Defaults to `False`. * ``automodsumm_inherited_members`` Should be a bool and if ``True`` members that a class inherits from a base class are included in the generated documentation. Defaults to ``False``. * ``automodsumm_included_members`` A list of strings containing the names of hidden class members that should be included in the documentation. This is most commonly used to add special class methods like ``__getitem__`` and ``__setitem__``. Defaults to ``['__init__', '__call__']``. .. _automodule: http://sphinx-doc.org/latest/ext/autodoc.html?highlight=automodule#directive-automodule """ # Implementation note: # The 'automodapi' directive is not actually implemented as a docutils # directive. Instead, this extension searches for the 'automodapi' text in # all sphinx documents, and replaces it where necessary from a template built # into this extension. This is necessary because automodsumm (and autosummary) # use the "builder-inited" event, which comes before the directives are # actually built. import inspect import os import re import sys from sphinx.util import logging from .utils import find_mod_objs __all__ = [] automod_templ_modheader = """ {modname} {pkgormod} {modhds}{pkgormodhds} {automoduleline} """ automod_templ_classes = """ Classes {clshds} .. automodsumm:: {modname} :classes-only: {clsfuncoptions} """ automod_templ_funcs = """ Functions {funchds} .. automodsumm:: {modname} :functions-only: {clsfuncoptions} """ automod_templ_vars = """ Variables {otherhds} .. automodsumm:: {modname} :variables-only: {clsfuncoptions} """ automod_templ_inh = """ Class Inheritance Diagram {clsinhsechds} .. automod-diagram:: {modname} :private-bases: :parts: 1 {allowedpkgnms} {skip} """ _automodapirex = re.compile(r'^(?:\.\.\s+automodapi::\s*)([A-Za-z0-9_.]+)' r'\s*$((?:\n\s+:[a-zA-Z_\-]+:.*$)*)', flags=re.MULTILINE) # the last group of the above regex is intended to go into finall with the below _automodapiargsrex = re.compile(r':([a-zA-Z_\-]+):(.*)$', flags=re.MULTILINE) def automodapi_replace(sourcestr, app, dotoctree=True, docname=None, warnings=True): """ Replaces `sourcestr`'s entries of ".. automodapi::" with the automodapi template form based on provided options. This is used with the sphinx event 'source-read' to replace `automodapi`_ entries before sphinx actually processes them, as automodsumm needs the code to be present to generate stub documentation. Parameters ---------- sourcestr : str The string with sphinx source to be checked for automodapi replacement. app : `sphinx.application.Application` The sphinx application. dotoctree : bool If `True`, a ":toctree:" option will be added in the ".. automodsumm::" sections of the template, pointing to the appropriate "generated" directory based on the Astropy convention (e.g. in ``docs/api``) docname : str The name of the file for this `sourcestr` (if known - if not, it can be `None`). If not provided and `dotoctree` is `True`, the generated files may end up in the wrong place. warnings : bool If `False`, all warnings that would normally be issued are silenced. Returns ------- newstr :str The string with automodapi entries replaced with the correct sphinx markup. """ logger = logging.getLogger(__name__) spl = _automodapirex.split(sourcestr) if len(spl) > 1: # automodsumm is in this document # Use app.srcdir because api folder should be inside source folder not # at folder where sphinx is run. if dotoctree: toctreestr = ':toctree: ' api_dir = os.path.join(app.srcdir, app.config.automodapi_toctreedirnm) if docname is None: doc_path = app.srcdir else: doc_path = os.path.dirname(os.path.join(app.srcdir, docname)) toctreestr += os.path.relpath(api_dir, doc_path).replace(os.sep, '/') else: toctreestr = '' newstrs = [spl[0]] for grp in range(len(spl) // 3): modnm = spl[grp * 3 + 1] # find where this is in the document for warnings if docname is None: location = None else: location = (docname, spl[0].count('\n')) # initialize default options toskip = [] includes = [] inhdiag = app.config.automodapi_inheritance_diagram maindocstr = True top_head = True hds = '-^' allowedpkgnms = [] allowothers = False noindex = False sort = False # look for actual options unknownops = [] inherited_members = None for opname, args in _automodapiargsrex.findall(spl[grp * 3 + 2]): if opname == 'skip': toskip.append(args.strip()) elif opname == 'include': includes.append(args.strip()) elif opname == 'inheritance-diagram': inhdiag = True elif opname == 'no-inheritance-diagram': inhdiag = False elif opname == 'no-main-docstr': maindocstr = False elif opname == 'headings': hds = args elif opname == 'no-heading': top_head = False elif opname == 'allowed-package-names': allowedpkgnms.extend(arg.strip() for arg in args.split(',')) elif opname == 'inherited-members': inherited_members = True elif opname == 'no-inherited-members': inherited_members = False elif opname == 'include-all-objects': allowothers = True elif opname == 'noindex': noindex = True elif opname == 'sort': sort = True else: unknownops.append(opname) # join all the allowedpkgnms if len(allowedpkgnms) == 0: allowedpkgnms = '' onlylocals = True else: onlylocals = allowedpkgnms allowedpkgnms = ':allowed-package-names: ' + ','.join(allowedpkgnms) # get the two heading chars hds = hds.strip() if len(hds) < 2: msg = 'Not enough headings (got {0}, need 2), using default -^' if warnings: logger.warning(msg.format(len(hds)), location) hds = '-^' h1, h2 = hds[:2] # tell sphinx that the remaining args are invalid. if len(unknownops) > 0 and app is not None: opsstrs = ','.join(unknownops) msg = 'Found additional options ' + opsstrs + ' in automodapi.' if warnings: logger.warning(msg, location) ispkg, hascls, hasfuncs, hasother, toskip = _mod_info( modnm, toskip, includes, onlylocals=onlylocals) # add automodule directive only if no-main-docstr isn't present if maindocstr: automodline = '.. automodule:: {modname}'.format(modname=modnm) else: automodline = '' if top_head: newstrs.append(automod_templ_modheader.format( modname=modnm, modhds=h1 * len(modnm), pkgormod='Package' if ispkg else 'Module', pkgormodhds=h1 * (8 if ispkg else 7), automoduleline=automodline)) # noqa else: newstrs.append(automod_templ_modheader.format( modname='', modhds='', pkgormod='', pkgormodhds='', automoduleline=automodline)) # construct the options for the class/function sections # start out indented at 4 spaces, but need to keep the indentation. clsfuncoptions = [] if toctreestr: clsfuncoptions.append(toctreestr) if noindex: clsfuncoptions.append(':noindex:') if sort: clsfuncoptions.append(':sort:') if toskip: clsfuncoptions.append(':skip: ' + ','.join(toskip)) if allowedpkgnms: clsfuncoptions.append(allowedpkgnms) if hascls: # This makes no sense unless there are classes. if inherited_members is True: clsfuncoptions.append(':inherited-members:') if inherited_members is False: clsfuncoptions.append(':no-inherited-members:') clsfuncoptionstr = '\n '.join(clsfuncoptions) if hasfuncs: newstrs.append(automod_templ_funcs.format( modname=modnm, funchds=h2 * 9, clsfuncoptions=clsfuncoptionstr)) if hascls: newstrs.append(automod_templ_classes.format( modname=modnm, clshds=h2 * 7, clsfuncoptions=clsfuncoptionstr)) if allowothers and hasother: newstrs.append(automod_templ_vars.format( modname=modnm, otherhds=h2 * 9, clsfuncoptions=clsfuncoptionstr)) if inhdiag and hascls: # add inheritance diagram if any classes are in the module if toskip: clsskip = ':skip: ' + ','.join(toskip) else: clsskip = '' diagram_entry = automod_templ_inh.format( modname=modnm, clsinhsechds=h2 * 25, allowedpkgnms=allowedpkgnms, skip=clsskip) diagram_entry = diagram_entry.replace(' \n', '') newstrs.append(diagram_entry) newstrs.append(spl[grp * 3 + 3]) newsourcestr = ''.join(newstrs) if app.config.automodapi_writereprocessed: # sometimes they are unicode, sometimes not, depending on how # sphinx has processed things if isinstance(newsourcestr, str): ustr = newsourcestr else: ustr = newsourcestr.decode(app.config.source_encoding) if docname is None: with open(os.path.join(app.srcdir, 'unknown.automodapi'), 'a', encoding='utf8') as f: f.write(u'\n**NEW DOC**\n\n') f.write(ustr) else: env = app.builder.env # Determine the filename associated with this doc (specifically # the extension) filename = docname + os.path.splitext(env.doc2path(docname))[1] filename += '.automodapi' with open(os.path.join(app.srcdir, filename), 'w', encoding='utf8') as f: f.write(ustr) return newsourcestr else: return sourcestr def _mod_info(modname, toskip=[], include=[], onlylocals=True): """ Determines if a module is a module or a package and whether or not it has classes or functions. """ hascls = hasfunc = hasother = False skips = toskip.copy() for localnm, fqnm, obj in zip(*find_mod_objs(modname, onlylocals=onlylocals)): if include and localnm not in include and localnm not in skips: skips.append(localnm) elif localnm not in toskip: hascls = hascls or inspect.isclass(obj) hasfunc = hasfunc or inspect.isroutine(obj) hasother = hasother or (not inspect.isclass(obj) and not inspect.isroutine(obj)) if hascls and hasfunc and hasother: break # find_mod_objs has already imported modname # TODO: There is probably a cleaner way to do this, though this is pretty # reliable for all Python versions for most cases that we care about. pkg = sys.modules[modname] ispkg = (hasattr(pkg, '__file__') and isinstance(pkg.__file__, str) and os.path.split(pkg.__file__)[1].startswith('__init__.py')) return ispkg, hascls, hasfunc, hasother, skips def process_automodapi(app, docname, source): source[0] = automodapi_replace(source[0], app, True, docname) def setup(app): app.setup_extension('sphinx.ext.autosummary') # Note: we use __name__ here instead of just writing the module name in # case this extension is bundled into another package from . import automodsumm app.setup_extension(automodsumm.__name__) app.connect('source-read', process_automodapi) app.add_config_value('automodapi_inheritance_diagram', True, True) app.add_config_value('automodapi_toctreedirnm', 'api', True) app.add_config_value('automodapi_writereprocessed', False, True) return {'parallel_read_safe': True, 'parallel_write_safe': True} ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/automodsumm.py0000644000175100001770000006755100000000000024636 0ustar00runnerdocker00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This directive will produce an "autosummary"-style table for public attributes of a specified module. See the `sphinx.ext.autosummary`_ extension for details on this process. The main difference from the `autosummary`_ directive is that `autosummary`_ requires manually inputting all attributes that appear in the table, while this captures the entries automatically. This directive requires a single argument that must be a module or package. It also accepts any options supported by the `autosummary`_ directive- see `sphinx.ext.autosummary`_ for details. It also accepts some additional options: * ``:classes-only:`` If present, the autosummary table will only contain entries for classes. This cannot be used at the same time with ``:functions-only:`` or ``:variables-only:``. * ``:functions-only:`` If present, the autosummary table will only contain entries for functions. This cannot be used at the same time with ``:classes-only:`` or ``:variables-only:``. * ``:variables-only:`` If present, the autosummary table will only contain entries for variables (everything except functions and classes). This cannot be used at the same time with ``:classes-only:`` or ``:functions-only:``. * ``:skip: obj1, [obj2, obj3, ...]`` If present, specifies that the listed objects should be skipped and not have their documentation generated, nor be included in the summary table. * ``:allowed-package-names: pkgormod1, [pkgormod2, pkgormod3, ...]`` Specifies the packages that functions/classes documented here are allowed to be from, as comma-separated list of package names. If not given, only objects that are actually in a subpackage of the package currently being documented are included. * ``:inherited-members:`` or ``:no-inherited-members:`` The global sphinx configuration option ``automodsumm_inherited_members`` decides if members that a class inherits from a base class are included in the generated documentation. The flags ``:inherited-members:`` or ``:no-inherited-members:`` allows overrriding this global setting. * ``:sort:`` If the module contains ``__all__``, sort the module's objects alphabetically (if ``__all__`` is not present, the objects are found using `dir`, which always gives a sorted list). This extension also adds three sphinx configuration options: * ``automodsumm_writereprocessed`` Should be a bool, and if ``True``, will cause `automodsumm`_ to write files with any ``automodsumm`` sections replaced with the content Sphinx processes after ``automodsumm`` has run. The output files are not actually used by sphinx, so this option is only for figuring out the cause of sphinx warnings or other debugging. Defaults to ``False``. * ``automodsumm_inherited_members`` Should be a bool and if ``True``, will cause `automodsumm`_ to document class members that are inherited from a base class. This value can be overriden for any particular automodsumm directive by including the ``:inherited-members:`` or ``:no-inherited-members:`` options. Defaults to ``False``. * ``automodsumm_included_members`` A list of strings containing the names of hidden class members that should be included in the documentation. This is most commonly used to add special class methods like ``__getitem__`` and ``__setitem__``. Defaults to ``['__init__', '__call__']``. .. _sphinx.ext.autosummary: http://sphinx-doc.org/latest/ext/autosummary.html .. _autosummary: http://sphinx-doc.org/latest/ext/autosummary.html#directive-autosummary .. _automod-diagram: automod-diagram directive ========================= This directive will produce an inheritance diagram like that of the `sphinx.ext.inheritance_diagram`_ extension. This directive requires a single argument that must be a module or package. It accepts no options. .. note:: Like 'inheritance-diagram', 'automod-diagram' requires `graphviz `_ to generate the inheritance diagram. .. _sphinx.ext.inheritance_diagram: http://sphinx-doc.org/latest/ext/inheritance.html """ import inspect import os import re from sphinx.util import logging from sphinx.ext.autosummary import Autosummary from sphinx.ext.inheritance_diagram import InheritanceDiagram, InheritanceGraph, try_import from docutils.parsers.rst.directives import flag from .utils import find_mod_objs, cleanup_whitespace __all__ = ['Automoddiagram', 'Automodsumm', 'automodsumm_to_autosummary_lines', 'generate_automodsumm_docs', 'process_automodsumm_generation'] logger = logging.getLogger(__name__) def _str_list_converter(argument): """ A directive option conversion function that converts the option into a list of strings. Used for 'skip' option. """ if argument is None: return [] else: return [s.strip() for s in argument.split(',')] class Automodsumm(Autosummary): required_arguments = 1 optional_arguments = 0 final_argument_whitespace = False has_content = False option_spec = dict(Autosummary.option_spec) option_spec['functions-only'] = flag option_spec['classes-only'] = flag option_spec['variables-only'] = flag option_spec['skip'] = _str_list_converter option_spec['allowed-package-names'] = _str_list_converter option_spec['inherited-members'] = flag option_spec['no-inherited-members'] = flag option_spec['noindex'] = flag option_spec['sort'] = flag def run(self): env = self.state.document.settings.env modname = self.arguments[0] nodelist = [] try: localnames, fqns, objs = find_mod_objs(modname, sort='sort' in self.options) except ImportError: logger.warning("Couldn't import module " + modname) return [] try: # set self.content to trick the autosummary internals. # Be sure to respect functions-only and classes-only. funconly = 'functions-only' in self.options clsonly = 'classes-only' in self.options varonly = 'variables-only' in self.options if [clsonly, funconly, varonly].count(True) > 1: logger.warning('more than one of "functions-only", "classes-only", ' 'or "variables-only" defined. Ignoring.') clsonly = funconly = varonly = False skipnames = [] if 'skip' in self.options: option_skipnames = set(self.options['skip']) for lnm in localnames: if lnm in option_skipnames: option_skipnames.remove(lnm) skipnames.append(lnm) if len(option_skipnames) > 0: logger.warning('Tried to skip objects {objs} in module {mod}, ' 'but they were not present. Ignoring.' .format(objs=option_skipnames, mod=modname)) if funconly: cont = [] for nm, obj in zip(localnames, objs): if nm not in skipnames and inspect.isroutine(obj): cont.append(nm) elif clsonly: cont = [] for nm, obj in zip(localnames, objs): if nm not in skipnames and inspect.isclass(obj): cont.append(nm) elif varonly: cont = [] for nm, obj in zip(localnames, objs): if nm not in skipnames and not (inspect.isclass(obj) or inspect.isroutine(obj)): cont.append(nm) else: cont = [nm for nm in localnames if nm not in skipnames] self.content = cont # for some reason, even though ``currentmodule`` is substituted in, # sphinx doesn't necessarily recognize this fact. So we just force # it internally, and that seems to fix things env.temp_data['py:module'] = modname env.ref_context['py:module'] = modname # can't use super because Sphinx/docutils has trouble return # super(Autosummary,self).run() nodelist.extend(Autosummary.run(self)) return nodelist finally: # has_content = False for the Automodsumm self.content = [] def get_items(self, names): try: self.bridge.genopt['imported-members'] = True except AttributeError: # Sphinx < 4.0 self.genopt['imported-members'] = True return Autosummary.get_items(self, names) # <-------------------automod-diagram stuff-----------------------------------> class Automoddiagram(InheritanceDiagram): option_spec = dict(InheritanceDiagram.option_spec) option_spec['allowed-package-names'] = _str_list_converter option_spec['skip'] = _str_list_converter def run(self): try: ols = self.options.get('allowed-package-names', []) ols = True if len(ols) == 0 else ols # if none are given, assume only local nms, objs = find_mod_objs(self.arguments[0], onlylocals=ols)[1:] except ImportError: logger.warning("Couldn't import module " + self.arguments[0]) return [] # Check if some classes should be skipped skip = self.options.get('skip', []) clsnms = [] for n, o in zip(nms, objs): if n.split('.')[-1] in skip: continue if inspect.isclass(o): clsnms.append(n) oldargs = self.arguments try: if len(clsnms) > 0: self.arguments = [' '.join(clsnms)] return InheritanceDiagram.run(self) finally: self.arguments = oldargs # sphinx.ext.inheritance_diagram generates a list of class full names and # generates a mapping from class full names to documentation URLs. However, the # smart resolver in sphinx-automodapi causes the generated mapping to be instead # from class documented name to documentation URLs. The class documented name # can be different from the class full name if the class is not documented where # it is defined, but rather at some other location where it is imported. In # such situations, the code will fail to find the URL that for the class. # The following code monkey-patches the method that receives the mapping and # converts the keys from class documented names to class full names. old_generate_dot = InheritanceGraph.generate_dot def patched_generate_dot(self, name, urls={}, env=None, graph_attrs={}, node_attrs={}, edge_attrs={}): # Make a new mapping dictionary that uses class full names by importing each # class documented name fullname_urls = {self.class_name(try_import(name), 0, None): url for name, url in urls.items() if try_import(name) is not None} return old_generate_dot(self, name, urls=fullname_urls, env=env, graph_attrs=graph_attrs, node_attrs=node_attrs, edge_attrs=edge_attrs) InheritanceGraph.generate_dot = patched_generate_dot # <---------------------automodsumm generation stuff--------------------------> def process_automodsumm_generation(app): env = app.builder.env filestosearch = [] for docname in env.found_docs: filename = env.doc2path(docname) if os.path.isfile(filename): filestosearch.append(docname + os.path.splitext(filename)[1]) liness = [] for sfn in filestosearch: lines = automodsumm_to_autosummary_lines(sfn, app) liness.append(lines) if app.config.automodsumm_writereprocessed: if lines: # empty list means no automodsumm entry is in the file outfn = os.path.join(app.srcdir, sfn) + '.automodsumm' with open(outfn, 'w', encoding='utf8') as f: for l in lines: # noqa: E741 f.write(l) f.write('\n') for sfn, lines in zip(filestosearch, liness): if len(lines) > 0: generate_automodsumm_docs( lines, sfn, app=app, builder=app.builder, base_path=app.srcdir, inherited_members=app.config.automodsumm_inherited_members, included_members=app.config.automodsumm_included_members) # _automodsummrex = re.compile(r'^(\s*)\.\. automodsumm::\s*([A-Za-z0-9_.]+)\s*' # r'\n\1(\s*)(\S|$)', re.MULTILINE) _lineendrex = r'(?:\n|$)' _hdrex = r'^\n?(\s*)\.\. automodsumm::\s*(\S+)\s*' + _lineendrex _oprex1 = r'(?:\1(\s+)\S.*' + _lineendrex + ')' _oprex2 = r'(?:\1\4\S.*' + _lineendrex + ')' _automodsummrex = re.compile(_hdrex + '(' + _oprex1 + '?' + _oprex2 + '*)', re.MULTILINE) def automodsumm_to_autosummary_lines(fn, app): """ Generates lines from a file with an "automodsumm" entry suitable for feeding into "autosummary". Searches the provided file for `automodsumm` directives and returns a list of lines specifying the `autosummary` commands for the modules requested. This does *not* return the whole file contents - just an autosummary section in place of any :automodsumm: entries. Note that any options given for `automodsumm` are also included in the generated `autosummary` section. Parameters ---------- fn : str The name of the file to search for `automodsumm` entries. app : sphinx.application.Application The sphinx Application object Returns ------- lines : list of str Lines for all `automodsumm` entries with the entries replaced by `autosummary` and the module's members added. """ fullfn = os.path.join(app.builder.env.srcdir, fn) with open(fullfn, encoding='utf8') as fr: # Note: we use __name__ here instead of just writing the module name in # case this extension is bundled into another package from . import automodapi try: extensions = app.extensions except AttributeError: # Sphinx <1.6 extensions = app._extensions if automodapi.__name__ in extensions: # Must do the automodapi on the source to get the automodsumm # that might be in there docname = os.path.splitext(fn)[0] filestr = automodapi.automodapi_replace(fr.read(), app, True, docname, False) else: filestr = fr.read() spl = _automodsummrex.split(filestr) # 0th entry is the stuff before the first automodsumm line indent1s = spl[1::5] mods = spl[2::5] opssecs = spl[3::5] indent2s = spl[4::5] remainders = spl[5::5] # only grab automodsumm sections and convert them to autosummary with the # entries for all the public objects newlines = [] # loop over all automodsumms in this document for i, (i1, i2, modnm, ops, rem) in enumerate(zip(indent1s, indent2s, mods, opssecs, remainders)): allindent = i1 + (' ' if i2 is None else i2) # filter out functions-only, classes-only, variables-only, and sort # options if present. oplines = ops.split('\n') toskip = [] allowedpkgnms = [] funcsonly = clssonly = varsonly = sort = False for i, ln in reversed(list(enumerate(oplines))): if ':functions-only:' in ln: funcsonly = True del oplines[i] if ':classes-only:' in ln: clssonly = True del oplines[i] if ':variables-only:' in ln: varsonly = True del oplines[i] if ':skip:' in ln: toskip.extend(_str_list_converter(ln.replace(':skip:', ''))) del oplines[i] if ':allowed-package-names:' in ln: allowedpkgnms.extend(_str_list_converter(ln.replace(':allowed-package-names:', ''))) del oplines[i] if ':sort:' in ln: sort = True del oplines[i] if [funcsonly, clssonly, varsonly].count(True) > 1: msg = ('Defined more than one of functions-only, classes-only, ' 'and variables-only. Skipping this directive.') lnnum = sum([spl[j].count('\n') for j in range(i * 5 + 1)]) logger.warning('[automodsumm] ' + msg, (fn, lnnum)) continue # Use the currentmodule directive so we can just put the local names # in the autosummary table. Note that this doesn't always seem to # actually "take" in Sphinx's eyes, so in `Automodsumm.run`, we have to # force it internally, as well. newlines.extend([i1 + '.. currentmodule:: ' + modnm, '', '.. autosummary::']) newlines.extend(oplines) ols = True if len(allowedpkgnms) == 0 else allowedpkgnms for nm, fqn, obj in zip(*find_mod_objs(modnm, onlylocals=ols, sort=sort)): if nm in toskip: continue if funcsonly and not inspect.isroutine(obj): continue if clssonly and not inspect.isclass(obj): continue if varsonly and (inspect.isclass(obj) or inspect.isroutine(obj)): continue newlines.append(allindent + nm) # add one newline at the end of the autosummary block newlines.append('') return newlines def generate_automodsumm_docs(lines, srcfn, app=None, suffix='.rst', base_path=None, builder=None, template_dir=None, inherited_members=False, included_members=('__init__', '__call__')): """ This function is adapted from `sphinx.ext.autosummary.generate.generate_autosummmary_docs` to generate source for the automodsumm directives that should be autosummarized. Unlike generate_autosummary_docs, this function is called one file at a time. """ from sphinx.jinja2glue import BuiltinTemplateLoader from sphinx.ext.autosummary import import_by_name, get_documenter from sphinx.util.osutil import ensuredir from sphinx.util.inspect import safe_getattr from jinja2 import FileSystemLoader, TemplateNotFound from jinja2.sandbox import SandboxedEnvironment from .utils import find_autosummary_in_lines_for_automodsumm as find_autosummary_in_lines # Create our own templating environment - here we use Astropy's # templates rather than the default autosummary templates, in order to # allow docstrings to be shown for methods. template_dirs = [os.path.join(os.path.dirname(__file__), 'templates'), os.path.join(base_path, '_templates')] if builder is not None: # allow the user to override the templates template_loader = BuiltinTemplateLoader() template_loader.init(builder, dirs=template_dirs) else: if template_dir: template_dirs.insert(0, template_dir) template_loader = FileSystemLoader(template_dirs) template_env = SandboxedEnvironment(loader=template_loader) # read # items = find_autosummary_in_files(sources) items = find_autosummary_in_lines(lines, filename=srcfn) if len(items) > 0: msg = '[automodsumm] {1}: found {0} automodsumm entries to generate' logger.info(msg.format(len(items), srcfn)) # gennms = [item[0] for item in items] # if len(gennms) > 20: # gennms = gennms[:10] + ['...'] + gennms[-10:] # logger.info('[automodsumm] generating autosummary for: ' + ', '.join(gennms)) # remove possible duplicates items = list(set(items)) # keep track of new files new_files = [] # write for name, path, template_name, inherited_mem, noindex in sorted(items): if path is None: # The corresponding autosummary:: directive did not have # a :toctree: option continue path = os.path.abspath(os.path.join(base_path, path)) ensuredir(path) try: import_by_name_values = import_by_name(name) except ImportError as e: logger.warning('[automodsumm] failed to import %r: %s' % (name, e)) continue # if block to accommodate Sphinx's v1.2.2 and v1.2.3 respectively if len(import_by_name_values) == 3: name, obj, parent = import_by_name_values elif len(import_by_name_values) == 4: name, obj, parent, module_name = import_by_name_values fn = os.path.join(path, name + suffix) # skip it if it exists if os.path.isfile(fn): continue new_files.append(fn) f = open(fn, 'w', encoding='utf8') try: doc = get_documenter(app, obj, parent) if template_name is not None: template = template_env.get_template(template_name) else: tmplstr = 'autosummary_core/%s.rst' try: template = template_env.get_template(tmplstr % doc.objtype) except TemplateNotFound: template = template_env.get_template(tmplstr % 'base') def get_members_mod(obj, typ, include_public=[]): """ typ = None -> all """ items = [] for name in dir(obj): try: documenter = get_documenter(app, safe_getattr(obj, name), obj) except AttributeError: continue if typ is None or documenter.objtype == typ: items.append(name) public = [x for x in items if x in include_public or not x.startswith('_')] return public, items def get_members_class(obj, typ, include_public=[], include_base=False): """ typ = None -> all include_base -> include attrs that are from a base class """ items = [] # using dir gets all of the attributes, including the elements # from the base class, otherwise use __dict__ if include_base: names = dir(obj) else: names = getattr(obj, '__dict__').keys() for name in names: try: documenter = get_documenter(app, safe_getattr(obj, name), obj) except AttributeError: continue if typ is None or documenter.objtype == typ: items.append(name) elif typ == 'attribute' and documenter.objtype == 'property': # In Sphinx 2.0 and above, properties have a separate # objtype, but we treat them the same here. items.append(name) public = [x for x in items if x in include_public or not x.startswith('_')] return public, items ns = {} if doc.objtype == 'module': ns['members'] = get_members_mod(obj, None) ns['functions'], ns['all_functions'] = \ get_members_mod(obj, 'function') ns['classes'], ns['all_classes'] = \ get_members_mod(obj, 'class') ns['exceptions'], ns['all_exceptions'] = \ get_members_mod(obj, 'exception') elif doc.objtype == 'class': if inherited_mem is not None: # option set in this specifc directive include_base = inherited_mem else: # use default value include_base = inherited_members ns['members'] = get_members_class(obj, None, include_base=include_base) ns['methods'], ns['all_methods'] = \ get_members_class(obj, 'method', included_members, include_base=include_base) ns['attributes'], ns['all_attributes'] = \ get_members_class(obj, 'attribute', include_base=include_base) ns['methods'].sort() ns['attributes'].sort() parts = name.split('.') if doc.objtype in ('method', 'attribute'): mod_name = '.'.join(parts[:-2]) cls_name = parts[-2] obj_name = '.'.join(parts[-2:]) ns['class'] = cls_name else: mod_name, obj_name = '.'.join(parts[:-1]), parts[-1] ns['noindex'] = noindex ns['fullname'] = name ns['module'] = mod_name ns['objname'] = obj_name ns['name'] = parts[-1] ns['objtype'] = doc.objtype ns['underline'] = len(obj_name) * '=' # We now check whether a file for reference footnotes exists for # the module being documented. We first check if the # current module is a file or a directory, as this will give a # different path for the reference file. For example, if # documenting astropy.wcs then the reference file is at # ../wcs/references.txt, while if we are documenting # astropy.config.logging_helper (which is at # astropy/config/logging_helper.py) then the reference file is set # to ../config/references.txt if '.' in mod_name: mod_name_dir = mod_name.split('.', 1)[1].replace('.', os.sep) else: mod_name_dir = mod_name if (not os.path.isdir(os.path.join(base_path, mod_name_dir)) and os.path.isdir(os.path.join(base_path, mod_name_dir.rsplit(os.sep, 1)[0]))): mod_name_dir = mod_name_dir.rsplit(os.sep, 1)[0] # We then have to check whether it exists, and if so, we pass it # to the template. if os.path.exists(os.path.join(base_path, mod_name_dir, 'references.txt')): # An important subtlety here is that the path we pass in has # to be relative to the file being generated, so we have to # figure out the right number of '..'s ndirsback = path.replace(str(base_path), '').count(os.sep) ref_file_rel_segments = ['..'] * ndirsback ref_file_rel_segments.append(mod_name_dir) ref_file_rel_segments.append('references.txt') ns['referencefile'] = os.path.join(*ref_file_rel_segments).replace(os.sep, '/') rendered = template.render(**ns) f.write(cleanup_whitespace(rendered)) finally: f.close() def setup(app): # need autodoc fixes # Note: we use __name__ here instead of just writing the module name in # case this extension is bundled into another package from . import autodoc_enhancements app.setup_extension(autodoc_enhancements.__name__) # need inheritance-diagram for automod-diagram app.setup_extension('sphinx.ext.inheritance_diagram') app.add_directive('automod-diagram', Automoddiagram) app.add_directive('automodsumm', Automodsumm) app.connect('builder-inited', process_automodsumm_generation) app.add_config_value('automodsumm_writereprocessed', False, True) app.add_config_value('automodsumm_inherited_members', False, 'env') app.add_config_value( 'automodsumm_included_members', ['__init__', '__call__'], 'env') return {'parallel_read_safe': True, 'parallel_write_safe': True} ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/smart_resolver.py0000644000175100001770000001327300000000000025323 0ustar00runnerdocker00000000000000# Licensed under a 3-clause BSD style license - see LICENSE.rst """ The classes in the astropy docs are documented by their API location, which is not necessarily where they are defined in the source. This causes a problem when certain automated features of the doc build, such as the inheritance diagrams or the `Bases` list of a class reference a class by its canonical location rather than its "user" location. In the `autodoc-process-docstring` event, a mapping from the actual name to the API name is maintained. Later, in the `missing-reference` event, unresolved references are looked up in this dictionary and corrected if possible. """ from docutils.nodes import literal, reference def process_docstring(app, what, name, obj, options, lines): if isinstance(obj, type): env = app.env if not hasattr(env, 'class_name_mapping'): env.class_name_mapping = {} mapping = env.class_name_mapping mapping[obj.__module__ + '.' + obj.__name__] = name def merge_mapping(app, env, docnames, env_other): if not hasattr(env_other, 'class_name_mapping'): return if not hasattr(env, 'class_name_mapping'): env.class_name_mapping = {} env.class_name_mapping.update(env_other.class_name_mapping) def missing_reference_handler(app, env, node, contnode): """ Handler to be connect to the sphinx 'missing-reference' event. The handler a resolves reference (node) and returns a new node when sphinx could not originally resolve the reference. see `missing-reference in sphinx documentation `_ :param app: The Sphinx application object :param env: The build environment (``app.builder.env`) :param node: The ``pending_xref`` node to be resolved. Its attributes reftype, reftarget, modname and classname attributes determine the type and target of the reference. :param contnode: The node that carries the text and formatting inside the future reference and should be a child of the returned reference node. """ # a good example of how a missing reference handle works look to # https://github.com/sphinx-doc/sphinx/issues/1572#issuecomment-68590981 # # Important attributes of the "node": # # example role: :ref:`title ` # # 'reftype' - role name (in the example above 'ref' is the reftype) # 'reftarget' - target of the role, as given in the role content # (in the example 'target' is the reftarget # 'refexplicit' - the explicit title of the role # (in the example 'title' is the refexplicit) # 'refdoc' - document in which the role appeared # 'refdomain' - domain of the role, in our case emtpy if not hasattr(env, 'class_name_mapping'): env.class_name_mapping = {} mapping = env.class_name_mapping reftype = node['reftype'] reftarget = node['reftarget'] refexplicit = node.get('refexplicit') # default: None refdoc = node.get('refdoc', env.docname) if reftype in ('obj', 'class', 'exc', 'meth'): suffix = '' if reftarget not in mapping: if '.' in reftarget: front, suffix = reftarget.rsplit('.', 1) else: front = None suffix = reftarget if suffix.startswith('_') and not suffix.startswith('__'): # If this is a reference to a hidden class or method, # we can't link to it, but we don't want to have a # nitpick warning. return node[0].deepcopy() if reftype in ('obj', 'meth') and front is not None: if front in mapping: reftarget = front suffix = '.' + suffix if (reftype in ('class', ) and '.' in reftarget and reftarget not in mapping): if '.' in front: reftarget, _ = front.rsplit('.', 1) suffix = '.' + suffix reftarget = reftarget + suffix prefix = reftarget.rsplit('.')[0] inventory = getattr(env, 'intersphinx_named_inventory', {}) if (reftarget not in mapping and prefix in inventory): if 'py:class' in inventory[prefix] and \ reftarget in inventory[prefix]['py:class']: newtarget = inventory[prefix]['py:class'][reftarget][2] if not refexplicit and '~' not in node.rawsource: contnode = literal(text=reftarget) newnode = reference('', '', internal=True) newnode['reftitle'] = reftarget newnode['refuri'] = newtarget newnode.append(contnode) return newnode if reftarget in mapping: newtarget = mapping[reftarget] + suffix if not refexplicit and '~' not in node.rawsource: contnode = literal(text=newtarget) newnode = env.domains['py'].resolve_xref(env, refdoc, app.builder, 'class', newtarget, node, contnode) if newnode is not None: newnode['reftitle'] = reftarget return newnode def setup(app): app.connect('autodoc-process-docstring', process_docstring) app.connect('missing-reference', missing_reference_handler) app.connect('env-merge-info', merge_mapping) return {'parallel_read_safe': True, 'parallel_write_safe': True} ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230242.9853344 sphinx_automodapi-0.18.0/sphinx_automodapi/templates/0000755000175100001770000000000000000000000023672 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0053344 sphinx_automodapi-0.18.0/sphinx_automodapi/templates/autosummary_core/0000755000175100001770000000000000000000000027270 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/templates/autosummary_core/base.rst0000644000175100001770000000025200000000000030733 0ustar00runnerdocker00000000000000{% if referencefile %} .. include:: {{ referencefile }} {% endif %} {{ objname }} {{ underline }} .. currentmodule:: {{ module }} .. auto{{ objtype }}:: {{ objname }} ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/templates/autosummary_core/class.rst0000644000175100001770000000227300000000000031133 0ustar00runnerdocker00000000000000{% if referencefile %} .. include:: {{ referencefile }} {% endif %} {{ objname }} {{ underline }} .. currentmodule:: {{ module }} .. autoclass:: {{ objname }} :show-inheritance: {% if noindex -%} :noindex: {%- endif %} {% if '__init__' in methods %} {% set caught_result = methods.remove('__init__') %} {% endif %} {% block attributes_summary %} {% if attributes %} .. rubric:: Attributes Summary .. autosummary:: {% for item in attributes %} ~{{ name }}.{{ item }} {%- endfor %} {% endif %} {% endblock %} {% block methods_summary %} {% if methods %} .. rubric:: Methods Summary .. autosummary:: {% for item in methods %} ~{{ name }}.{{ item }} {%- endfor %} {% endif %} {% endblock %} {% block attributes_documentation %} {% if attributes %} .. rubric:: Attributes Documentation {% for item in attributes %} .. autoattribute:: {{ item }} {%- endfor %} {% endif %} {% endblock %} {% block methods_documentation %} {% if methods %} .. rubric:: Methods Documentation {% for item in methods %} .. automethod:: {{ item }} {%- endfor %} {% endif %} {% endblock %} ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/templates/autosummary_core/module.rst0000644000175100001770000000127700000000000031316 0ustar00runnerdocker00000000000000{% if referencefile %} .. include:: {{ referencefile }} {% endif %} {{ objname }} {{ underline }} .. automodule:: {{ fullname }} {% block functions %} {% if functions %} .. rubric:: Functions .. autosummary:: {% for item in functions %} {{ item }} {%- endfor %} {% endif %} {% endblock %} {% block classes %} {% if classes %} .. rubric:: Classes .. autosummary:: {% for item in classes %} {{ item }} {%- endfor %} {% endif %} {% endblock %} {% block exceptions %} {% if exceptions %} .. rubric:: Exceptions .. autosummary:: {% for item in exceptions %} {{ item }} {%- endfor %} {% endif %} {% endblock %} ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0053344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/0000755000175100001770000000000000000000000023036 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/__init__.py0000644000175100001770000000321400000000000025147 0ustar00runnerdocker00000000000000import os import sys import subprocess as sp from textwrap import dedent import pytest @pytest.fixture def cython_testpackage(tmpdir, request): """ Creates a trivial Cython package for use with tests. """ test_pkg = tmpdir.mkdir('test_pkg') test_pkg.mkdir('apyhtest_eva').ensure('__init__.py') test_pkg.join('apyhtest_eva').join('unit02.pyx').write(dedent("""\ def pilot(): \"\"\"Returns the pilot of Eva Unit-02.\"\"\" return True """)) import sphinx_automodapi # noqa test_pkg.join('setup.py').write(dedent("""\ import sys sys.path.insert(0, {0!r}) from os.path import join from setuptools import setup, Extension NAME = 'apyhtest_eva' VERSION = 0.1 RELEASE = True setup( name=NAME, version=VERSION, ext_modules=[Extension('apyhtest_eva.unit02', [join('apyhtest_eva', 'unit02.pyx')])] ) """.format(os.path.dirname(sphinx_automodapi.__path__[0])))) # Build the Cython module in a subprocess; otherwise strange things can # happen with Cython's global module state sp.call([sys.executable, 'setup.py', 'build_ext', '--inplace'], cwd=test_pkg.strpath) sys.path.insert(0, str(test_pkg)) import apyhtest_eva.unit02 # noqa def cleanup(test_pkg=test_pkg): for modname in ['apyhtest_eva', 'apyhtest_eva.unit02']: try: del sys.modules[modname] except KeyError: pass sys.path.remove(str(test_pkg)) request.addfinalizer(cleanup) return test_pkg ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230242.9973345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/0000755000175100001770000000000000000000000024134 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0093343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/abstract_classes/0000755000175100001770000000000000000000000027454 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/abstract_classes/README.md0000644000175100001770000000031700000000000030734 0ustar00runnerdocker00000000000000This example is to make sure that classes derived from the `abc` module will have their members listed when ``:inherited-members:`` is not in effect (https://github.com/astropy/sphinx-automodapi/issues/52). ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0093343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/abstract_classes/input/0000755000175100001770000000000000000000000030613 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/abstract_classes/input/index.rst0000644000175100001770000000011000000000000032444 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module.abstract_classes ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0093343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/abstract_classes/output/0000755000175100001770000000000000000000000031014 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0093343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/abstract_classes/output/api/0000755000175100001770000000000000000000000031565 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000027700000000000011463 xustar0000000000000000169 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/abstract_classes/output/api/sphinx_automodapi.tests.example_module.abstract_classes.SequenceSubclass.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/abstract_classes/output/api/sphinx_automodapi0000644000175100001770000000075200000000000035247 0ustar00runnerdocker00000000000000SequenceSubclass ================ .. currentmodule:: sphinx_automodapi.tests.example_module.abstract_classes .. autoclass:: SequenceSubclass :show-inheritance: .. rubric:: Attributes Summary .. autosummary:: ~SequenceSubclass.my_property .. rubric:: Methods Summary .. autosummary:: ~SequenceSubclass.my_method .. rubric:: Attributes Documentation .. autoattribute:: my_property .. rubric:: Methods Documentation .. automethod:: my_method ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/abstract_classes/output/index.rst.automodapi0000644000175100001770000000075500000000000035025 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module.abstract_classes Module -------------------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.abstract_classes Classes ^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.abstract_classes :classes-only: :toctree: api Class Inheritance Diagram ^^^^^^^^^^^^^^^^^^^^^^^^^ .. automod-diagram:: sphinx_automodapi.tests.example_module.abstract_classes :private-bases: :parts: 1 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/abstract_classes/output/index.rst.automodsumm0000644000175100001770000000020500000000000035223 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module.abstract_classes .. autosummary:: :toctree: api SequenceSubclass ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0093343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/allowed_names/0000755000175100001770000000000000000000000026746 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/allowed_names/README.md0000644000175100001770000000021200000000000030220 0ustar00runnerdocker00000000000000Documenting a module with classes, functions, and variables that are imported from other files, but where only some of those are allowed. ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0093343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/allowed_names/input/0000755000175100001770000000000000000000000030105 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/allowed_names/input/index.rst0000644000175100001770000000020100000000000031737 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module :allowed-package-names: sphinx_automodapi.tests.example_module.classes ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0093343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/allowed_names/output/0000755000175100001770000000000000000000000030306 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0093343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/allowed_names/output/api/0000755000175100001770000000000000000000000031057 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000023600000000000011456 xustar0000000000000000136 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/allowed_names/output/api/sphinx_automodapi.tests.example_module.Egg.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/allowed_names/output/api/sphinx_automodapi.te0000644000175100001770000000065000000000000035145 0ustar00runnerdocker00000000000000Egg === .. currentmodule:: sphinx_automodapi.tests.example_module .. autoclass:: Egg :show-inheritance: .. rubric:: Attributes Summary .. autosummary:: ~Egg.weight .. rubric:: Methods Summary .. autosummary:: ~Egg.buy ~Egg.eat .. rubric:: Attributes Documentation .. autoattribute:: weight .. rubric:: Methods Documentation .. automethod:: buy .. automethod:: eat ././@PaxHeader0000000000000000000000000000023700000000000011457 xustar0000000000000000137 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/allowed_names/output/api/sphinx_automodapi.tests.example_module.Spam.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/allowed_names/output/api/sphinx_automodapi.te0000644000175100001770000000016000000000000035141 0ustar00runnerdocker00000000000000Spam ==== .. currentmodule:: sphinx_automodapi.tests.example_module .. autoclass:: Spam :show-inheritance: ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/allowed_names/output/index.rst.automodapi0000644000175100001770000000106000000000000034305 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module Package ---------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module Classes ^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module :classes-only: :toctree: api :allowed-package-names: sphinx_automodapi.tests.example_module.classes Class Inheritance Diagram ^^^^^^^^^^^^^^^^^^^^^^^^^ .. automod-diagram:: sphinx_automodapi.tests.example_module :private-bases: :parts: 1 :allowed-package-names: sphinx_automodapi.tests.example_module.classes ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/allowed_names/output/index.rst.automodsumm0000644000175100001770000000016000000000000034515 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module .. autosummary:: :toctree: api Egg Spam ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0093343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_no_inherit/0000755000175100001770000000000000000000000030007 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_no_inherit/README.md0000644000175100001770000000011100000000000031257 0ustar00runnerdocker00000000000000Documenting a module with classes but excluding a class with inheritance ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0093343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_no_inherit/input/0000755000175100001770000000000000000000000031146 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_no_inherit/input/index.rst0000644000175100001770000000011600000000000033005 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module.classes :skip: Spam ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0093343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_no_inherit/output/0000755000175100001770000000000000000000000031347 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0093343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_no_inherit/output/api/0000755000175100001770000000000000000000000032120 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000025300000000000011455 xustar0000000000000000149 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_no_inherit/output/api/sphinx_automodapi.tests.example_module.classes.Egg.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_no_inherit/output/api/sphinx_automoda0000644000175100001770000000066000000000000035247 0ustar00runnerdocker00000000000000Egg === .. currentmodule:: sphinx_automodapi.tests.example_module.classes .. autoclass:: Egg :show-inheritance: .. rubric:: Attributes Summary .. autosummary:: ~Egg.weight .. rubric:: Methods Summary .. autosummary:: ~Egg.buy ~Egg.eat .. rubric:: Attributes Documentation .. autoattribute:: weight .. rubric:: Methods Documentation .. automethod:: buy .. automethod:: eat ././@PaxHeader0000000000000000000000000000020500000000000011452 xustar0000000000000000111 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_no_inherit/output/index.rst.automodapi 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_no_inherit/output/index.rst.automodap0000644000175100001770000000074000000000000035201 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module.classes Module ----------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.classes Classes ^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.classes :classes-only: :toctree: api :skip: Spam Class Inheritance Diagram ^^^^^^^^^^^^^^^^^^^^^^^^^ .. automod-diagram:: sphinx_automodapi.tests.example_module.classes :private-bases: :parts: 1 :skip: Spam ././@PaxHeader0000000000000000000000000000020600000000000011453 xustar0000000000000000112 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_no_inherit/output/index.rst.automodsumm 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_no_inherit/output/index.rst.automodsu0000644000175100001770000000015700000000000035232 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module.classes .. autosummary:: :toctree: api Egg ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0093343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_with_inherit/0000755000175100001770000000000000000000000030346 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_with_inherit/README.md0000644000175100001770000000015100000000000031622 0ustar00runnerdocker00000000000000Documenting a module with classes including one that inherits a base class that isn't in the public API. ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0093343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_with_inherit/input/0000755000175100001770000000000000000000000031505 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_with_inherit/input/index.rst0000644000175100001770000000007700000000000033352 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module.classes ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0093343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_with_inherit/output/0000755000175100001770000000000000000000000031706 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0133345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_with_inherit/output/api/0000755000175100001770000000000000000000000032457 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000025500000000000011457 xustar0000000000000000151 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_with_inherit/output/api/sphinx_automodapi.tests.example_module.classes.Egg.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_with_inherit/output/api/sphinx_automo0000644000175100001770000000066000000000000035301 0ustar00runnerdocker00000000000000Egg === .. currentmodule:: sphinx_automodapi.tests.example_module.classes .. autoclass:: Egg :show-inheritance: .. rubric:: Attributes Summary .. autosummary:: ~Egg.weight .. rubric:: Methods Summary .. autosummary:: ~Egg.buy ~Egg.eat .. rubric:: Attributes Documentation .. autoattribute:: weight .. rubric:: Methods Documentation .. automethod:: buy .. automethod:: eat ././@PaxHeader0000000000000000000000000000025600000000000011460 xustar0000000000000000152 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_with_inherit/output/api/sphinx_automodapi.tests.example_module.classes.Spam.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_with_inherit/output/api/sphinx_automo0000644000175100001770000000017000000000000035275 0ustar00runnerdocker00000000000000Spam ==== .. currentmodule:: sphinx_automodapi.tests.example_module.classes .. autoclass:: Spam :show-inheritance: ././@PaxHeader0000000000000000000000000000020700000000000011454 xustar0000000000000000113 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_with_inherit/output/index.rst.automodapi 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_with_inherit/output/index.rst.automod0000644000175100001770000000070000000000000035213 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module.classes Module ----------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.classes Classes ^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.classes :classes-only: :toctree: api Class Inheritance Diagram ^^^^^^^^^^^^^^^^^^^^^^^^^ .. automod-diagram:: sphinx_automodapi.tests.example_module.classes :private-bases: :parts: 1 ././@PaxHeader0000000000000000000000000000021000000000000011446 xustar0000000000000000114 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_with_inherit/output/index.rst.automodsumm 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/classes_with_inherit/output/index.rst.automod0000644000175100001770000000017000000000000035214 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module.classes .. autosummary:: :toctree: api Spam Egg ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0133345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_headings/0000755000175100001770000000000000000000000026731 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_headings/README.md0000644000175100001770000000011100000000000030201 0ustar00runnerdocker00000000000000Documenting a module with functions, and customizing the heading symbols ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0133345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_headings/input/0000755000175100001770000000000000000000000030070 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_headings/input/index.rst0000644000175100001770000000012300000000000031725 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module.functions :headings: *&^ ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0133345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_headings/output/0000755000175100001770000000000000000000000030271 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0133345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_headings/output/api/0000755000175100001770000000000000000000000031042 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000025000000000000011452 xustar0000000000000000146 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_headings/output/api/sphinx_automodapi.tests.example_module.functions.add.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_headings/output/api/sphinx_automodapi.te0000644000175100001770000000014400000000000035126 0ustar00runnerdocker00000000000000add === .. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autofunction:: add ././@PaxHeader0000000000000000000000000000025500000000000011457 xustar0000000000000000151 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_headings/output/api/sphinx_automodapi.tests.example_module.functions.multiply.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_headings/output/api/sphinx_automodapi.te0000644000175100001770000000016300000000000035127 0ustar00runnerdocker00000000000000multiply ======== .. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autofunction:: multiply ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_headings/output/index.rst.automodapi0000644000175100001770000000046200000000000034275 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module.functions Module ******************************************************* .. automodule:: sphinx_automodapi.tests.example_module.functions Functions &&&&&&&&& .. automodsumm:: sphinx_automodapi.tests.example_module.functions :functions-only: :toctree: api ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_headings/output/index.rst.automodsumm0000644000175100001770000000021300000000000034477 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autosummary:: :toctree: api add subtract multiply ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0133345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_noheading/0000755000175100001770000000000000000000000027103 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_noheading/README.md0000644000175100001770000000011200000000000030354 0ustar00runnerdocker00000000000000Documenting a module with functions, and disabling the top-level headings ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0133345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_noheading/input/0000755000175100001770000000000000000000000030242 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_noheading/input/index.rst0000644000175100001770000000012100000000000032075 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module.functions :no-heading: ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0133345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_noheading/output/0000755000175100001770000000000000000000000030443 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0133345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_noheading/output/api/0000755000175100001770000000000000000000000031214 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000025100000000000011453 xustar0000000000000000147 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_noheading/output/api/sphinx_automodapi.tests.example_module.functions.add.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_noheading/output/api/sphinx_automodapi.t0000644000175100001770000000014400000000000035133 0ustar00runnerdocker00000000000000add === .. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autofunction:: add ././@PaxHeader0000000000000000000000000000025600000000000011460 xustar0000000000000000152 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_noheading/output/api/sphinx_automodapi.tests.example_module.functions.multiply.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_noheading/output/api/sphinx_automodapi.t0000644000175100001770000000016300000000000035134 0ustar00runnerdocker00000000000000multiply ======== .. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autofunction:: multiply ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_noheading/output/index.rst.automodapi0000644000175100001770000000030000000000000034436 0ustar00runnerdocker00000000000000.. automodule:: sphinx_automodapi.tests.example_module.functions Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.functions :functions-only: :toctree: api ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_noheading/output/index.rst.automodsumm0000644000175100001770000000021300000000000034651 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autosummary:: :toctree: api add subtract multiply ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0133345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_nomaindocstring/0000755000175100001770000000000000000000000030345 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_nomaindocstring/README.md0000644000175100001770000000010400000000000031617 0ustar00runnerdocker00000000000000Documenting a module with functions, excluding the module docstring ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0133345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_nomaindocstring/input/0000755000175100001770000000000000000000000031504 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_nomaindocstring/input/index.rst0000644000175100001770000000012500000000000033343 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module.functions :no-main-docstr: ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0133345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_nomaindocstring/output/0000755000175100001770000000000000000000000031705 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0173345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_nomaindocstring/output/api/0000755000175100001770000000000000000000000032456 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000025700000000000011461 xustar0000000000000000153 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_nomaindocstring/output/api/sphinx_automodapi.tests.example_module.functions.add.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_nomaindocstring/output/api/sphinx_automo0000644000175100001770000000014400000000000035275 0ustar00runnerdocker00000000000000add === .. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autofunction:: add ././@PaxHeader0000000000000000000000000000026400000000000011457 xustar0000000000000000158 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_nomaindocstring/output/api/sphinx_automodapi.tests.example_module.functions.multiply.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_nomaindocstring/output/api/sphinx_automo0000644000175100001770000000016300000000000035276 0ustar00runnerdocker00000000000000multiply ======== .. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autofunction:: multiply ././@PaxHeader0000000000000000000000000000020700000000000011454 xustar0000000000000000113 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_nomaindocstring/output/index.rst.automodapi 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_nomaindocstring/output/index.rst.automod0000644000175100001770000000036200000000000035216 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module.functions Module ------------------------------------------------------- Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.functions :functions-only: :toctree: api ././@PaxHeader0000000000000000000000000000021000000000000011446 xustar0000000000000000114 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_nomaindocstring/output/index.rst.automodsumm 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_nomaindocstring/output/index.rst.automod0000644000175100001770000000021300000000000035211 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autosummary:: :toctree: api add subtract multiply ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0173345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_simple/0000755000175100001770000000000000000000000026440 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_simple/README.md0000644000175100001770000000004400000000000027715 0ustar00runnerdocker00000000000000Documenting a module with functions ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0173345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_simple/input/0000755000175100001770000000000000000000000027577 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_simple/input/index.rst0000644000175100001770000000010100000000000031430 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module.functions ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0173345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_simple/output/0000755000175100001770000000000000000000000030000 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0173345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_simple/output/api/0000755000175100001770000000000000000000000030551 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000024600000000000011457 xustar0000000000000000144 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_simple/output/api/sphinx_automodapi.tests.example_module.functions.add.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_simple/output/api/sphinx_automodapi.test0000644000175100001770000000014400000000000035204 0ustar00runnerdocker00000000000000add === .. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autofunction:: add ././@PaxHeader0000000000000000000000000000025300000000000011455 xustar0000000000000000149 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_simple/output/api/sphinx_automodapi.tests.example_module.functions.multiply.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_simple/output/api/sphinx_automodapi.test0000644000175100001770000000016300000000000035205 0ustar00runnerdocker00000000000000multiply ======== .. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autofunction:: multiply ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_simple/output/index.rst.automodapi0000644000175100001770000000046200000000000034004 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module.functions Module ------------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.functions Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.functions :functions-only: :toctree: api ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/func_simple/output/index.rst.automodsumm0000644000175100001770000000021300000000000034206 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autosummary:: :toctree: api add subtract multiply ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0173345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/inherited_members/0000755000175100001770000000000000000000000027621 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/inherited_members/README.md0000644000175100001770000000041300000000000031076 0ustar00runnerdocker00000000000000This example is to make sure that when there are multiple automodapi calls and only one has inherited-members, it applies only to that one (this is a regression test for a bug that causes a single inherited-members option to apply to all subsequent automodapi calls) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0173345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/inherited_members/input/0000755000175100001770000000000000000000000030760 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/inherited_members/input/index.rst0000644000175100001770000000023400000000000032620 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module.classes :inherited-members: .. automodapi:: sphinx_automodapi.tests.example_module.other_classes ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0173345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/inherited_members/output/0000755000175100001770000000000000000000000031161 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0173345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/inherited_members/output/api/0000755000175100001770000000000000000000000031732 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000025200000000000011454 xustar0000000000000000148 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/inherited_members/output/api/sphinx_automodapi.tests.example_module.classes.Egg.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/inherited_members/output/api/sphinx_automodap0000644000175100001770000000066000000000000035241 0ustar00runnerdocker00000000000000Egg === .. currentmodule:: sphinx_automodapi.tests.example_module.classes .. autoclass:: Egg :show-inheritance: .. rubric:: Attributes Summary .. autosummary:: ~Egg.weight .. rubric:: Methods Summary .. autosummary:: ~Egg.buy ~Egg.eat .. rubric:: Attributes Documentation .. autoattribute:: weight .. rubric:: Methods Documentation .. automethod:: buy .. automethod:: eat ././@PaxHeader0000000000000000000000000000025300000000000011455 xustar0000000000000000149 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/inherited_members/output/api/sphinx_automodapi.tests.example_module.classes.Spam.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/inherited_members/output/api/sphinx_automodap0000644000175100001770000000044300000000000035240 0ustar00runnerdocker00000000000000Spam ==== .. currentmodule:: sphinx_automodapi.tests.example_module.classes .. autoclass:: Spam :show-inheritance: .. rubric:: Methods Summary .. autosummary:: ~Spam.buy ~Spam.eat .. rubric:: Methods Documentation .. automethod:: buy .. automethod:: eat ././@PaxHeader0000000000000000000000000000026000000000000011453 xustar0000000000000000154 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/inherited_members/output/api/sphinx_automodapi.tests.example_module.other_classes.Foo.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/inherited_members/output/api/sphinx_automodap0000644000175100001770000000037600000000000035245 0ustar00runnerdocker00000000000000Foo === .. currentmodule:: sphinx_automodapi.tests.example_module.other_classes .. autoclass:: Foo :show-inheritance: .. rubric:: Methods Summary .. autosummary:: ~Foo.hmm .. rubric:: Methods Documentation .. automethod:: hmm ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/inherited_members/output/index.rst.automodapi0000644000175100001770000000167000000000000035167 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module.classes Module ----------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.classes Classes ^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.classes :classes-only: :toctree: api :inherited-members: Class Inheritance Diagram ^^^^^^^^^^^^^^^^^^^^^^^^^ .. automod-diagram:: sphinx_automodapi.tests.example_module.classes :private-bases: :parts: 1 sphinx_automodapi.tests.example_module.other_classes Module ----------------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.other_classes Classes ^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.other_classes :classes-only: :toctree: api Class Inheritance Diagram ^^^^^^^^^^^^^^^^^^^^^^^^^ .. automod-diagram:: sphinx_automodapi.tests.example_module.other_classes :private-bases: :parts: 1 ././@PaxHeader0000000000000000000000000000020500000000000011452 xustar0000000000000000111 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/inherited_members/output/index.rst.automodsumm 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/inherited_members/output/index.rst.automodsum0000644000175100001770000000040500000000000035215 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module.classes .. autosummary:: :toctree: api :inherited-members: Spam Egg .. currentmodule:: sphinx_automodapi.tests.example_module.other_classes .. autosummary:: :toctree: api Foo ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0173345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/0000755000175100001770000000000000000000000027154 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/README.md0000644000175100001770000000023500000000000030433 0ustar00runnerdocker00000000000000Documenting a module with classes and functions that are imported from other files, and with an inheritance diagram (which then requires the smart_resolver) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0173345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/input/0000755000175100001770000000000000000000000030313 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/input/index.rst0000644000175100001770000000006700000000000032157 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0173345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/output/0000755000175100001770000000000000000000000030514 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0173345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/output/api/0000755000175100001770000000000000000000000031265 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000023700000000000011457 xustar0000000000000000137 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/output/api/sphinx_automodapi.tests.example_module.Egg.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/output/api/sphinx_automodapi.t0000644000175100001770000000065000000000000035206 0ustar00runnerdocker00000000000000Egg === .. currentmodule:: sphinx_automodapi.tests.example_module .. autoclass:: Egg :show-inheritance: .. rubric:: Attributes Summary .. autosummary:: ~Egg.weight .. rubric:: Methods Summary .. autosummary:: ~Egg.buy ~Egg.eat .. rubric:: Attributes Documentation .. autoattribute:: weight .. rubric:: Methods Documentation .. automethod:: buy .. automethod:: eat ././@PaxHeader0000000000000000000000000000024000000000000011451 xustar0000000000000000138 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/output/api/sphinx_automodapi.tests.example_module.Spam.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/output/api/sphinx_automodapi.t0000644000175100001770000000016000000000000035202 0ustar00runnerdocker00000000000000Spam ==== .. currentmodule:: sphinx_automodapi.tests.example_module .. autoclass:: Spam :show-inheritance: ././@PaxHeader0000000000000000000000000000023700000000000011457 xustar0000000000000000137 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/output/api/sphinx_automodapi.tests.example_module.add.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/output/api/sphinx_automodapi.t0000644000175100001770000000013200000000000035201 0ustar00runnerdocker00000000000000add === .. currentmodule:: sphinx_automodapi.tests.example_module .. autofunction:: add ././@PaxHeader0000000000000000000000000000024400000000000011455 xustar0000000000000000142 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/output/api/sphinx_automodapi.tests.example_module.multiply.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/output/api/sphinx_automodapi.t0000644000175100001770000000015100000000000035202 0ustar00runnerdocker00000000000000multiply ======== .. currentmodule:: sphinx_automodapi.tests.example_module .. autofunction:: multiply ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/output/index.rst.automodapi0000644000175100001770000000101700000000000034515 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module Package ---------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module :functions-only: :toctree: api Classes ^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module :classes-only: :toctree: api Class Inheritance Diagram ^^^^^^^^^^^^^^^^^^^^^^^^^ .. automod-diagram:: sphinx_automodapi.tests.example_module :private-bases: :parts: 1 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel/output/index.rst.automodsumm0000644000175100001770000000036100000000000034726 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module .. autosummary:: :toctree: api add multiply subtract .. currentmodule:: sphinx_automodapi.tests.example_module .. autosummary:: :toctree: api Egg Spam ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0213344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/0000755000175100001770000000000000000000000031515 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/README.md0000644000175100001770000000025200000000000032773 0ustar00runnerdocker00000000000000Documenting a module with classes, functions, and variables that are imported from other files, and with an inheritance diagram (which then requires the smart_resolver). ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0213344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/input/0000755000175100001770000000000000000000000032654 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/input/index.rst0000644000175100001770000000012100000000000034507 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module :include-all-objects: ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0213344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/0000755000175100001770000000000000000000000033055 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0213344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/0000755000175100001770000000000000000000000033626 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000025300000000000011455 xustar0000000000000000149 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_automodapi.tests.example_module.Egg.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_0000644000175100001770000000065000000000000035222 0ustar00runnerdocker00000000000000Egg === .. currentmodule:: sphinx_automodapi.tests.example_module .. autoclass:: Egg :show-inheritance: .. rubric:: Attributes Summary .. autosummary:: ~Egg.weight .. rubric:: Methods Summary .. autosummary:: ~Egg.buy ~Egg.eat .. rubric:: Attributes Documentation .. autoattribute:: weight .. rubric:: Methods Documentation .. automethod:: buy .. automethod:: eat ././@PaxHeader0000000000000000000000000000027000000000000011454 xustar0000000000000000162 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_automodapi.tests.example_module.FUNNY_WALK_STEPS.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_0000644000175100001770000000017500000000000035224 0ustar00runnerdocker00000000000000FUNNY_WALK_STEPS ================ .. currentmodule:: sphinx_automodapi.tests.example_module .. autodata:: FUNNY_WALK_STEPS ././@PaxHeader0000000000000000000000000000026400000000000011457 xustar0000000000000000158 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_automodapi.tests.example_module.PARROT_STATE.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_0000644000175100001770000000016100000000000035217 0ustar00runnerdocker00000000000000PARROT_STATE ============ .. currentmodule:: sphinx_automodapi.tests.example_module .. autodata:: PARROT_STATE ././@PaxHeader0000000000000000000000000000025400000000000011456 xustar0000000000000000150 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_automodapi.tests.example_module.Spam.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_0000644000175100001770000000016000000000000035216 0ustar00runnerdocker00000000000000Spam ==== .. currentmodule:: sphinx_automodapi.tests.example_module .. autoclass:: Spam :show-inheritance: ././@PaxHeader0000000000000000000000000000025300000000000011455 xustar0000000000000000149 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_automodapi.tests.example_module.add.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_0000644000175100001770000000013200000000000035215 0ustar00runnerdocker00000000000000add === .. currentmodule:: sphinx_automodapi.tests.example_module .. autofunction:: add ././@PaxHeader0000000000000000000000000000026000000000000011453 xustar0000000000000000154 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_automodapi.tests.example_module.multiply.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_0000644000175100001770000000015100000000000035216 0ustar00runnerdocker00000000000000multiply ======== .. currentmodule:: sphinx_automodapi.tests.example_module .. autofunction:: multiply ././@PaxHeader0000000000000000000000000000021500000000000011453 xustar0000000000000000119 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/index.rst.automodapi 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/index.rst.a0000644000175100001770000000120400000000000035132 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module Package ---------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module :functions-only: :toctree: api Classes ^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module :classes-only: :toctree: api Variables ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module :variables-only: :toctree: api Class Inheritance Diagram ^^^^^^^^^^^^^^^^^^^^^^^^^ .. automod-diagram:: sphinx_automodapi.tests.example_module :private-bases: :parts: 1 ././@PaxHeader0000000000000000000000000000021600000000000011454 xustar0000000000000000120 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/index.rst.automodsumm 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/index.rst.a0000644000175100001770000000056600000000000035144 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module .. autosummary:: :toctree: api add multiply subtract .. currentmodule:: sphinx_automodapi.tests.example_module .. autosummary:: :toctree: api Egg Spam .. currentmodule:: sphinx_automodapi.tests.example_module .. autosummary:: :toctree: api FUNNY_WALK_STEPS PARROT_STATE ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0213344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/0000755000175100001770000000000000000000000031175 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/README.md0000644000175100001770000000012300000000000032450 0ustar00runnerdocker00000000000000Documenting a module with classes and functions that are imported from other files ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0213344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/input/0000755000175100001770000000000000000000000032334 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/input/index.rst0000644000175100001770000000012300000000000034171 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module :no-inheritance-diagram: ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0213344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/0000755000175100001770000000000000000000000032535 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0213344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/api/0000755000175100001770000000000000000000000033306 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000025100000000000011453 xustar0000000000000000147 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/api/sphinx_automodapi.tests.example_module.Egg.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/api/sphinx_au0000644000175100001770000000065000000000000035230 0ustar00runnerdocker00000000000000Egg === .. currentmodule:: sphinx_automodapi.tests.example_module .. autoclass:: Egg :show-inheritance: .. rubric:: Attributes Summary .. autosummary:: ~Egg.weight .. rubric:: Methods Summary .. autosummary:: ~Egg.buy ~Egg.eat .. rubric:: Attributes Documentation .. autoattribute:: weight .. rubric:: Methods Documentation .. automethod:: buy .. automethod:: eat ././@PaxHeader0000000000000000000000000000025200000000000011454 xustar0000000000000000148 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/api/sphinx_automodapi.tests.example_module.Spam.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/api/sphinx_au0000644000175100001770000000016000000000000035224 0ustar00runnerdocker00000000000000Spam ==== .. currentmodule:: sphinx_automodapi.tests.example_module .. autoclass:: Spam :show-inheritance: ././@PaxHeader0000000000000000000000000000025100000000000011453 xustar0000000000000000147 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/api/sphinx_automodapi.tests.example_module.add.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/api/sphinx_au0000644000175100001770000000013200000000000035223 0ustar00runnerdocker00000000000000add === .. currentmodule:: sphinx_automodapi.tests.example_module .. autofunction:: add ././@PaxHeader0000000000000000000000000000025600000000000011460 xustar0000000000000000152 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/api/sphinx_automodapi.tests.example_module.multiply.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/api/sphinx_au0000644000175100001770000000015100000000000035224 0ustar00runnerdocker00000000000000multiply ======== .. currentmodule:: sphinx_automodapi.tests.example_module .. autofunction:: multiply ././@PaxHeader0000000000000000000000000000021300000000000011451 xustar0000000000000000117 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/index.rst.automodapi 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/index.rst.aut0000644000175100001770000000057300000000000035173 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module Package ---------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module :functions-only: :toctree: api Classes ^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module :classes-only: :toctree: api ././@PaxHeader0000000000000000000000000000021400000000000011452 xustar0000000000000000118 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/index.rst.automodsumm 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/index.rst.aut0000644000175100001770000000036100000000000035166 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module .. autosummary:: :toctree: api add multiply subtract .. currentmodule:: sphinx_automodapi.tests.example_module .. autosummary:: :toctree: api Egg Spam ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0213344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/0000755000175100001770000000000000000000000025416 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/README.md0000644000175100001770000000012700000000000026675 0ustar00runnerdocker00000000000000Documenting a sub-module which is at a different level in the docs than the API folder ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0213344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/input/0000755000175100001770000000000000000000000026555 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/input/index.rst0000644000175100001770000000007400000000000030417 0ustar00runnerdocker00000000000000.. toctree:: :maxdepth: 1 tests/example_module/index ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230242.9933343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/input/tests/0000755000175100001770000000000000000000000027717 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0253344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/input/tests/example_module/0000755000175100001770000000000000000000000032717 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/input/tests/example_module/index.rst0000644000175100001770000000011200000000000034552 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module.functions_with_ref ././@PaxHeader0000000000000000000000000000020700000000000011454 xustar0000000000000000113 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/input/tests/example_module/references.txt 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/input/tests/example_module/references.0000644000175100001770000000004400000000000035037 0ustar00runnerdocker00000000000000.. _astropy: http://www.astropy.org ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230242.9933343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/output/0000755000175100001770000000000000000000000026756 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0253344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/output/api/0000755000175100001770000000000000000000000027527 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000025200000000000011454 xustar0000000000000000148 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/output/api/sphinx_automodapi.tests.example_module.functions_with_ref.add.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/output/api/sphinx_automodapi.tests.exa0000644000175100001770000000024200000000000035120 0ustar00runnerdocker00000000000000.. include:: ../tests/example_module/references.txt add === .. currentmodule:: sphinx_automodapi.tests.example_module.functions_with_ref .. autofunction:: add ././@PaxHeader0000000000000000000000000000025700000000000011461 xustar0000000000000000153 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/output/api/sphinx_automodapi.tests.example_module.functions_with_ref.multiply.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/output/api/sphinx_automodapi.tests.exa0000644000175100001770000000026100000000000035121 0ustar00runnerdocker00000000000000.. include:: ../tests/example_module/references.txt multiply ======== .. currentmodule:: sphinx_automodapi.tests.example_module.functions_with_ref .. autofunction:: multiply ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230242.9933343 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/output/tests/0000755000175100001770000000000000000000000030120 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0253344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/output/tests/example_module/0000755000175100001770000000000000000000000033120 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000021600000000000011454 xustar0000000000000000120 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/output/tests/example_module/index.rst.automodapi 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/output/tests/example_module/index.rst.0000644000175100001770000000053400000000000035041 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module.functions_with_ref Module ---------------------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.functions_with_ref Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.functions_with_ref :functions-only: :toctree: ../../api ././@PaxHeader0000000000000000000000000000021700000000000011455 xustar0000000000000000121 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/output/tests/example_module/index.rst.automodsumm 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/nested/output/tests/example_module/index.rst.0000644000175100001770000000021500000000000035035 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module.functions_with_ref .. autosummary:: :toctree: ../../api add multiply ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0253344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/non_ascii/0000755000175100001770000000000000000000000026076 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/non_ascii/README.md0000644000175100001770000000002500000000000027352 0ustar00runnerdocker00000000000000Non-ASCII characters ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0253344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/non_ascii/input/0000755000175100001770000000000000000000000027235 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/non_ascii/input/index.rst0000644000175100001770000000027500000000000031102 0ustar00runnerdocker00000000000000Ceçi est un exemple qui inclus des charactères non-ASCII .. automodapi:: sphinx_automodapi.tests.example_module.functions .. automodapi:: sphinx_automodapi.tests.example_module.nonascii ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0253344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/non_ascii/output/0000755000175100001770000000000000000000000027436 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0253344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/non_ascii/output/api/0000755000175100001770000000000000000000000030207 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000024400000000000011455 xustar0000000000000000142 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/non_ascii/output/api/sphinx_automodapi.tests.example_module.functions.add.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/non_ascii/output/api/sphinx_automodapi.tests.0000644000175100001770000000014400000000000035103 0ustar00runnerdocker00000000000000add === .. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autofunction:: add ././@PaxHeader0000000000000000000000000000025100000000000011453 xustar0000000000000000147 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/non_ascii/output/api/sphinx_automodapi.tests.example_module.functions.multiply.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/non_ascii/output/api/sphinx_automodapi.tests.0000644000175100001770000000016300000000000035104 0ustar00runnerdocker00000000000000multiply ======== .. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autofunction:: multiply ././@PaxHeader0000000000000000000000000000026200000000000011455 xustar0000000000000000156 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/non_ascii/output/api/sphinx_automodapi.tests.example_module.nonascii.NonAsciiÄöüßő.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/non_ascii/output/api/sphinx_automodapi.tests.0000644000175100001770000000057100000000000035107 0ustar00runnerdocker00000000000000NonAsciiÄöüßő ============= .. currentmodule:: sphinx_automodapi.tests.example_module.nonascii .. autoclass:: NonAsciiÄöüßő :show-inheritance: .. rubric:: Methods Summary .. autosummary:: ~NonAsciiÄöüßő.get_ß ~NonAsciiÄöüßő.get_äöü .. rubric:: Methods Documentation .. automethod:: get_ß .. automethod:: get_äöü ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/non_ascii/output/index.rst.automodapi0000644000175100001770000000146400000000000033445 0ustar00runnerdocker00000000000000Ceçi est un exemple qui inclus des charactères non-ASCII sphinx_automodapi.tests.example_module.functions Module ------------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.functions Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.functions :functions-only: :toctree: api sphinx_automodapi.tests.example_module.nonascii Module ------------------------------------------------------ .. automodule:: sphinx_automodapi.tests.example_module.nonascii Classes ^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.nonascii :classes-only: :toctree: api Class Inheritance Diagram ^^^^^^^^^^^^^^^^^^^^^^^^^ .. automod-diagram:: sphinx_automodapi.tests.example_module.nonascii :private-bases: :parts: 1 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/non_ascii/output/index.rst.automodsumm0000644000175100001770000000041300000000000033646 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autosummary:: :toctree: api add subtract multiply .. currentmodule:: sphinx_automodapi.tests.example_module.nonascii .. autosummary:: :toctree: api NonAsciiÄöüßő ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0253344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/public_from_private/0000755000175100001770000000000000000000000030167 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/public_from_private/README.md0000644000175100001770000000015700000000000031451 0ustar00runnerdocker00000000000000Importing a class from a private submodule to a public submodule at the same level of hierarchy in the module. ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0253344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/public_from_private/input/0000755000175100001770000000000000000000000031326 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/public_from_private/input/index.rst0000644000175100001770000000007600000000000033172 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module.public ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0253344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/public_from_private/output/0000755000175100001770000000000000000000000031527 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0253344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/public_from_private/output/api/0000755000175100001770000000000000000000000032300 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000025700000000000011461 xustar0000000000000000153 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/public_from_private/output/api/sphinx_automodapi.tests.example_module.public.Camelot.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/public_from_private/output/api/sphinx_automod0000644000175100001770000000020000000000000035254 0ustar00runnerdocker00000000000000Camelot ======= .. currentmodule:: sphinx_automodapi.tests.example_module.public .. autoclass:: Camelot :show-inheritance: ././@PaxHeader0000000000000000000000000000025400000000000011456 xustar0000000000000000150 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/public_from_private/output/api/sphinx_automodapi.tests.example_module.public.Spam.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/public_from_private/output/api/sphinx_automod0000644000175100001770000000016700000000000035270 0ustar00runnerdocker00000000000000Spam ==== .. currentmodule:: sphinx_automodapi.tests.example_module.public .. autoclass:: Spam :show-inheritance: ././@PaxHeader0000000000000000000000000000020600000000000011453 xustar0000000000000000112 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/public_from_private/output/index.rst.automodapi 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/public_from_private/output/index.rst.automoda0000644000175100001770000000067300000000000035206 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module.public Module ---------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.public Classes ^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.public :classes-only: :toctree: api Class Inheritance Diagram ^^^^^^^^^^^^^^^^^^^^^^^^^ .. automod-diagram:: sphinx_automodapi.tests.example_module.public :private-bases: :parts: 1 ././@PaxHeader0000000000000000000000000000020700000000000011454 xustar0000000000000000113 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/public_from_private/output/index.rst.automodsumm 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/public_from_private/output/index.rst.automods0000644000175100001770000000017300000000000035223 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module.public .. autosummary:: :toctree: api Camelot Spam ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0253344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/slots/0000755000175100001770000000000000000000000025300 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/slots/README.md0000644000175100001770000000006000000000000026553 0ustar00runnerdocker00000000000000Test classes that put attributes in `__slots__`.././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0253344 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/slots/input/0000755000175100001770000000000000000000000026437 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/slots/input/index.rst0000644000175100001770000000007500000000000030302 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module.slots ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0293345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/slots/output/0000755000175100001770000000000000000000000026640 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0293345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/slots/output/api/0000755000175100001770000000000000000000000027411 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000024500000000000011456 xustar0000000000000000143 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/slots/output/api/sphinx_automodapi.tests.example_module.slots.DerivedParam.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/slots/output/api/sphinx_automodapi.tests.exam0000644000175100001770000000052000000000000035156 0ustar00runnerdocker00000000000000DerivedParam ============ .. currentmodule:: sphinx_automodapi.tests.example_module.slots .. autoclass:: DerivedParam :show-inheritance: .. rubric:: Methods Summary .. autosummary:: ~DerivedParam.derived_from_slot_class_method .. rubric:: Methods Documentation .. automethod:: derived_from_slot_class_method ././@PaxHeader0000000000000000000000000000025100000000000011453 xustar0000000000000000147 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/slots/output/api/sphinx_automodapi.tests.example_module.slots.DerivedSlotParam.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/slots/output/api/sphinx_automodapi.tests.exam0000644000175100001770000000100700000000000035157 0ustar00runnerdocker00000000000000DerivedSlotParam ================ .. currentmodule:: sphinx_automodapi.tests.example_module.slots .. autoclass:: DerivedSlotParam :show-inheritance: .. rubric:: Attributes Summary .. autosummary:: ~DerivedSlotParam.extra_attr .. rubric:: Methods Summary .. autosummary:: ~DerivedSlotParam.derived_from_slot_class_method .. rubric:: Attributes Documentation .. autoattribute:: extra_attr .. rubric:: Methods Documentation .. automethod:: derived_from_slot_class_method ././@PaxHeader0000000000000000000000000000024100000000000011452 xustar0000000000000000139 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/slots/output/api/sphinx_automodapi.tests.example_module.slots.SlotDict.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/slots/output/api/sphinx_automodapi.tests.exam0000644000175100001770000000076700000000000035173 0ustar00runnerdocker00000000000000SlotDict ======== .. currentmodule:: sphinx_automodapi.tests.example_module.slots .. autoclass:: SlotDict :show-inheritance: .. rubric:: Attributes Summary .. autosummary:: ~SlotDict.class_attr ~SlotDict.instance_attr .. rubric:: Methods Summary .. autosummary:: ~SlotDict.my_method .. rubric:: Attributes Documentation .. autoattribute:: class_attr .. autoattribute:: instance_attr .. rubric:: Methods Documentation .. automethod:: my_method ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/slots/output/index.rst.automodapi0000644000175100001770000000066600000000000032652 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module.slots Module --------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.slots Classes ^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.slots :classes-only: :toctree: api Class Inheritance Diagram ^^^^^^^^^^^^^^^^^^^^^^^^^ .. automod-diagram:: sphinx_automodapi.tests.example_module.slots :private-bases: :parts: 1 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/slots/output/index.rst.automodsumm0000644000175100001770000000023000000000000033045 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module.slots .. autosummary:: :toctree: api SlotDict DerivedParam DerivedSlotParam ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0293345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/source_dir/0000755000175100001770000000000000000000000026272 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/source_dir/README.md0000644000175100001770000000005300000000000027547 0ustar00runnerdocker00000000000000Documentation is inside a source directory ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230242.9973345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/source_dir/input/0000755000175100001770000000000000000000000027431 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0293345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/source_dir/input/src/0000755000175100001770000000000000000000000030220 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/source_dir/input/src/index.rst0000644000175100001770000000010100000000000032051 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module.functions ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230242.9973345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/source_dir/output/0000755000175100001770000000000000000000000027632 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0293345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/source_dir/output/src/0000755000175100001770000000000000000000000030421 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0293345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/source_dir/output/src/api/0000755000175100001770000000000000000000000031172 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000025100000000000011453 xustar0000000000000000147 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/source_dir/output/src/api/sphinx_automodapi.tests.example_module.functions.add.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/source_dir/output/src/api/sphinx_automodapi.t0000644000175100001770000000014400000000000035111 0ustar00runnerdocker00000000000000add === .. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autofunction:: add ././@PaxHeader0000000000000000000000000000025600000000000011460 xustar0000000000000000152 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/source_dir/output/src/api/sphinx_automodapi.tests.example_module.functions.multiply.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/source_dir/output/src/api/sphinx_automodapi.t0000644000175100001770000000016300000000000035112 0ustar00runnerdocker00000000000000multiply ======== .. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autofunction:: multiply ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/source_dir/output/src/index.rst.automodapi0000644000175100001770000000046200000000000034425 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module.functions Module ------------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.functions Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.functions :functions-only: :toctree: api ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/source_dir/output/src/index.rst.automodsumm0000644000175100001770000000021300000000000034627 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module.functions .. autosummary:: :toctree: api add subtract multiply ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0293345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/variables/0000755000175100001770000000000000000000000026104 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/variables/README.md0000644000175100001770000000005300000000000027361 0ustar00runnerdocker00000000000000Documenting a module with global variables ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0293345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/variables/input/0000755000175100001770000000000000000000000027243 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/variables/input/index.rst0000644000175100001770000000013300000000000031101 0ustar00runnerdocker00000000000000.. automodapi:: sphinx_automodapi.tests.example_module.variables :include-all-objects: ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0293345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/variables/output/0000755000175100001770000000000000000000000027444 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0293345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/variables/output/api/0000755000175100001770000000000000000000000030215 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000026100000000000011454 xustar0000000000000000155 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/variables/output/api/sphinx_automodapi.tests.example_module.variables.FUNNY_WALK_STEPS.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/variables/output/api/sphinx_automodapi.tests.0000644000175100001770000000020700000000000035111 0ustar00runnerdocker00000000000000FUNNY_WALK_STEPS ================ .. currentmodule:: sphinx_automodapi.tests.example_module.variables .. autodata:: FUNNY_WALK_STEPS ././@PaxHeader0000000000000000000000000000025500000000000011457 xustar0000000000000000151 path=sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/variables/output/api/sphinx_automodapi.tests.example_module.variables.PARROT_STATE.rst 22 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/variables/output/api/sphinx_automodapi.tests.0000644000175100001770000000017300000000000035113 0ustar00runnerdocker00000000000000PARROT_STATE ============ .. currentmodule:: sphinx_automodapi.tests.example_module.variables .. autodata:: PARROT_STATE ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/variables/output/index.rst.automodapi0000644000175100001770000000046200000000000033450 0ustar00runnerdocker00000000000000 sphinx_automodapi.tests.example_module.variables Module ------------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.variables Variables ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.variables :variables-only: :toctree: api ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/cases/variables/output/index.rst.automodsumm0000644000175100001770000000021700000000000033656 0ustar00runnerdocker00000000000000.. currentmodule:: sphinx_automodapi.tests.example_module.variables .. autosummary:: :toctree: api PARROT_STATE FUNNY_WALK_STEPS ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0293345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/duplicated_warning/0000755000175100001770000000000000000000000026701 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/duplicated_warning/__init__.py0000644000175100001770000000000000000000000031000 0ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0293345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/duplicated_warning/docs/0000755000175100001770000000000000000000000027631 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/duplicated_warning/docs/conf.py0000644000175100001770000000027500000000000031134 0ustar00runnerdocker00000000000000project = 'duplicated' copyright = '2022, Maximilian Linhoff' author = 'Maximilian Linhoff' release = '0.1' extensions = [ "sphinx_automodapi.automodapi", ] html_theme = 'alabaster' ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/duplicated_warning/docs/foo.rst0000644000175100001770000000022200000000000031142 0ustar00runnerdocker00000000000000Foo Submodule ============= API Reference ------------- .. automodapi:: sphinx_automodapi.tests.duplicated_warning.duplicated.foo :noindex: ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/duplicated_warning/docs/index.rst0000644000175100001770000000072000000000000031471 0ustar00runnerdocker00000000000000.. duplicated documentation master file, created by sphinx-quickstart on Tue Mar 29 17:11:23 2022. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to duplicated's documentation! ====================================== .. toctree:: :maxdepth: 2 :caption: Contents: foo API Reference ------------- .. automodapi:: sphinx_automodapi.tests.duplicated_warning.duplicated ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0293345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/duplicated_warning/duplicated/0000755000175100001770000000000000000000000031017 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/duplicated_warning/duplicated/__init__.py0000644000175100001770000000006000000000000033124 0ustar00runnerdocker00000000000000from .foo import Foo __all__ = [ 'Foo', ] ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0333345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/duplicated_warning/duplicated/foo/0000755000175100001770000000000000000000000031602 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/duplicated_warning/duplicated/foo/__init__.py0000644000175100001770000000005700000000000033715 0ustar00runnerdocker00000000000000from .foo import Foo __all__ = [ "Foo", ] ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/duplicated_warning/duplicated/foo/foo.py0000644000175100001770000000025500000000000032741 0ustar00runnerdocker00000000000000__all__ = [ 'Foo', 'Bar', 'baz', ] class Foo: '''Awesome Foo class''' class Bar: '''Awesome Bar class''' def baz(): '''Awesome baz function''' ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0333345 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/example_module/0000755000175100001770000000000000000000000026036 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/example_module/__init__.py0000644000175100001770000000014100000000000030143 0ustar00runnerdocker00000000000000from .classes import * # noqa from .functions import * # noqa from .variables import * # noqa ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/example_module/_private.py0000644000175100001770000000007500000000000030223 0ustar00runnerdocker00000000000000class Camelot: """ It's a silly place anyway """ ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/example_module/abstract_classes.py0000644000175100001770000000131600000000000031731 0ustar00runnerdocker00000000000000from collections.abc import Sequence __all__ = ['SequenceSubclass'] class SequenceSubclass(Sequence): """ Inherits from an ABC. """ def __init__(self): self._items = [] def __len__(self): """ Must be defined for the collections.abc.Sequence base class. """ return len(self._items) def __getitem__(self, key): """ Must be defined for the collections.abc.Sequence base class. """ return self._items[key] def my_method(self, parameter): """ An example method. """ pass @property def my_property(self): """ An example property. """ return 42 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/example_module/classes.py0000644000175100001770000000132700000000000030050 0ustar00runnerdocker00000000000000__all__ = ['Spam', 'Egg'] class BaseSpam(object): """ Base class for Spam """ def eat(self, time): """ Eat some spam in the required time. """ pass def buy(self, price): """ Buy some MOAR spam. """ pass class Spam(BaseSpam): """ The main spam """ pass class Egg(object): """ An egg (no inheritance) """ def eat(self, time): """ Eat some egg in the required time. """ pass def buy(self, price): """ Buy some MOAR egg. """ pass @property def weight(self): """ The weight of an egg """ return 0 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/example_module/functions.py0000644000175100001770000000047200000000000030423 0ustar00runnerdocker00000000000000""" A collection of useful functions """ __all__ = ['add', 'subtract', 'multiply'] def add(a, b): """ Add two numbers """ return a + b def subtract(a, b): """ Subtract two numbers """ return a - b def multiply(c, d): """ Multiply two numbers """ return c * d ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/example_module/functions_with_ref.py0000644000175100001770000000046600000000000032315 0ustar00runnerdocker00000000000000""" A collection of useful functions """ __all__ = ['add', 'multiply'] def add(a, b): """ Add two numbers Here is an example reference: astropy_ """ return a + b def multiply(c, d): """ Multiply two numbers Here is an example reference: astropy_ """ return c * d ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/example_module/mixed.py0000644000175100001770000000050500000000000027516 0ustar00runnerdocker00000000000000""" A collection of useful classes and functions """ __all__ = ['add', 'MixedSpam'] def add(a, b): """ Add two numbers """ return a + b class MixedSpam(object): """ Special spam """ def eat(self, time): """ Eat special spam in the required time. """ pass ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/example_module/noall.py0000644000175100001770000000051600000000000027517 0ustar00runnerdocker00000000000000""" A collection of useful classes and functions """ from collections import OrderedDict def add(a, b): """ Add two numbers """ return a + b class MixedSpam(OrderedDict): """ Special spam """ def eat(self, time): """ Eat special spam in the required time. """ pass ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/example_module/nonascii.py0000644000175100001770000000047300000000000030217 0ustar00runnerdocker00000000000000__all__ = ['NonAsciiÄöüßő'] class NonAsciiÄöüßő(object): def get_äöü(self): """ Return a string with common umlauts like äöüß """ return 'äöü' def get_ß(self): """ Return a string with the eszett symbol """ return 'ß' ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/example_module/other_classes.py0000644000175100001770000000042400000000000031246 0ustar00runnerdocker00000000000000__all__ = ['Foo'] class BaseFoo(object): """ Base class for Foo """ def bar(self, time): """ Eat some spam in the required time. """ pass class Foo(BaseFoo): """ The main foo """ def hmm(self): pass ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/example_module/public.py0000644000175100001770000000014100000000000027662 0ustar00runnerdocker00000000000000from ._private import Camelot from .classes import Spam __all__ = [ 'Camelot', 'Spam' ] ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/example_module/slots.py0000644000175100001770000000653100000000000027561 0ustar00runnerdocker00000000000000"""Test classes containing __slots__ Instance attributes named in ``__slots__`` can be introspected and are listed in the Attributes section of the class documentation. Class attributes are listed in the same section of the generated docs so docstrings should be used to distinguish class attributes vs instance attributes. Regular instance attributes are dynamically inserted into ``__dict__`` and cannot be reliably introspected so they're not included in the documentation. """ from __future__ import annotations __all__ = ['SlotDict', 'DerivedParam', 'DerivedSlotParam',] class SlotDict(object): """ A class that uses __slots__ and __dict__ for its attribute namespace. """ __slots__ = { "instance_attr": "instance attribute docstring can be added here", "__dict__": None, # Allows additional instance attributes to be added } class_attr = "class attribute value" """(class attr) this is a class attribute.""" def __init__(self, param: str, other_param: str): """ Initializes a SlotDict object. Parameters ---------- param : str A parameter other_param : str Another parameter """ self.instance_attr = param """Instance attributes declared in slots can also define their docstring here """ if other_param is not None: self.other_attr = other_param """This instance attribute is dynamic (not declared in a slot) so it's not included in the docs """ def my_method(self): """ Prints the SlotDict parameters. """ print(f"instance_attr: {self.instance_attr}") print(f"other_attr: {self.other_attr}") class DerivedParam(SlotDict): """ Extends SlotDict by adding an extra parameter """ def __init__(self, param: str, other_param: str, extra_param: str): """ Initializes a DerivedParam object. Parameters ---------- param : str A parameter other_param : str Another parameter extra_param : str An extra parameter """ super(DerivedParam, self).__init__(param, other_param) self.extra_attr = extra_param def derived_from_slot_class_method(self): """ Prints the DerivedParam parameters. """ print(f"instance_attr: {self.instance_attr}") print(f"other_attr: {self.other_attr}") print(f"extra_attr: {self.extra_attr}") class DerivedSlotParam(SlotDict): """ Extends SlotDict by adding a slot parameter """ __slots__ = ('extra_attr',) def __init__(self, param: str, other_param: str, extra_param: str): """ Initializes a DerivedSlotParam object. Parameters ---------- param : str A parameter other_param : str Another parameter extra_param : str An extra parameter """ super(DerivedSlotParam, self).__init__(param, other_param) self.extra_attr = extra_param def derived_from_slot_class_method(self): """ Prints the DerivedSlotParam parameters. """ print(f"instance_attr: {self.instance_attr}") print(f"other_attr: {self.other_attr}") print(f"extra_attr: {self.extra_attr}") ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/example_module/stdlib.py0000644000175100001770000000033600000000000027673 0ustar00runnerdocker00000000000000""" A module that imports objects from the standard library. """ from pathlib import Path from datetime import time __all__ = ['Path', 'time', 'add'] def add(a, b): """ Add two numbers """ return a + b ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/example_module/variables.py0000644000175100001770000000076400000000000030367 0ustar00runnerdocker00000000000000""" A collection of useful variables. """ __all__ = ['PARROT_STATE', 'FUNNY_WALK_STEPS'] PARROT_STATE = 'dead' """The global state of the parrot.""" FUNNY_WALK_STEPS = [['left', 'right'], ['left', 'jump', 'right', 'jump'], ['swim']] """List of different possible walk. Each item contains a list of steps. """ # A variable not in __all__ should not be propagated. NOTHING_HAPPENS = 0 # Even if it has a docstring REALLY_NOTHING = 1 """Really nothing.""" ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/helpers.py0000644000175100001770000000303200000000000025050 0ustar00runnerdocker00000000000000# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst import os from copy import deepcopy from sphinx.cmd.build import build_main from . import cython_testpackage # noqa __all__ = ['write_conf', 'run_sphinx_in_tmpdir'] intersphinx_mapping = { 'python': ('https://docs.python.org/3/', None) } DEFAULT_CONF = {'source_suffix': '.rst', 'master_doc': 'index', 'nitpicky': True, 'extensions': ['sphinx.ext.intersphinx', 'sphinx_automodapi.automodapi'], 'suppress_warnings': ['app.add_directive', 'app.add_node'], 'intersphinx_mapping': intersphinx_mapping, 'automodapi_toctreedirnm': 'api', 'automodapi_writereprocessed': True, 'automodapi_inheritance_diagram': True, 'automodsumm_writereprocessed': True} def write_conf(filename, conf): with open(filename, 'w') as f: for key, value in conf.items(): f.write("{0} = {1}\n".format(key, repr(conf[key]))) def run_sphinx_in_tmpdir(tmpdir, additional_conf={}, expect_error=False): start_dir = os.path.abspath('.') conf = deepcopy(DEFAULT_CONF) conf.update(additional_conf) write_conf(tmpdir.join('conf.py').strpath, conf) argv = ['-W', '-b', 'html', '.', '_build/html'] try: os.chdir(tmpdir.strpath) status = build_main(argv=argv) finally: os.chdir(start_dir) if expect_error: assert status != 0 else: assert status == 0 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/test_autodoc_enhancements.py0000644000175100001770000000247400000000000030644 0ustar00runnerdocker00000000000000from textwrap import dedent import pytest from ..autodoc_enhancements import type_object_attrgetter # Define test classes outside the class; otherwise there is flakiness with the # details of how exec works on different Python versions class Meta(type): @property def foo(cls): return 'foo' class MyClass(metaclass=Meta): @property def foo(self): """Docstring for MyClass.foo property.""" return 'myfoo' def test_type_attrgetter(): """ This test essentially reproduces the docstring for `type_object_attrgetter`. Sphinx itself tests the custom attrgetter feature; see: https://bitbucket.org/birkenfeld/sphinx/src/40bd03003ac6fe274ccf3c80d7727509e00a69ea/tests/test_autodoc.py?at=default#cl-502 so rather than a full end-to-end functional test it's simple enough to just test that this function does what it needs to do. """ assert getattr(MyClass, 'foo') == 'foo' obj = type_object_attrgetter(MyClass, 'foo') assert isinstance(obj, property) assert obj.__doc__ == 'Docstring for MyClass.foo property.' with pytest.raises(AttributeError): type_object_attrgetter(MyClass, 'susy') assert type_object_attrgetter(MyClass, 'susy', 'default') == 'default' assert type_object_attrgetter(MyClass, '__dict__') == MyClass.__dict__ ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/test_automodapi.py0000644000175100001770000002707000000000000026617 0ustar00runnerdocker00000000000000# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from copy import copy import pytest from docutils.parsers.rst import directives, roles from . import cython_testpackage # noqa from .helpers import run_sphinx_in_tmpdir def setup_function(func): # This can be replaced with the docutils_namespace context manager once # it is in a stable release of Sphinx func._directives = copy(directives._directives) func._roles = copy(roles._roles) def teardown_function(func): directives._directives = func._directives roles._roles = func._roles am_replacer_str = """ This comes before .. automodapi:: sphinx_automodapi.tests.example_module.mixed {options} This comes after """ am_replacer_basic_expected = """ This comes before sphinx_automodapi.tests.example_module.mixed Module --------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.mixed Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.mixed :functions-only: :toctree: api Classes ^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.mixed :classes-only: :toctree: api Class Inheritance Diagram ^^^^^^^^^^^^^^^^^^^^^^^^^ .. automod-diagram:: sphinx_automodapi.tests.example_module.mixed :private-bases: :parts: 1 This comes after """ def test_am_replacer_basic(tmpdir): """ Tests replacing an ".. automodapi::" with the automodapi no-option template """ with open(tmpdir.join('index.rst').strpath, 'w') as f: f.write(am_replacer_str.format(options='')) run_sphinx_in_tmpdir(tmpdir) with open(tmpdir.join('index.rst.automodapi').strpath) as f: result = f.read() assert result == am_replacer_basic_expected am_replacer_repr_str = u""" This comes before with spéciàl çhars .. automodapi:: sphinx_automodapi.tests.example_module.mixed {options} This comes after """ @pytest.mark.parametrize('writereprocessed', [False, True]) def test_am_replacer_writereprocessed(tmpdir, writereprocessed): """ Tests the automodapi_writereprocessed option """ with open(tmpdir.join('index.rst').strpath, 'w', encoding='utf-8') as f: f.write(am_replacer_repr_str.format(options='')) run_sphinx_in_tmpdir(tmpdir, additional_conf={'automodapi_writereprocessed': writereprocessed}) assert tmpdir.join('index.rst.automodapi').isfile() is writereprocessed am_replacer_noinh_expected = """ This comes before sphinx_automodapi.tests.example_module.mixed Module --------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.mixed Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.mixed :functions-only: :toctree: api Classes ^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.mixed :classes-only: :toctree: api This comes after """.format(empty='') def test_am_replacer_noinh(tmpdir): """ Tests replacing an ".. automodapi::" with no-inheritance-diagram option """ ops = ['', ':no-inheritance-diagram:'] ostr = '\n '.join(ops) with open(tmpdir.join('index.rst').strpath, 'w') as f: f.write(am_replacer_str.format(options=ostr)) run_sphinx_in_tmpdir(tmpdir) with open(tmpdir.join('index.rst.automodapi').strpath) as f: result = f.read() assert result == am_replacer_noinh_expected am_replacer_titleandhdrs_expected = """ This comes before sphinx_automodapi.tests.example_module.mixed Module &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& .. automodule:: sphinx_automodapi.tests.example_module.mixed Functions ********* .. automodsumm:: sphinx_automodapi.tests.example_module.mixed :functions-only: :toctree: api Classes ******* .. automodsumm:: sphinx_automodapi.tests.example_module.mixed :classes-only: :toctree: api Class Inheritance Diagram ************************* .. automod-diagram:: sphinx_automodapi.tests.example_module.mixed :private-bases: :parts: 1 This comes after """ def test_am_replacer_titleandhdrs(tmpdir): """ Tests replacing an ".. automodapi::" entry with title-setting and header character options. """ ops = ['', ':headings: &*'] ostr = '\n '.join(ops) with open(tmpdir.join('index.rst').strpath, 'w') as f: f.write(am_replacer_str.format(options=ostr)) run_sphinx_in_tmpdir(tmpdir) with open(tmpdir.join('index.rst.automodapi').strpath) as f: result = f.read() assert result == am_replacer_titleandhdrs_expected def test_am_replacer_titleandhdrs_invalid(tmpdir, capsys): """ Tests replacing an ".. automodapi::" entry with title-setting and header character options. """ ops = ['', ':headings: &'] ostr = '\n '.join(ops) with open(tmpdir.join('index.rst').strpath, 'w') as f: f.write(am_replacer_str.format(options=ostr)) run_sphinx_in_tmpdir(tmpdir, expect_error=True) stdout, stderr = capsys.readouterr() assert "Not enough headings (got 1, need 2), using default -^" in stderr am_replacer_nomain_str = """ This comes before .. automodapi:: sphinx_automodapi.tests.example_module.functions :no-main-docstr: This comes after """ am_replacer_nomain_expected = """ This comes before sphinx_automodapi.tests.example_module.functions Module ------------------------------------------------------- Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.functions :functions-only: :toctree: api This comes after """.format(empty='') def test_am_replacer_nomain(tmpdir): """ Tests replacing an ".. automodapi::" with "no-main-docstring" . """ with open(tmpdir.join('index.rst').strpath, 'w') as f: f.write(am_replacer_nomain_str.format(options='')) run_sphinx_in_tmpdir(tmpdir) with open(tmpdir.join('index.rst.automodapi').strpath) as f: result = f.read() assert result == am_replacer_nomain_expected am_replacer_skip_str = """ This comes before .. automodapi:: sphinx_automodapi.tests.example_module.functions :skip: add :skip: subtract This comes after """ am_replacer_skip_expected = """ This comes before sphinx_automodapi.tests.example_module.functions Module ------------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.functions Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.functions :functions-only: :toctree: api :skip: add,subtract This comes after """.format(empty='') def test_am_replacer_skip(tmpdir): """ Tests using the ":skip: option in an ".. automodapi::" . """ with open(tmpdir.join('index.rst').strpath, 'w') as f: f.write(am_replacer_skip_str.format(options='')) run_sphinx_in_tmpdir(tmpdir) with open(tmpdir.join('index.rst.automodapi').strpath) as f: result = f.read() assert result == am_replacer_skip_expected am_replacer_skip_stdlib_str = """ This comes before .. automodapi:: sphinx_automodapi.tests.example_module.stdlib :skip: time :skip: Path This comes after """ am_replacer_skip_stdlib_expected = """ This comes before sphinx_automodapi.tests.example_module.stdlib Module ---------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.stdlib Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.stdlib :functions-only: :toctree: api :skip: time,Path This comes after """.format(empty='') def test_am_replacer_skip_stdlib(tmpdir): """ Tests using the ":skip:" option in an ".. automodapi::" that skips objects imported from the standard library. This is a regression test for #141 """ with open(tmpdir.join('index.rst').strpath, 'w') as f: f.write(am_replacer_skip_stdlib_str.format(options='')) run_sphinx_in_tmpdir(tmpdir) with open(tmpdir.join('index.rst.automodapi').strpath) as f: result = f.read() assert result == am_replacer_skip_stdlib_expected am_replacer_include_stdlib_str = """ This comes before .. automodapi:: sphinx_automodapi.tests.example_module.stdlib :include: add :allowed-package-names: pathlib, datetime, sphinx_automodapi This comes after """ am_replacer_include_stdlib_expected = """ This comes before sphinx_automodapi.tests.example_module.stdlib Module ---------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.stdlib Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.stdlib :functions-only: :toctree: api :skip: Path,time :allowed-package-names: pathlib,datetime,sphinx_automodapi This comes after """.format(empty='') def test_am_replacer_include_stdlib(tmpdir): """ Tests using the ":include: option in an ".. automodapi::" in the presence of objects imported from the standard library. """ with open(tmpdir.join('index.rst').strpath, 'w') as f: f.write(am_replacer_include_stdlib_str.format(options='')) run_sphinx_in_tmpdir(tmpdir) with open(tmpdir.join('index.rst.automodapi').strpath) as f: result = f.read() assert result == am_replacer_include_stdlib_expected am_replacer_include_str = """ This comes before .. automodapi:: sphinx_automodapi.tests.example_module.functions :include: add :include: subtract This comes after """ am_replacer_include_expected = """ This comes before sphinx_automodapi.tests.example_module.functions Module ------------------------------------------------------- .. automodule:: sphinx_automodapi.tests.example_module.functions Functions ^^^^^^^^^ .. automodsumm:: sphinx_automodapi.tests.example_module.functions :functions-only: :toctree: api :skip: multiply This comes after """.format(empty='') def test_am_replacer_include(tmpdir): """ Tests using the ":include: option in an ".. automodapi::" . """ with open(tmpdir.join('index.rst').strpath, 'w') as f: f.write(am_replacer_include_str.format(options='')) run_sphinx_in_tmpdir(tmpdir) with open(tmpdir.join('index.rst.automodapi').strpath) as f: result = f.read() assert result == am_replacer_include_expected am_replacer_invalidop_str = """ This comes before .. automodapi:: sphinx_automodapi.tests.example_module.functions :invalid-option: This comes after """ def test_am_replacer_invalidop(tmpdir, capsys): """ Tests that a sphinx warning is produced with an invalid option. """ with open(tmpdir.join('index.rst').strpath, 'w') as f: f.write(am_replacer_invalidop_str.format(options='')) run_sphinx_in_tmpdir(tmpdir, expect_error=True) stdout, stderr = capsys.readouterr() assert "Found additional options invalid-option in automodapi." in stderr am_replacer_cython_str = """ This comes before .. automodapi:: apyhtest_eva.unit02 {options} This comes after """ am_replacer_cython_expected = """ This comes before apyhtest_eva.unit02 Module -------------------------- .. automodule:: apyhtest_eva.unit02 Functions ^^^^^^^^^ .. automodsumm:: apyhtest_eva.unit02 :functions-only: :toctree: api This comes after """.format(empty='') def test_am_replacer_cython(tmpdir, cython_testpackage): # noqa """ Tests replacing an ".. automodapi::" for a Cython module. """ with open(tmpdir.join('index.rst').strpath, 'w') as f: f.write(am_replacer_cython_str.format(options='')) run_sphinx_in_tmpdir(tmpdir) with open(tmpdir.join('index.rst.automodapi').strpath) as f: result = f.read() assert result == am_replacer_cython_expected ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/test_automodsumm.py0000644000175100001770000001312000000000000027016 0ustar00runnerdocker00000000000000# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from copy import copy import pytest from docutils.parsers.rst import directives, roles from . import cython_testpackage # noqa from .helpers import run_sphinx_in_tmpdir def setup_function(func): # This can be replaced with the docutils_namespace context manager once # it is in a stable release of Sphinx func._directives = copy(directives._directives) func._roles = copy(roles._roles) def teardown_function(func): directives._directives = func._directives roles._roles = func._roles # nosignatures ADD_RST = """ :orphan: add === .. currentmodule:: sphinx_automodapi.tests.example_module.mixed .. autofunction:: add """.strip() MIXEDSPAM_RST = """ :orphan: MixedSpam ========= .. currentmodule:: sphinx_automodapi.tests.example_module.mixed .. autoclass:: MixedSpam :show-inheritance: """.strip() def write_api_files_to_tmpdir(tmpdir): apidir = tmpdir.mkdir('api') with open(apidir.join('sphinx_automodapi.tests.example_module.mixed.add.rst').strpath, 'w') as f: f.write(ADD_RST) with open(apidir.join('sphinx_automodapi.tests.example_module.mixed.MixedSpam.rst').strpath, 'w') as f: f.write(MIXEDSPAM_RST) ams_to_asmry_str = """ Before .. automodsumm:: sphinx_automodapi.tests.example_module.mixed {options} And After """ ams_to_asmry_expected = """\ .. currentmodule:: sphinx_automodapi.tests.example_module.mixed .. autosummary:: add MixedSpam """ def test_ams_to_asmry(tmpdir): with open(tmpdir.join('index.rst').strpath, 'w') as f: f.write(ams_to_asmry_str.format(options='')) write_api_files_to_tmpdir(tmpdir) run_sphinx_in_tmpdir(tmpdir) with open(tmpdir.join('index.rst.automodsumm').strpath) as f: result = f.read() assert result == ams_to_asmry_expected def test_too_many_options(tmpdir, capsys): ops = ['', ':classes-only:', ':functions-only:'] ostr = '\n '.join(ops) with open(tmpdir.join('index.rst').strpath, 'w') as f: f.write(ams_to_asmry_str.format(options=ostr)) write_api_files_to_tmpdir(tmpdir) run_sphinx_in_tmpdir(tmpdir, expect_error=True) stdout, stderr = capsys.readouterr() assert ("[automodsumm] Defined more than one of functions-only, " "classes-only, and variables-only. Skipping this directive." in stderr) ORDEREDDICT_RST = """ :orphan: OrderedDict =========== .. currentmodule:: sphinx_automodapi.tests.example_module.noall .. autoclass:: OrderedDict :show-inheritance: """.strip() @pytest.mark.parametrize('options,expect', [ ('', ['add', 'MixedSpam']), (':allowed-package-names: sphinx_automodapi', ['add', 'MixedSpam']), (':allowed-package-names: collections', ['OrderedDict']), (':allowed-package-names: sphinx_automodapi,collections', ['add', 'MixedSpam', 'OrderedDict']), ]) def test_am_allowed_package_names(options, expect, tmpdir): """ Test that allowed_package_names is interpreted correctly. """ def mixed2noall(s): return s.replace('example_module.mixed', 'example_module.noall') am_str = ams_to_asmry_str with open(tmpdir.join('index.rst').strpath, 'w') as f: f.write(mixed2noall(am_str).format(options=(' '+options if options else ''))) apidir = tmpdir.mkdir('api') with open(apidir.join('sphinx_automodapi.tests.example_module.noall.add.rst').strpath, 'w') as f: f.write(mixed2noall(ADD_RST)) with open(apidir.join('sphinx_automodapi.tests.example_module.noall.MixedSpam.rst').strpath, 'w') as f: f.write(mixed2noall(MIXEDSPAM_RST)) with open(apidir.join('sphinx_automodapi.tests.example_module.noall.OrderedDict.rst').strpath, 'w') as f: f.write(ORDEREDDICT_RST) run_sphinx_in_tmpdir(tmpdir) with open(tmpdir.join('index.rst.automodsumm').strpath) as f: result = f.read() for x in expect: assert ' '+x in result PILOT_RST = """ :orphan: pilot ===== .. currentmodule:: apyhtest_eva.unit02 .. autofunction:: pilot """.strip() ams_cython_str = """ Before .. automodsumm:: apyhtest_eva.unit02 :functions-only: And After """ ams_cython_expected = """\ .. currentmodule:: apyhtest_eva.unit02 .. autosummary:: pilot """ def test_ams_cython(tmpdir, cython_testpackage): # noqa with open(tmpdir.join('index.rst').strpath, 'w') as f: f.write(ams_cython_str) apidir = tmpdir.mkdir('api') with open(apidir.join('apyhtest_eva.unit02.pilot.rst').strpath, 'w') as f: f.write(PILOT_RST) run_sphinx_in_tmpdir(tmpdir) with open(tmpdir.join('index.rst.automodsumm').strpath) as f: result = f.read() assert result == ams_cython_expected # ============================================================================= CLASS_RST = """ :orphan: .. currentmodule:: {mod} .. autoclass:: {cls} """.strip() sorted_str = """ Before .. automodsumm:: sphinx_automodapi.tests.example_module.classes :sort: And After """ sorted_expected = """\ .. currentmodule:: sphinx_automodapi.tests.example_module.classes .. autosummary:: Egg Spam """ def test_sort(tmpdir): with open(tmpdir.join("index.rst").strpath, "w") as f: f.write(sorted_str) apidir = tmpdir.mkdir('api') mod = 'sphinx_automodapi.tests.example_module.classes' for cls in "Spam", "Egg": with open(apidir.join(f'{mod}.{cls}.rst').strpath, 'w') as f: f.write(CLASS_RST.format(mod=mod, cls=cls)) run_sphinx_in_tmpdir(tmpdir) with open(tmpdir.join("index.rst.automodsumm").strpath) as f: result = f.read() assert result == sorted_expected ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/test_cases.py0000644000175100001770000001264600000000000025556 0ustar00runnerdocker00000000000000# The following tests use a plain Python example module that is at # sphinx_automodapi.tests.example_module. # We store different cases in the cases sub-directory of the tests directory import os import glob import shutil from itertools import product import pytest from copy import deepcopy, copy from sphinx.util.osutil import ensuredir from docutils.parsers.rst import directives, roles from .helpers import build_main, write_conf CASES_ROOT = os.path.join(os.path.dirname(__file__), 'cases') CASES_DIRS = glob.glob(os.path.join(CASES_ROOT, '*')) PARALLEL = {False, True} intersphinx_mapping = { 'python': ('https://docs.python.org/3/', None) } DEFAULT_CONF = {'source_suffix': '.rst', 'master_doc': 'index', 'nitpicky': True, 'extensions': ['sphinx.ext.intersphinx', 'sphinx_automodapi.automodapi'], 'suppress_warnings': ['app.add_directive', 'app.add_node'], 'intersphinx_mapping': intersphinx_mapping, 'nitpick_ignore': [('py:class', 'sphinx_automodapi.tests.example_module.classes.BaseSpam'), ('py:class', 'sphinx_automodapi.tests.example_module.other_classes.BaseFoo'), # See the following links for why these classes need to be ignored. # This only seems to be necessary for Python 2.7. # # https://trac.sagemath.org/ticket/19211 # https://stackoverflow.com/q/11417221/3776794 ('py:class', '_abcoll.Sequence'), ('py:class', '_abcoll.Iterable'), ('py:class', '_abcoll.Container'), ('py:class', '_abcoll.Sized')]} def setup_function(func): # This can be replaced with the docutils_namespace context manager once # it is in a stable release of Sphinx func._directives = copy(directives._directives) func._roles = copy(roles._roles) def teardown_function(func): directives._directives = func._directives roles._roles = func._roles @pytest.mark.parametrize(('case_dir', 'parallel'), product(CASES_DIRS, PARALLEL)) def test_run_full_case(tmpdir, case_dir, parallel): input_dir = os.path.join(case_dir, 'input') output_dir = os.path.join(case_dir, 'output') docs_dir = tmpdir.mkdir('docs').strpath conf = deepcopy(DEFAULT_CONF) conf.update({'automodapi_toctreedirnm': 'api', 'automodapi_writereprocessed': True, 'automodsumm_writereprocessed': True}) if os.path.basename(case_dir) in ('mixed_toplevel', 'mixed_toplevel_all_objects', 'allowed_names'): conf['extensions'].append('sphinx_automodapi.smart_resolver') start_dir = os.path.abspath('.') src_dir = 'src' if 'source_dir' in case_dir else '.' ensuredir(os.path.join(docs_dir, src_dir)) write_conf(os.path.join(os.path.join(docs_dir, src_dir), 'conf.py'), conf) for root, dirnames, filenames in os.walk(input_dir): for filename in filenames: root_dir = os.path.join(docs_dir, os.path.relpath(root, input_dir)) ensuredir(root_dir) input_file = os.path.join(root, filename) shutil.copy(input_file, root_dir) argv = ['-W', '-b', 'html', src_dir, '_build/html'] if parallel: argv.insert(0, '-j 4') try: os.chdir(docs_dir) status = build_main(argv=argv) finally: os.chdir(start_dir) assert status == 0 # Check that all expected output files are there and match the reference files for root, dirnames, filenames in os.walk(output_dir): for filename in filenames: path_reference = os.path.join(root, filename) path_relative = os.path.relpath(path_reference, output_dir) path_actual = os.path.join(docs_dir, path_relative) assert os.path.exists(path_actual) with open(path_actual, encoding='utf8') as f: actual = f.read() with open(path_reference, encoding='utf8') as f: reference = f.read() assert actual.strip() == reference.strip() def test_duplicated_warning(tmpdir): input_dir = os.path.join(os.path.dirname(__file__), 'duplicated_warning', 'docs') docs_dir = tmpdir.mkdir('docs').strpath start_dir = os.path.abspath('.') src_dir = '.' for root, dirnames, filenames in os.walk(input_dir): for filename in filenames: root_dir = os.path.join(docs_dir, os.path.relpath(root, input_dir)) ensuredir(root_dir) input_file = os.path.join(root, filename) shutil.copy(input_file, root_dir) argv = ['-W', '-b', 'html', src_dir, '_build/html'] try: os.chdir(docs_dir) status = build_main(argv=argv) finally: os.chdir(start_dir) assert status == 0 def test_slots_example(): """Basic tests for slots example module""" from sphinx_automodapi.tests.example_module.slots import ( SlotDict, DerivedParam, DerivedSlotParam ) SlotDict('param', 'other_param').my_method() DerivedParam('param', 'other_param', 'extra_param').derived_from_slot_class_method() DerivedSlotParam('param', 'other_param', 'extra_param').derived_from_slot_class_method() ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/tests/test_utils.py0000644000175100001770000000257100000000000025614 0ustar00runnerdocker00000000000000# namedtuple is needed for find_mod_objs so it can have a non-local module from collections import namedtuple from ..utils import find_mod_objs def test_find_mod_objs(): lnms, fqns, objs = find_mod_objs('sphinx_automodapi') # just check for astropy.test ... other things might be added, so we # shouldn't check that it's the only thing assert lnms == [] lnms, fqns, objs = find_mod_objs( 'sphinx_automodapi.tests.test_utils', onlylocals=False) assert namedtuple in objs lnms, fqns, objs = find_mod_objs( 'sphinx_automodapi.tests.test_utils', onlylocals=True) assert 'namedtuple' not in lnms assert 'collections.namedtuple' not in fqns assert namedtuple not in objs def test_find_mod_objs_with_list_of_modules(): lnms, fqns, objs = find_mod_objs( 'sphinx_automodapi.tests.test_utils', onlylocals=['sphinx_automodapi']) assert namedtuple not in objs assert find_mod_objs in objs lnms, fqns, objs = find_mod_objs( 'sphinx_automodapi.tests.test_utils', onlylocals=['collections']) assert namedtuple in objs assert find_mod_objs not in objs lnms, fqns, objs = find_mod_objs( 'sphinx_automodapi.tests.test_utils', onlylocals=['collections', 'sphinx_automodapi']) assert namedtuple in objs assert find_mod_objs in objs ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/sphinx_automodapi/utils.py0000644000175100001770000001764400000000000023422 0ustar00runnerdocker00000000000000import sys import re import os from inspect import ismodule from warnings import warn from sphinx.ext.autosummary.generate import find_autosummary_in_docstring __all__ = ['cleanup_whitespace', 'find_mod_objs', 'find_autosummary_in_lines_for_automodsumm'] # We use \n instead of os.linesep because even on Windows, the generated files # use \n as the newline character. SPACE_NEWLINE = ' \n' SINGLE_NEWLINE = '\n' DOUBLE_NEWLINE = '\n\n' TRIPLE_NEWLINE = '\n\n\n' def cleanup_whitespace(text): """ Make sure there are never more than two consecutive newlines, and that there are no trailing whitespaces. """ # Get rid of overall leading/trailing whitespace text = text.strip() + '\n' # Get rid of trailing whitespace on each line while SPACE_NEWLINE in text: text = text.replace(SPACE_NEWLINE, SINGLE_NEWLINE) # Avoid too many consecutive newlines while TRIPLE_NEWLINE in text: text = text.replace(TRIPLE_NEWLINE, DOUBLE_NEWLINE) return text def find_mod_objs(modname, onlylocals=False, sort=False): """ Returns all the public attributes of a module referenced by name. .. note:: The returned list *not* include subpackages or modules of `modname`,nor does it include private attributes (those that beginwith '_' or are not in `__all__`). Parameters ---------- modname : str The name of the module to search. onlylocals : bool or list If `True`, only attributes that are either members of `modname` OR one of its modules or subpackages will be included. If a list, only members of packages in the list are included. If `False`, selection is done. This option is ignored if a module defines __all__ - in that case, __all__ is used to determine whether objects are public. Returns ------- localnames : list of str A list of the names of the attributes as they are named in the module `modname` . fqnames : list of str A list of the full qualified names of the attributes (e.g., ``astropy.utils.misc.find_mod_objs``). For attributes that are simple variables, this is based on the local name, but for functions or classes it can be different if they are actually defined elsewhere and just referenced in `modname`. objs : list of objects A list of the actual attributes themselves (in the same order as the other arguments) """ __import__(modname) mod = sys.modules[modname] # Note: use getattr instead of mod.__dict__[k] for modules that # define their own __getattr__ and __dir__. if hasattr(mod, '__all__'): pkgitems = [(k, getattr(mod, k)) for k in mod.__all__] # Optionally sort the items alphabetically if sort: pkgitems.sort() onlylocals = False else: pkgitems = [(k, getattr(mod, k)) for k in dir(mod) if k[0] != "_"] # filter out modules and pull the names and objs out localnames = [k for k, v in pkgitems if not ismodule(v)] objs = [v for k, v in pkgitems if not ismodule(v)] # fully qualified names can be determined from the object's module fqnames = [] for obj, lnm in zip(objs, localnames): if hasattr(obj, '__module__') and hasattr(obj, '__name__'): fqnames.append(obj.__module__ + '.' + obj.__name__) else: fqnames.append(modname + '.' + lnm) if onlylocals: if isinstance(onlylocals, (tuple, list)): modname = tuple(onlylocals) valids = [fqn.startswith(modname) for fqn in fqnames] localnames = [e for i, e in enumerate(localnames) if valids[i]] fqnames = [e for i, e in enumerate(fqnames) if valids[i]] objs = [e for i, e in enumerate(objs) if valids[i]] return localnames, fqnames, objs def find_autosummary_in_lines_for_automodsumm(lines, module=None, filename=None): """Find out what items appear in autosummary:: directives in the given lines. Returns a list of (name, toctree, template, inherited_members, noindex) where *name* is a name of an object and *toctree* the :toctree: path of the corresponding autosummary directive (relative to the root of the file name), *template* the value of the :template: option, and *inherited_members* is the value of the :inherited-members: option. *toctree*, *template*, and *inherited_members* are ``None`` if the directive does not have the corresponding options set. .. note:: This is a slightly modified version of ``sphinx.ext.autosummary.generate.find_autosummary_in_lines`` which recognizes the ``inherited-members`` option. """ autosummary_re = re.compile(r'^(\s*)\.\.\s+autosummary::\s*') automodule_re = re.compile( r'^\s*\.\.\s+automodule::\s*([A-Za-zäüöÄÜÖßő0-9_.]+)\s*$') module_re = re.compile( r'^\s*\.\.\s+(current)?module::\s*([a-zA-ZäüöÄÜÖßő0-9_.]+)\s*$') autosummary_item_re = re.compile(r'^\s+(~?[_a-zA-ZäüöÄÜÖßő][a-zA-ZäüöÄÜÖßő0-9_.]*)\s*.*?') toctree_arg_re = re.compile(r'^\s+:toctree:\s*(.*?)\s*$') template_arg_re = re.compile(r'^\s+:template:\s*(.*?)\s*$') inherited_members_arg_re = re.compile(r'^\s+:inherited-members:\s*$') no_inherited_members_arg_re = re.compile(r'^\s+:no-inherited-members:\s*$') noindex_arg_re = re.compile(r'^\s+:noindex:\s*$') other_options_re = re.compile(r'^\s+:nosignatures:\s*$') documented = [] toctree = None template = None inherited_members = None noindex = None current_module = module in_autosummary = False base_indent = "" for line in lines: if in_autosummary: m = toctree_arg_re.match(line) if m: toctree = m.group(1) if filename: toctree = os.path.join(os.path.dirname(filename), toctree) continue m = template_arg_re.match(line) if m: template = m.group(1).strip() continue m = inherited_members_arg_re.match(line) if m: inherited_members = True continue m = no_inherited_members_arg_re.match(line) if m: inherited_members = False continue m = noindex_arg_re.match(line) if m: noindex = True continue if line.strip().startswith(':'): if other_options_re.match(line): continue # skip known options else: warn(line) # warn about unknown options m = autosummary_item_re.match(line) if m: name = m.group(1).strip() if name.startswith('~'): name = name[1:] if current_module and \ not name.startswith(current_module + '.'): name = "%s.%s" % (current_module, name) documented.append((name, toctree, template, inherited_members, noindex)) continue if not line.strip() or line.startswith(base_indent + " "): continue in_autosummary = False m = autosummary_re.match(line) if m: in_autosummary = True base_indent = m.group(1) toctree = None template = None inherited_members = None continue m = automodule_re.search(line) if m: current_module = m.group(1).strip() # recurse into the automodule docstring documented.extend(find_autosummary_in_docstring( current_module, filename=filename)) continue m = module_re.match(line) if m: current_module = m.group(2) continue return documented ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230242.0 sphinx_automodapi-0.18.0/sphinx_automodapi/version.py0000644000175100001770000000063500000000000023737 0ustar00runnerdocker00000000000000# file generated by setuptools_scm # don't change, don't track in version control TYPE_CHECKING = False if TYPE_CHECKING: from typing import Tuple, Union VERSION_TUPLE = Tuple[Union[int, str], ...] else: VERSION_TUPLE = object version: str __version__: str __version_tuple__: VERSION_TUPLE version_tuple: VERSION_TUPLE __version__ = version = '0.18.0' __version_tuple__ = version_tuple = (0, 18, 0) ././@PaxHeader0000000000000000000000000000003400000000000011452 xustar000000000000000028 mtime=1726230243.0333345 sphinx_automodapi-0.18.0/sphinx_automodapi.egg-info/0000755000175100001770000000000000000000000023366 5ustar00runnerdocker00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230242.0 sphinx_automodapi-0.18.0/sphinx_automodapi.egg-info/PKG-INFO0000644000175100001770000000546100000000000024471 0ustar00runnerdocker00000000000000Metadata-Version: 2.1 Name: sphinx-automodapi Version: 0.18.0 Summary: Sphinx extension for auto-generating API documentation for entire modules Home-page: https://github.com/astropy/sphinx-automodapi Author: The Astropy Developers Author-email: astropy.team@gmail.com License: BSD 3-Clause License Classifier: Development Status :: 3 - Alpha Classifier: Intended Audience :: Developers Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Operating System :: OS Independent Classifier: License :: OSI Approved :: BSD License Requires-Python: >=3.8 Description-Content-Type: text/x-rst License-File: LICENSE.rst Requires-Dist: sphinx>=4 Provides-Extra: test Requires-Dist: pytest; extra == "test" Requires-Dist: pytest-cov; extra == "test" Requires-Dist: cython; extra == "test" Requires-Dist: coverage; extra == "test" Requires-Dist: setuptools; python_version >= "3.12" and extra == "test" Provides-Extra: rtd Requires-Dist: sphinx<7; extra == "rtd" Requires-Dist: sphinx-rtd-theme; extra == "rtd" |DOI| |PyPI| |Docs| |CI Status| |Coverage Status| About ===== This is a Sphinx extension to automatically generate API pages for whole modules. It was originally developed for the Astropy project but is now available as a standalone package since it can be used for any other package. The documentation can be found on `ReadTheDocs `_. Running tests ------------- To run the tests, you can either do:: pytest sphinx_automodapi or if you have `tox `_ installed:: tox -e test .. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.5799977.svg :target: https://doi.org/10.5281/zenodo.5799977 .. |PyPI| image:: https://img.shields.io/pypi/v/sphinx-automodapi.svg :target: https://pypi.python.org/pypi/sphinx-automodapi .. |Docs| image:: https://readthedocs.org/projects/sphinx-automodapi/badge/?version=latest :target: https://sphinx-automodapi.readthedocs.io/en/latest/?badge=latest .. |CI Status| image:: https://github.com/astropy/sphinx-automodapi/workflows/CI/badge.svg :target: https://github.com/astropy/sphinx-automodapi/actions .. |Coverage Status| image:: https://codecov.io/gh/astropy/sphinx-automodapi/branch/main/graph/badge.svg :target: https://codecov.io/gh/astropy/sphinx-automodapi Development status ------------------ Due to the limitations of FOSS development model, the Astropy Project does not have enough bandwidth to add new features or fixes to this package beyond what is necessary for the project itself. Therefore, we apologize for any inconvenience caused by unresolved open issues and unmerged stale pull requests. If you have any questions or concerns, please contact the project via https://www.astropy.org/help . Thank you for your interest in this package! ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230242.0 sphinx_automodapi-0.18.0/sphinx_automodapi.egg-info/SOURCES.txt0000644000175100001770000003043200000000000025254 0ustar00runnerdocker00000000000000.coveragerc .gitignore .readthedocs.yml CHANGES.rst LICENSE.rst MANIFEST.in README.rst pyproject.toml setup.cfg setup.py tox.ini .github/dependabot.yml .github/workflows/check_milestone.yml .github/workflows/ci_workflows.yml .github/workflows/publish.yml docs/Makefile docs/automodapi.rst docs/automodsumm.rst docs/conf.py docs/index.rst sphinx_automodapi/__init__.py sphinx_automodapi/autodoc_enhancements.py sphinx_automodapi/automodapi.py sphinx_automodapi/automodsumm.py sphinx_automodapi/smart_resolver.py sphinx_automodapi/utils.py sphinx_automodapi/version.py sphinx_automodapi.egg-info/PKG-INFO sphinx_automodapi.egg-info/SOURCES.txt sphinx_automodapi.egg-info/dependency_links.txt sphinx_automodapi.egg-info/not-zip-safe sphinx_automodapi.egg-info/requires.txt sphinx_automodapi.egg-info/top_level.txt sphinx_automodapi/templates/autosummary_core/base.rst sphinx_automodapi/templates/autosummary_core/class.rst sphinx_automodapi/templates/autosummary_core/module.rst sphinx_automodapi/tests/__init__.py sphinx_automodapi/tests/helpers.py sphinx_automodapi/tests/test_autodoc_enhancements.py sphinx_automodapi/tests/test_automodapi.py sphinx_automodapi/tests/test_automodsumm.py sphinx_automodapi/tests/test_cases.py sphinx_automodapi/tests/test_utils.py sphinx_automodapi/tests/cases/abstract_classes/README.md sphinx_automodapi/tests/cases/abstract_classes/input/index.rst sphinx_automodapi/tests/cases/abstract_classes/output/index.rst.automodapi sphinx_automodapi/tests/cases/abstract_classes/output/index.rst.automodsumm sphinx_automodapi/tests/cases/abstract_classes/output/api/sphinx_automodapi.tests.example_module.abstract_classes.SequenceSubclass.rst sphinx_automodapi/tests/cases/allowed_names/README.md sphinx_automodapi/tests/cases/allowed_names/input/index.rst sphinx_automodapi/tests/cases/allowed_names/output/index.rst.automodapi sphinx_automodapi/tests/cases/allowed_names/output/index.rst.automodsumm sphinx_automodapi/tests/cases/allowed_names/output/api/sphinx_automodapi.tests.example_module.Egg.rst sphinx_automodapi/tests/cases/allowed_names/output/api/sphinx_automodapi.tests.example_module.Spam.rst sphinx_automodapi/tests/cases/classes_no_inherit/README.md sphinx_automodapi/tests/cases/classes_no_inherit/input/index.rst sphinx_automodapi/tests/cases/classes_no_inherit/output/index.rst.automodapi sphinx_automodapi/tests/cases/classes_no_inherit/output/index.rst.automodsumm sphinx_automodapi/tests/cases/classes_no_inherit/output/api/sphinx_automodapi.tests.example_module.classes.Egg.rst sphinx_automodapi/tests/cases/classes_with_inherit/README.md sphinx_automodapi/tests/cases/classes_with_inherit/input/index.rst sphinx_automodapi/tests/cases/classes_with_inherit/output/index.rst.automodapi sphinx_automodapi/tests/cases/classes_with_inherit/output/index.rst.automodsumm sphinx_automodapi/tests/cases/classes_with_inherit/output/api/sphinx_automodapi.tests.example_module.classes.Egg.rst sphinx_automodapi/tests/cases/classes_with_inherit/output/api/sphinx_automodapi.tests.example_module.classes.Spam.rst sphinx_automodapi/tests/cases/func_headings/README.md sphinx_automodapi/tests/cases/func_headings/input/index.rst sphinx_automodapi/tests/cases/func_headings/output/index.rst.automodapi sphinx_automodapi/tests/cases/func_headings/output/index.rst.automodsumm sphinx_automodapi/tests/cases/func_headings/output/api/sphinx_automodapi.tests.example_module.functions.add.rst sphinx_automodapi/tests/cases/func_headings/output/api/sphinx_automodapi.tests.example_module.functions.multiply.rst sphinx_automodapi/tests/cases/func_noheading/README.md sphinx_automodapi/tests/cases/func_noheading/input/index.rst sphinx_automodapi/tests/cases/func_noheading/output/index.rst.automodapi sphinx_automodapi/tests/cases/func_noheading/output/index.rst.automodsumm sphinx_automodapi/tests/cases/func_noheading/output/api/sphinx_automodapi.tests.example_module.functions.add.rst sphinx_automodapi/tests/cases/func_noheading/output/api/sphinx_automodapi.tests.example_module.functions.multiply.rst sphinx_automodapi/tests/cases/func_nomaindocstring/README.md sphinx_automodapi/tests/cases/func_nomaindocstring/input/index.rst sphinx_automodapi/tests/cases/func_nomaindocstring/output/index.rst.automodapi sphinx_automodapi/tests/cases/func_nomaindocstring/output/index.rst.automodsumm sphinx_automodapi/tests/cases/func_nomaindocstring/output/api/sphinx_automodapi.tests.example_module.functions.add.rst sphinx_automodapi/tests/cases/func_nomaindocstring/output/api/sphinx_automodapi.tests.example_module.functions.multiply.rst sphinx_automodapi/tests/cases/func_simple/README.md sphinx_automodapi/tests/cases/func_simple/input/index.rst sphinx_automodapi/tests/cases/func_simple/output/index.rst.automodapi sphinx_automodapi/tests/cases/func_simple/output/index.rst.automodsumm sphinx_automodapi/tests/cases/func_simple/output/api/sphinx_automodapi.tests.example_module.functions.add.rst sphinx_automodapi/tests/cases/func_simple/output/api/sphinx_automodapi.tests.example_module.functions.multiply.rst sphinx_automodapi/tests/cases/inherited_members/README.md sphinx_automodapi/tests/cases/inherited_members/input/index.rst sphinx_automodapi/tests/cases/inherited_members/output/index.rst.automodapi sphinx_automodapi/tests/cases/inherited_members/output/index.rst.automodsumm sphinx_automodapi/tests/cases/inherited_members/output/api/sphinx_automodapi.tests.example_module.classes.Egg.rst sphinx_automodapi/tests/cases/inherited_members/output/api/sphinx_automodapi.tests.example_module.classes.Spam.rst sphinx_automodapi/tests/cases/inherited_members/output/api/sphinx_automodapi.tests.example_module.other_classes.Foo.rst sphinx_automodapi/tests/cases/mixed_toplevel/README.md sphinx_automodapi/tests/cases/mixed_toplevel/input/index.rst sphinx_automodapi/tests/cases/mixed_toplevel/output/index.rst.automodapi sphinx_automodapi/tests/cases/mixed_toplevel/output/index.rst.automodsumm sphinx_automodapi/tests/cases/mixed_toplevel/output/api/sphinx_automodapi.tests.example_module.Egg.rst sphinx_automodapi/tests/cases/mixed_toplevel/output/api/sphinx_automodapi.tests.example_module.Spam.rst sphinx_automodapi/tests/cases/mixed_toplevel/output/api/sphinx_automodapi.tests.example_module.add.rst sphinx_automodapi/tests/cases/mixed_toplevel/output/api/sphinx_automodapi.tests.example_module.multiply.rst sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/README.md sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/input/index.rst sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/index.rst.automodapi sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/index.rst.automodsumm sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_automodapi.tests.example_module.Egg.rst sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_automodapi.tests.example_module.FUNNY_WALK_STEPS.rst sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_automodapi.tests.example_module.PARROT_STATE.rst sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_automodapi.tests.example_module.Spam.rst sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_automodapi.tests.example_module.add.rst sphinx_automodapi/tests/cases/mixed_toplevel_all_objects/output/api/sphinx_automodapi.tests.example_module.multiply.rst sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/README.md sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/input/index.rst sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/index.rst.automodapi sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/index.rst.automodsumm sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/api/sphinx_automodapi.tests.example_module.Egg.rst sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/api/sphinx_automodapi.tests.example_module.Spam.rst sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/api/sphinx_automodapi.tests.example_module.add.rst sphinx_automodapi/tests/cases/mixed_toplevel_nodiagram/output/api/sphinx_automodapi.tests.example_module.multiply.rst sphinx_automodapi/tests/cases/nested/README.md sphinx_automodapi/tests/cases/nested/input/index.rst sphinx_automodapi/tests/cases/nested/input/tests/example_module/index.rst sphinx_automodapi/tests/cases/nested/input/tests/example_module/references.txt sphinx_automodapi/tests/cases/nested/output/api/sphinx_automodapi.tests.example_module.functions_with_ref.add.rst sphinx_automodapi/tests/cases/nested/output/api/sphinx_automodapi.tests.example_module.functions_with_ref.multiply.rst sphinx_automodapi/tests/cases/nested/output/tests/example_module/index.rst.automodapi sphinx_automodapi/tests/cases/nested/output/tests/example_module/index.rst.automodsumm sphinx_automodapi/tests/cases/non_ascii/README.md sphinx_automodapi/tests/cases/non_ascii/input/index.rst sphinx_automodapi/tests/cases/non_ascii/output/index.rst.automodapi sphinx_automodapi/tests/cases/non_ascii/output/index.rst.automodsumm sphinx_automodapi/tests/cases/non_ascii/output/api/sphinx_automodapi.tests.example_module.functions.add.rst sphinx_automodapi/tests/cases/non_ascii/output/api/sphinx_automodapi.tests.example_module.functions.multiply.rst sphinx_automodapi/tests/cases/non_ascii/output/api/sphinx_automodapi.tests.example_module.nonascii.NonAsciiÄöüßő.rst sphinx_automodapi/tests/cases/public_from_private/README.md sphinx_automodapi/tests/cases/public_from_private/input/index.rst sphinx_automodapi/tests/cases/public_from_private/output/index.rst.automodapi sphinx_automodapi/tests/cases/public_from_private/output/index.rst.automodsumm sphinx_automodapi/tests/cases/public_from_private/output/api/sphinx_automodapi.tests.example_module.public.Camelot.rst sphinx_automodapi/tests/cases/public_from_private/output/api/sphinx_automodapi.tests.example_module.public.Spam.rst sphinx_automodapi/tests/cases/slots/README.md sphinx_automodapi/tests/cases/slots/input/index.rst sphinx_automodapi/tests/cases/slots/output/index.rst.automodapi sphinx_automodapi/tests/cases/slots/output/index.rst.automodsumm sphinx_automodapi/tests/cases/slots/output/api/sphinx_automodapi.tests.example_module.slots.DerivedParam.rst sphinx_automodapi/tests/cases/slots/output/api/sphinx_automodapi.tests.example_module.slots.DerivedSlotParam.rst sphinx_automodapi/tests/cases/slots/output/api/sphinx_automodapi.tests.example_module.slots.SlotDict.rst sphinx_automodapi/tests/cases/source_dir/README.md sphinx_automodapi/tests/cases/source_dir/input/src/index.rst sphinx_automodapi/tests/cases/source_dir/output/src/index.rst.automodapi sphinx_automodapi/tests/cases/source_dir/output/src/index.rst.automodsumm sphinx_automodapi/tests/cases/source_dir/output/src/api/sphinx_automodapi.tests.example_module.functions.add.rst sphinx_automodapi/tests/cases/source_dir/output/src/api/sphinx_automodapi.tests.example_module.functions.multiply.rst sphinx_automodapi/tests/cases/variables/README.md sphinx_automodapi/tests/cases/variables/input/index.rst sphinx_automodapi/tests/cases/variables/output/index.rst.automodapi sphinx_automodapi/tests/cases/variables/output/index.rst.automodsumm sphinx_automodapi/tests/cases/variables/output/api/sphinx_automodapi.tests.example_module.variables.FUNNY_WALK_STEPS.rst sphinx_automodapi/tests/cases/variables/output/api/sphinx_automodapi.tests.example_module.variables.PARROT_STATE.rst sphinx_automodapi/tests/duplicated_warning/__init__.py sphinx_automodapi/tests/duplicated_warning/docs/conf.py sphinx_automodapi/tests/duplicated_warning/docs/foo.rst sphinx_automodapi/tests/duplicated_warning/docs/index.rst sphinx_automodapi/tests/duplicated_warning/duplicated/__init__.py sphinx_automodapi/tests/duplicated_warning/duplicated/foo/__init__.py sphinx_automodapi/tests/duplicated_warning/duplicated/foo/foo.py sphinx_automodapi/tests/example_module/__init__.py sphinx_automodapi/tests/example_module/_private.py sphinx_automodapi/tests/example_module/abstract_classes.py sphinx_automodapi/tests/example_module/classes.py sphinx_automodapi/tests/example_module/functions.py sphinx_automodapi/tests/example_module/functions_with_ref.py sphinx_automodapi/tests/example_module/mixed.py sphinx_automodapi/tests/example_module/noall.py sphinx_automodapi/tests/example_module/nonascii.py sphinx_automodapi/tests/example_module/other_classes.py sphinx_automodapi/tests/example_module/public.py sphinx_automodapi/tests/example_module/slots.py sphinx_automodapi/tests/example_module/stdlib.py sphinx_automodapi/tests/example_module/variables.py././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230242.0 sphinx_automodapi-0.18.0/sphinx_automodapi.egg-info/dependency_links.txt0000644000175100001770000000000100000000000027434 0ustar00runnerdocker00000000000000 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230242.0 sphinx_automodapi-0.18.0/sphinx_automodapi.egg-info/not-zip-safe0000644000175100001770000000000100000000000025614 0ustar00runnerdocker00000000000000 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230242.0 sphinx_automodapi-0.18.0/sphinx_automodapi.egg-info/requires.txt0000644000175100001770000000020100000000000025757 0ustar00runnerdocker00000000000000sphinx>=4 [rtd] sphinx<7 sphinx-rtd-theme [test] pytest pytest-cov cython coverage [test:python_version >= "3.12"] setuptools ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230242.0 sphinx_automodapi-0.18.0/sphinx_automodapi.egg-info/top_level.txt0000644000175100001770000000002200000000000026112 0ustar00runnerdocker00000000000000sphinx_automodapi ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1726230219.0 sphinx_automodapi-0.18.0/tox.ini0000644000175100001770000000217700000000000017463 0ustar00runnerdocker00000000000000[tox] envlist = py{38,39,310,311,312}-test-sphinx{_oldest,53,62,70,71,72,80,dev}{-cov}{-clocale} requires = pip >= 18.0 setuptools >= 30.3.0 isolated_build = true [testenv] changedir = .tmp/{envname} deps = sphinx_oldest: sphinx==4.0.0 sphinx53: sphinx==5.3.* sphinx62: sphinx==6.2.* sphinx70: sphinx==7.0.* sphinx71: sphinx==7.1.* sphinx72: sphinx==7.2.* sphinx80: sphinx==8.0.* sphinxdev: git+https://github.com/sphinx-doc/sphinx.git extras = test: test commands = pip freeze !cov: pytest --pyargs sphinx_automodapi {posargs} cov: pytest --pyargs sphinx_automodapi --cov sphinx_automodapi --cov-config={toxinidir}/setup.cfg {posargs} cov: coverage xml -o {toxinidir}/coverage.xml passenv = HOME, WINDIR, LC_ALL, LC_CTYPE, LANG, CC, CI setenv = cov: CFLAGS = --coverage -fno-inline-functions -O0 clocale: LC_CTYPE=C clocale: LC_ALL=C clocale: LANG=C platform = clocale: linux|darwin [testenv:codestyle] skip_install = true changedir = {toxinidir} description = Run all style and file checks with pre-commit deps = flake8 commands = flake8 sphinx_automodapi --count