GithubHelp home page GithubHelp logo

scikit-build / moderncmakedomain Goto Github PK

View Code? Open in Web Editor NEW
20.0 8.0 4.0 79 KB

Sphinx Domain For Modern CMake

Home Page: https://pypi.org/project/sphinxcontrib-moderncmakedomain/

License: Other

Python 100.00%
sphinxcontrib sphinx sphinx-doc sphinx-extension cmake kitware

moderncmakedomain's Introduction

Sphinx Domain for Modern CMake

This is taken directly from the Kitware git repository's Utilities directory. The original sphinxcontrib-cmakedomain has not been touched in quite some and as a result it was wildly out of date. Documenting CMake domain entities in projects is painful otherwise. This works exactly in the same way as Kitware, so some time might be needed to study their approach to these problems.

This repository is under the same License as all of CMake, which is the BSD-3-Clause license.

๐Ÿšจ๐Ÿšจ๐Ÿšจ Any issues you run into with this plugin must be reported to Kitware, unless they involve the packaging itself. The Python files exactly match the CMake source for the released version numbers. ๐Ÿšจ๐Ÿšจ๐Ÿšจ

Installation

PyPI

This domain is available via PyPI. Install it directly via pip:

$ pip install sphinxcontrib-moderncmakedomain

Alternatively, place it inside of your setup.py, pyproject.toml, requirements.txt or whatever system it is that you use to declare and manage your dependencies. A new version will usually only be released if there is a change to this extension inside CMake.

Git

This module is installable via pip and GitHub directly as well

$ pip install git+https://github.com/scikit-build/moderncmakedomain.git

Usage

To enable the use of the moderncmakedomain, add sphinxcontrib.moderncmakedomain to the extensions variable of your conf.py file:

extensions = [..., 'sphinxcontrib.moderncmakedomain', ...]

The plugin currently provides several directives and references. These are documented below.

Directives

directive description
cmake:variable:: For a basic variable
cmake:command:: For a function
cmake-module:: Autodoc style extractor (takes a relative filepath)
cmake:envvar:: For environment variables

To declare any of the references found below, they must be placed into a directory with the same name under the sphinx SOURCEDIR/master doc. Thus, prop_tgt/MY_PERSONAL_PROPERTY.rst can be referred to with :prop_tgt:`MY_PERSONAL_PROPERTY` . This is currently the only way CMake permits declaring new properties.

References

Each reference below can be placed into a directory with the same name to document custom extensions provided by your CMake libraries.

ref description
:variable: Refer to a CMake variable
:command: Refer to a CMake command
:envvar: Refers to an environment variable
:cpack_gen: Refers to CPack generators
:generator: Refers to a build file generator
:genex: Refers to a generator expression
:guide: Used to refer to a "guide" page
:manual: Used to refer to a "manual" page (like cmake(1))
:policy: Refers to CMake Policies
:module: Refers to CMake Modules
:prop_tgt: For target properties
:prop_test: For test properties
:prop_sf: For source file properties
:prop_gbl: For global properties
:prop_dir: For directory properties
:prop_inst: For installed file properties
:prop_cache: For cache properties

History

sphinx-moderncmakedomain was initially developed in October 2018 by slurps-mad-rips to help write CMake documentation by simply publishing a python package of the same. This was a critical step to ease the maintenance of sphinx-based documentation and avoid systematically copying the associated python module maintained within the CMake repository.

Later in early August 2021, henryiii discovered the sphinx-moderncmakedomain project while working on scikit-build issue #574 intended to simplify its documentation generation infrastructure and avoid updating its own copy of the sphinx extension. henryiii and jcfr then worked with slurps-mad-rips to establish a transition plan to collaboratively maintain the project within the scikit-build organization.

moderncmakedomain's People

Contributors

bruxisma avatar dependabot[bot] avatar henryiii avatar jdillard avatar jtxa avatar pre-commit-ci[bot] avatar pro avatar roehling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moderncmakedomain's Issues

3.27.0: pytest is failing in tests/test_basic.py units with deprecation errors

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix> using 'installer` module
  • run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
  • build is performed in env which is cut off from access to the public network (pytest is executed with -m "not network")

Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinxcontrib-moderncmakedomain-3.27.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinxcontrib-moderncmakedomain-3.27.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/moderncmakedomain-3.27.0
configfile: pyproject.toml
testpaths: tests
collected 4 items

tests/test_basic.py EEE                                                                                                                                                               [ 75%]
tests/test_version.py .                                                                                                                                                               [100%]

========================================================================================== ERRORS ===========================================================================================
___________________________________________________________________________ ERROR at setup of test_simple_html[0] ___________________________________________________________________________

test_params = {'shared_result': None}
app_params = app_params(args=['html'], kwargs={'freshenv': True, 'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')})
make_app = <function make_app.<locals>.make at 0x7f5525a635e0>, shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7f5525a4f7c0>

    @pytest.fixture(scope='function')
    def app(test_params: dict, app_params: tuple[dict, dict], make_app: Callable,
            shared_result: SharedResult) -> Generator[SphinxTestApp, None, None]:
        """
        Provides the 'sphinx.application.Sphinx' object
        """
        args, kwargs = app_params
>       app_ = make_app(*args, **kwargs)

app_params = app_params(args=['html'], kwargs={'freshenv': True, 'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')})
args       = ['html']
kwargs     = {'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'freshenv': True, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')}
make_app   = <function make_app.<locals>.make at 0x7f5525a635e0>
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7f5525a4f7c0>
test_params = {'shared_result': None}

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
    app_: Any = SphinxTestApp(*args, **kwargs)
        apps       = []
        args       = ('html',)
        kwargs     = {'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'freshenv': True, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root'), 'status': <_io.StringIO object at 0x7f5525a63700>, ...}
        status     = <_io.StringIO object at 0x7f5525a63700>
        test_params = {'shared_result': None}
        warning    = <_io.StringIO object at 0x7f5525a63790>
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
    super().__init__(srcdir, confdir, outdir, doctreedir,
        __class__  = <class 'sphinx.testing.util.SphinxTestApp'>
        builddir   = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build')
        buildername = 'html'
        confdir    = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        confoverrides = {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}
        doctreedir = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/doctrees')
        docutilsconf = None
        freshenv   = True
        outdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/html')
        parallel   = 0
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5525a4fd30>
        srcdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        status     = <_io.StringIO object at 0x7f5525a63700>
        tags       = None
        warning    = <_io.StringIO object at 0x7f5525a63790>
        warningiserror = False
/usr/lib/python3.8/site-packages/sphinx/application.py:225: in __init__
    self.setup_extension(extension)
        buildername = 'html'
        confdir    = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        confoverrides = {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}
        doctreedir = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/doctrees')
        extension  = 'sphinxcontrib.htmlhelp'
        freshenv   = True
        keep_going = False
        outdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/html')
        parallel   = 0
        pdb        = False
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5525a4fd30>
        srcdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        status     = <_io.StringIO object at 0x7f5525a63700>
        tags       = None
        verbosity  = 0
        warning    = <_io.StringIO object at 0x7f5525a63790>
        warningiserror = False
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
    self.registry.load_extension(self, extname)
        extname    = 'sphinxcontrib.htmlhelp'
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5525a4fd30>
/usr/lib/python3.8/site-packages/sphinx/registry.py:442: in load_extension
    mod = import_module(extname)
        app        = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5525a4fd30>
        extname    = 'sphinxcontrib.htmlhelp'
        prefix     = 'while setting up extension sphinxcontrib.htmlhelp:'
        self       = <sphinx.registry.SphinxComponentRegistry object at 0x7f5525a4fdc0>
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
        level      = 0
        name       = 'sphinxcontrib.htmlhelp'
        package    = None
/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py:26: in <module>
    from sphinx.util import progress_message
        Any        = typing.Any
        Config     = <class 'sphinx.config.Config'>
        Dict       = typing.Dict
        Element    = <class 'docutils.nodes.Element'>
        IndexEntries = <class 'sphinx.environment.adapters.indexentries.IndexEntries'>
        List       = typing.List
        Node       = <class 'docutils.nodes.Node'>
        Set        = typing.Set
        Sphinx     = <class 'sphinx.application.Sphinx'>
        StandaloneHTMLBuilder = <class 'sphinx.builders.html.StandaloneHTMLBuilder'>
        Tuple      = typing.Tuple
        Type       = typing.Type
        __builtins__ = <builtins>
        __cached__ = '/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__pycache__/__init__.cpython-38.pyc'
        __doc__    = '\n    sphinxcontrib.htmlhelp\n    ~~~~~~~~~~~~~~~~~~~~~~\n\n    Build HTML help support files.\n\n    :copyright: Copyright 2007-2019 by the Sphinx team, see README.\n    :license: BSD, see LICENSE for details.\n'
        __file__   = '/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py'
        __loader__ = <_frozen_importlib_external.SourceFileLoader object at 0x7f5525087e80>
        __name__   = 'sphinxcontrib.htmlhelp'
        __package__ = 'sphinxcontrib.htmlhelp'
        __path__   = ['/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp']
        __spec__   = ModuleSpec(name='sphinxcontrib.htmlhelp', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f5525087e80...xcontrib/htmlhelp/__init__.py', submodule_search_locations=['/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp'])
        __warningregistry__ = {'version': 33}
        addnodes   = <module 'sphinx.addnodes' from '/usr/lib/python3.8/site-packages/sphinx/addnodes.py'>
        document   = <class 'docutils.nodes.document'>
        get_translation = <function get_translation at 0x7f55263e5670>
        html       = <module 'html' from '/usr/lib64/python3.8/html/__init__.py'>
        logging    = <module 'sphinx.util.logging' from '/usr/lib/python3.8/site-packages/sphinx/util/logging.py'>
        nodes      = <module 'docutils.nodes' from '/usr/lib/python3.8/site-packages/docutils/nodes.py'>
        os         = <module 'os' from '/usr/lib64/python3.8/os.py'>
        path       = <module 'posixpath' from '/usr/lib64/python3.8/posixpath.py'>
/usr/lib/python3.8/site-packages/sphinx/util/__init__.py:408: in __getattr__
    _deprecation_warning(__name__, name, canonical_name, remove=(8, 0))
        _deprecation_warning = <function _deprecation_warning at 0x7f55266b4a60>
        canonical_name = 'sphinx.http_date.epoch_to_rfc1123'
        deprecated_object = <class 'sphinx.util.display.progress_message'>
        name       = 'progress_message'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

module = 'sphinx.util', attribute = 'progress_message', canonical_name = 'sphinx.http_date.epoch_to_rfc1123'

    def _deprecation_warning(
        module: str,
        attribute: str,
        canonical_name: str,
        *,
        remove: tuple[int, int],
    ) -> None:
        """Helper function for module-level deprecations using __getattr__

        Exemplar usage:

        .. code:: python

           # deprecated name -> (object to return, canonical path or empty string)
           _DEPRECATED_OBJECTS = {
               'deprecated_name': (object_to_return, 'fully_qualified_replacement_name'),
           }


           def __getattr__(name):
               if name not in _DEPRECATED_OBJECTS:
                   raise AttributeError(f'module {__name__!r} has no attribute {name!r}')

               from sphinx.deprecation import _deprecation_warning

               deprecated_object, canonical_name = _DEPRECATED_OBJECTS[name]
               _deprecation_warning(__name__, name, canonical_name, remove=(7, 0))
               return deprecated_object
        """

        if remove == (7, 0):
            warning_class: type[Warning] = RemovedInSphinx70Warning
        elif remove == (8, 0):
            warning_class = RemovedInSphinx80Warning
        else:
            raise RuntimeError(f'removal version {remove!r} is invalid!')

        qualified_name = f'{module}.{attribute}'
        if canonical_name:
            message = (f'The alias {qualified_name!r} is deprecated, '
                       f'use {canonical_name!r} instead.')
        else:
            message = f'{qualified_name!r} is deprecated.'

>       warnings.warn(message + " Check CHANGES for Sphinx API modifications.",
                      warning_class, stacklevel=3)
E       sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead. Check CHANGES for Sphinx API modifications.

attribute  = 'progress_message'
canonical_name = 'sphinx.http_date.epoch_to_rfc1123'
message    = "The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead."
module     = 'sphinx.util'
qualified_name = 'sphinx.util.progress_message'
remove     = (8, 0)
warning_class = <class 'sphinx.deprecation.RemovedInSphinx80Warning'>

/usr/lib/python3.8/site-packages/sphinx/deprecation.py:63: RemovedInSphinx80Warning
___________________________________________________________________________ ERROR at setup of test_simple_html[1] ___________________________________________________________________________

test_params = {'shared_result': None}
app_params = app_params(args=['html'], kwargs={'freshenv': True, 'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')})
make_app = <function make_app.<locals>.make at 0x7f5524f0d8b0>, shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7f5524f05b50>

    @pytest.fixture(scope='function')
    def app(test_params: dict, app_params: tuple[dict, dict], make_app: Callable,
            shared_result: SharedResult) -> Generator[SphinxTestApp, None, None]:
        """
        Provides the 'sphinx.application.Sphinx' object
        """
        args, kwargs = app_params
>       app_ = make_app(*args, **kwargs)

app_params = app_params(args=['html'], kwargs={'freshenv': True, 'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')})
args       = ['html']
kwargs     = {'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'freshenv': True, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')}
make_app   = <function make_app.<locals>.make at 0x7f5524f0d8b0>
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7f5524f05b50>
test_params = {'shared_result': None}

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
    app_: Any = SphinxTestApp(*args, **kwargs)
        apps       = []
        args       = ('html',)
        kwargs     = {'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'freshenv': True, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root'), 'status': <_io.StringIO object at 0x7f5524f0d9d0>, ...}
        status     = <_io.StringIO object at 0x7f5524f0d9d0>
        test_params = {'shared_result': None}
        warning    = <_io.StringIO object at 0x7f5524f0da60>
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
    super().__init__(srcdir, confdir, outdir, doctreedir,
        __class__  = <class 'sphinx.testing.util.SphinxTestApp'>
        builddir   = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build')
        buildername = 'html'
        confdir    = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        confoverrides = {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}
        doctreedir = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/doctrees')
        docutilsconf = None
        freshenv   = True
        outdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/html')
        parallel   = 0
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524f056d0>
        srcdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        status     = <_io.StringIO object at 0x7f5524f0d9d0>
        tags       = None
        warning    = <_io.StringIO object at 0x7f5524f0da60>
        warningiserror = False
/usr/lib/python3.8/site-packages/sphinx/application.py:225: in __init__
    self.setup_extension(extension)
        buildername = 'html'
        confdir    = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        confoverrides = {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}
        doctreedir = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/doctrees')
        extension  = 'sphinxcontrib.htmlhelp'
        freshenv   = True
        keep_going = False
        outdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/html')
        parallel   = 0
        pdb        = False
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524f056d0>
        srcdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        status     = <_io.StringIO object at 0x7f5524f0d9d0>
        tags       = None
        verbosity  = 0
        warning    = <_io.StringIO object at 0x7f5524f0da60>
        warningiserror = False
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
    self.registry.load_extension(self, extname)
        extname    = 'sphinxcontrib.htmlhelp'
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524f056d0>
/usr/lib/python3.8/site-packages/sphinx/registry.py:442: in load_extension
    mod = import_module(extname)
        app        = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524f056d0>
        extname    = 'sphinxcontrib.htmlhelp'
        prefix     = 'while setting up extension sphinxcontrib.htmlhelp:'
        self       = <sphinx.registry.SphinxComponentRegistry object at 0x7f5524f05670>
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
        level      = 0
        name       = 'sphinxcontrib.htmlhelp'
        package    = None
/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py:26: in <module>
    from sphinx.util import progress_message
        Any        = typing.Any
        Config     = <class 'sphinx.config.Config'>
        Dict       = typing.Dict
        Element    = <class 'docutils.nodes.Element'>
        IndexEntries = <class 'sphinx.environment.adapters.indexentries.IndexEntries'>
        List       = typing.List
        Node       = <class 'docutils.nodes.Node'>
        Set        = typing.Set
        Sphinx     = <class 'sphinx.application.Sphinx'>
        StandaloneHTMLBuilder = <class 'sphinx.builders.html.StandaloneHTMLBuilder'>
        Tuple      = typing.Tuple
        Type       = typing.Type
        __builtins__ = <builtins>
        __cached__ = '/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__pycache__/__init__.cpython-38.pyc'
        __doc__    = '\n    sphinxcontrib.htmlhelp\n    ~~~~~~~~~~~~~~~~~~~~~~\n\n    Build HTML help support files.\n\n    :copyright: Copyright 2007-2019 by the Sphinx team, see README.\n    :license: BSD, see LICENSE for details.\n'
        __file__   = '/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py'
        __loader__ = <_frozen_importlib_external.SourceFileLoader object at 0x7f5524eb47f0>
        __name__   = 'sphinxcontrib.htmlhelp'
        __package__ = 'sphinxcontrib.htmlhelp'
        __path__   = ['/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp']
        __spec__   = ModuleSpec(name='sphinxcontrib.htmlhelp', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f5524eb47f0...xcontrib/htmlhelp/__init__.py', submodule_search_locations=['/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp'])
        __warningregistry__ = {'version': 66}
        addnodes   = <module 'sphinx.addnodes' from '/usr/lib/python3.8/site-packages/sphinx/addnodes.py'>
        document   = <class 'docutils.nodes.document'>
        get_translation = <function get_translation at 0x7f55263e5670>
        html       = <module 'html' from '/usr/lib64/python3.8/html/__init__.py'>
        logging    = <module 'sphinx.util.logging' from '/usr/lib/python3.8/site-packages/sphinx/util/logging.py'>
        nodes      = <module 'docutils.nodes' from '/usr/lib/python3.8/site-packages/docutils/nodes.py'>
        os         = <module 'os' from '/usr/lib64/python3.8/os.py'>
        path       = <module 'posixpath' from '/usr/lib64/python3.8/posixpath.py'>
/usr/lib/python3.8/site-packages/sphinx/util/__init__.py:408: in __getattr__
    _deprecation_warning(__name__, name, canonical_name, remove=(8, 0))
        _deprecation_warning = <function _deprecation_warning at 0x7f55266b4a60>
        canonical_name = 'sphinx.http_date.epoch_to_rfc1123'
        deprecated_object = <class 'sphinx.util.display.progress_message'>
        name       = 'progress_message'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

module = 'sphinx.util', attribute = 'progress_message', canonical_name = 'sphinx.http_date.epoch_to_rfc1123'

    def _deprecation_warning(
        module: str,
        attribute: str,
        canonical_name: str,
        *,
        remove: tuple[int, int],
    ) -> None:
        """Helper function for module-level deprecations using __getattr__

        Exemplar usage:

        .. code:: python

           # deprecated name -> (object to return, canonical path or empty string)
           _DEPRECATED_OBJECTS = {
               'deprecated_name': (object_to_return, 'fully_qualified_replacement_name'),
           }


           def __getattr__(name):
               if name not in _DEPRECATED_OBJECTS:
                   raise AttributeError(f'module {__name__!r} has no attribute {name!r}')

               from sphinx.deprecation import _deprecation_warning

               deprecated_object, canonical_name = _DEPRECATED_OBJECTS[name]
               _deprecation_warning(__name__, name, canonical_name, remove=(7, 0))
               return deprecated_object
        """

        if remove == (7, 0):
            warning_class: type[Warning] = RemovedInSphinx70Warning
        elif remove == (8, 0):
            warning_class = RemovedInSphinx80Warning
        else:
            raise RuntimeError(f'removal version {remove!r} is invalid!')

        qualified_name = f'{module}.{attribute}'
        if canonical_name:
            message = (f'The alias {qualified_name!r} is deprecated, '
                       f'use {canonical_name!r} instead.')
        else:
            message = f'{qualified_name!r} is deprecated.'

>       warnings.warn(message + " Check CHANGES for Sphinx API modifications.",
                      warning_class, stacklevel=3)
E       sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead. Check CHANGES for Sphinx API modifications.

attribute  = 'progress_message'
canonical_name = 'sphinx.http_date.epoch_to_rfc1123'
message    = "The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead."
module     = 'sphinx.util'
qualified_name = 'sphinx.util.progress_message'
remove     = (8, 0)
warning_class = <class 'sphinx.deprecation.RemovedInSphinx80Warning'>

/usr/lib/python3.8/site-packages/sphinx/deprecation.py:63: RemovedInSphinx80Warning
___________________________________________________________________________ ERROR at setup of test_simple_html[2] ___________________________________________________________________________

test_params = {'shared_result': None}
app_params = app_params(args=['html'], kwargs={'freshenv': True, 'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')})
make_app = <function make_app.<locals>.make at 0x7f55259ceaf0>, shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7f5524f99520>

    @pytest.fixture(scope='function')
    def app(test_params: dict, app_params: tuple[dict, dict], make_app: Callable,
            shared_result: SharedResult) -> Generator[SphinxTestApp, None, None]:
        """
        Provides the 'sphinx.application.Sphinx' object
        """
        args, kwargs = app_params
>       app_ = make_app(*args, **kwargs)

app_params = app_params(args=['html'], kwargs={'freshenv': True, 'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')})
args       = ['html']
kwargs     = {'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'freshenv': True, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')}
make_app   = <function make_app.<locals>.make at 0x7f55259ceaf0>
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7f5524f99520>
test_params = {'shared_result': None}

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
    app_: Any = SphinxTestApp(*args, **kwargs)
        apps       = []
        args       = ('html',)
        kwargs     = {'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'freshenv': True, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root'), 'status': <_io.StringIO object at 0x7f5525a63040>, ...}
        status     = <_io.StringIO object at 0x7f5525a63040>
        test_params = {'shared_result': None}
        warning    = <_io.StringIO object at 0x7f5525a63790>
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
    super().__init__(srcdir, confdir, outdir, doctreedir,
        __class__  = <class 'sphinx.testing.util.SphinxTestApp'>
        builddir   = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build')
        buildername = 'html'
        confdir    = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        confoverrides = {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}
        doctreedir = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/doctrees')
        docutilsconf = None
        freshenv   = True
        outdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/html')
        parallel   = 0
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524ec03a0>
        srcdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        status     = <_io.StringIO object at 0x7f5525a63040>
        tags       = None
        warning    = <_io.StringIO object at 0x7f5525a63790>
        warningiserror = False
/usr/lib/python3.8/site-packages/sphinx/application.py:225: in __init__
    self.setup_extension(extension)
        buildername = 'html'
        confdir    = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        confoverrides = {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}
        doctreedir = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/doctrees')
        extension  = 'sphinxcontrib.htmlhelp'
        freshenv   = True
        keep_going = False
        outdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/html')
        parallel   = 0
        pdb        = False
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524ec03a0>
        srcdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        status     = <_io.StringIO object at 0x7f5525a63040>
        tags       = None
        verbosity  = 0
        warning    = <_io.StringIO object at 0x7f5525a63790>
        warningiserror = False
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
    self.registry.load_extension(self, extname)
        extname    = 'sphinxcontrib.htmlhelp'
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524ec03a0>
/usr/lib/python3.8/site-packages/sphinx/registry.py:442: in load_extension
    mod = import_module(extname)
        app        = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524ec03a0>
        extname    = 'sphinxcontrib.htmlhelp'
        prefix     = 'while setting up extension sphinxcontrib.htmlhelp:'
        self       = <sphinx.registry.SphinxComponentRegistry object at 0x7f5524ec04f0>
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
        level      = 0
        name       = 'sphinxcontrib.htmlhelp'
        package    = None
/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py:26: in <module>
    from sphinx.util import progress_message
        Any        = typing.Any
        Config     = <class 'sphinx.config.Config'>
        Dict       = typing.Dict
        Element    = <class 'docutils.nodes.Element'>
        IndexEntries = <class 'sphinx.environment.adapters.indexentries.IndexEntries'>
        List       = typing.List
        Node       = <class 'docutils.nodes.Node'>
        Set        = typing.Set
        Sphinx     = <class 'sphinx.application.Sphinx'>
        StandaloneHTMLBuilder = <class 'sphinx.builders.html.StandaloneHTMLBuilder'>
        Tuple      = typing.Tuple
        Type       = typing.Type
        __builtins__ = <builtins>
        __cached__ = '/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__pycache__/__init__.cpython-38.pyc'
        __doc__    = '\n    sphinxcontrib.htmlhelp\n    ~~~~~~~~~~~~~~~~~~~~~~\n\n    Build HTML help support files.\n\n    :copyright: Copyright 2007-2019 by the Sphinx team, see README.\n    :license: BSD, see LICENSE for details.\n'
        __file__   = '/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py'
        __loader__ = <_frozen_importlib_external.SourceFileLoader object at 0x7f5524e67be0>
        __name__   = 'sphinxcontrib.htmlhelp'
        __package__ = 'sphinxcontrib.htmlhelp'
        __path__   = ['/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp']
        __spec__   = ModuleSpec(name='sphinxcontrib.htmlhelp', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f5524e67be0...xcontrib/htmlhelp/__init__.py', submodule_search_locations=['/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp'])
        __warningregistry__ = {'version': 99}
        addnodes   = <module 'sphinx.addnodes' from '/usr/lib/python3.8/site-packages/sphinx/addnodes.py'>
        document   = <class 'docutils.nodes.document'>
        get_translation = <function get_translation at 0x7f55263e5670>
        html       = <module 'html' from '/usr/lib64/python3.8/html/__init__.py'>
        logging    = <module 'sphinx.util.logging' from '/usr/lib/python3.8/site-packages/sphinx/util/logging.py'>
        nodes      = <module 'docutils.nodes' from '/usr/lib/python3.8/site-packages/docutils/nodes.py'>
        os         = <module 'os' from '/usr/lib64/python3.8/os.py'>
        path       = <module 'posixpath' from '/usr/lib64/python3.8/posixpath.py'>
/usr/lib/python3.8/site-packages/sphinx/util/__init__.py:408: in __getattr__
    _deprecation_warning(__name__, name, canonical_name, remove=(8, 0))
        _deprecation_warning = <function _deprecation_warning at 0x7f55266b4a60>
        canonical_name = 'sphinx.http_date.epoch_to_rfc1123'
        deprecated_object = <class 'sphinx.util.display.progress_message'>
        name       = 'progress_message'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

module = 'sphinx.util', attribute = 'progress_message', canonical_name = 'sphinx.http_date.epoch_to_rfc1123'

    def _deprecation_warning(
        module: str,
        attribute: str,
        canonical_name: str,
        *,
        remove: tuple[int, int],
    ) -> None:
        """Helper function for module-level deprecations using __getattr__

        Exemplar usage:

        .. code:: python

           # deprecated name -> (object to return, canonical path or empty string)
           _DEPRECATED_OBJECTS = {
               'deprecated_name': (object_to_return, 'fully_qualified_replacement_name'),
           }


           def __getattr__(name):
               if name not in _DEPRECATED_OBJECTS:
                   raise AttributeError(f'module {__name__!r} has no attribute {name!r}')

               from sphinx.deprecation import _deprecation_warning

               deprecated_object, canonical_name = _DEPRECATED_OBJECTS[name]
               _deprecation_warning(__name__, name, canonical_name, remove=(7, 0))
               return deprecated_object
        """

        if remove == (7, 0):
            warning_class: type[Warning] = RemovedInSphinx70Warning
        elif remove == (8, 0):
            warning_class = RemovedInSphinx80Warning
        else:
            raise RuntimeError(f'removal version {remove!r} is invalid!')

        qualified_name = f'{module}.{attribute}'
        if canonical_name:
            message = (f'The alias {qualified_name!r} is deprecated, '
                       f'use {canonical_name!r} instead.')
        else:
            message = f'{qualified_name!r} is deprecated.'

>       warnings.warn(message + " Check CHANGES for Sphinx API modifications.",
                      warning_class, stacklevel=3)
E       sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead. Check CHANGES for Sphinx API modifications.

attribute  = 'progress_message'
canonical_name = 'sphinx.http_date.epoch_to_rfc1123'
message    = "The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead."
module     = 'sphinx.util'
qualified_name = 'sphinx.util.progress_message'
remove     = (8, 0)
warning_class = <class 'sphinx.deprecation.RemovedInSphinx80Warning'>

/usr/lib/python3.8/site-packages/sphinx/deprecation.py:63: RemovedInSphinx80Warning
================================================================================== short test summary info ==================================================================================
ERROR tests/test_basic.py::test_simple_html[0] - sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead. Check CHANGES for Sphinx API modif...
ERROR tests/test_basic.py::test_simple_html[1] - sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead. Check CHANGES for Sphinx API modif...
ERROR tests/test_basic.py::test_simple_html[2] - sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead. Check CHANGES for Sphinx API modif...
================================================================================ 1 passed, 3 errors in 0.54s ================================================================================

Here is list of installed modules in build env

Package                       Version
----------------------------- --------
alabaster                     0.7.13
asttokens                     2.2.1
Babel                         2.12.1
backcall                      0.2.0
build                         0.10.0
charset-normalizer            3.1.0
decorator                     5.1.1
distro                        1.8.0
docutils                      0.19
editables                     0.4
exceptiongroup                1.1.1
executing                     1.2.0
gpg                           1.20.0
hatchling                     1.18.0
idna                          3.4
imagesize                     1.4.1
importlib-metadata            6.7.0
iniconfig                     2.0.0
installer                     0.7.0
ipython                       8.12.0
jedi                          0.18.2
Jinja2                        3.1.2
libcomps                      0.1.19
MarkupSafe                    2.1.2
matplotlib-inline             0.1.6
packaging                     23.1
parso                         0.8.3
pathspec                      0.11.1
pexpect                       4.8.0
pickleshare                   0.7.5
pluggy                        1.0.0
prompt-toolkit                3.0.38
ptyprocess                    0.7.0
pure-eval                     0.2.2
Pygments                      2.15.1
pyproject_hooks               1.0.0
pytest                        7.4.0
python-dateutil               2.8.2
pytz                          2023.2
requests                      2.31.0
setuptools                    68.0.0
six                           1.16.0
snowballstemmer               2.2.0
Sphinx                        6.2.1
sphinxcontrib-applehelp       1.0.4
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.5
stack-data                    0.6.2
tomli                         2.0.1
traitlets                     5.9.0
trove-classifiers             2023.7.6
typing_extensions             4.7.1
urllib3                       1.26.15
wcwidth                       0.2.6
wheel                         0.40.0
zipp                          3.15.0

`autodoc` support

The documentation for sphinx autodoc is rather sparse, and I am not 100% sure if an autodoc can be generated for other languages. Breathe does not have that feature. Still it would be nice if this can be integrated for cmake language as well.

Matlab documenter might be a good reference for this

[Meta] Gathering interest in a "Framework :: Sphinx :: Domain" PyPi classifier

I'm trying to get a Framework :: Sphinx :: Domain PyPi classifier approved to help with the Sphinx docs as well as keep the ecosystem more organize and I need to demonstrate interest by having 10 or more project maintainers submit comments about their desire to use the new classifier.

If the maintainer of this project thinks a Framework :: Sphinx :: Domain would be useful for helping people find the domain as well as help the greater Sphinx ecosystem, please leave a comment on sphinx-doc/sphinx#11562 expressing interest in using the classifier with a link to the package that you maintain to help with the approval process.

Once it gets approved I can come back and submit a PR to add it to the package metadata.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.