From 3fbba4cf4b9fbe3c9a87cafcaa436659b64c967d Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Tue, 29 Nov 2022 09:24:55 -0500 Subject: [PATCH 01/44] Bump version to 2.3.2.dev0 --- src/sphobjinv/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sphobjinv/version.py b/src/sphobjinv/version.py index c84d65a..c62427c 100644 --- a/src/sphobjinv/version.py +++ b/src/sphobjinv/version.py @@ -29,4 +29,4 @@ """ -__version__ = "2.3.1" +__version__ = "2.3.2.dev0" From 009c0180f6471655744574fe4724827f86bba510 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Wed, 14 Dec 2022 05:09:42 -0800 Subject: [PATCH 02/44] Restore 'name' arg in setup.py To wire into GitHub's dependencies feature. --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 9e34359..ad0c966 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,7 @@ def content_update(content, pattern, sub): setup( + name=NAME, long_description=readme(), long_description_content_type="text/x-rst", ) From 4a1e044c91688448264cf51cc22e50edef5fbdbc Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 25 Dec 2022 15:48:25 -0800 Subject: [PATCH 03/44] Fix GH build badge Per https://github.com/badges/shields/issues/8671 --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 146eaf6..6b2ed56 100644 --- a/README.rst +++ b/README.rst @@ -3,7 +3,7 @@ sphobjinv: Manipulate and inspect Sphinx objects.inv files **Current Development Version:** -.. image:: https://img.shields.io/github/workflow/status/bskinn/sphobjinv/ci-tests?logo=github +.. image:: https://img.shields.io/github/actions/workflow/status/bskinn/sphobjinv/ci_tests.yml?logo=github&branch=main :alt: GitHub Workflow Status :target: https://github.com/bskinn/sphobjinv/actions From 77bfc4d5266e0ff3baa644dce61d49371cee1703 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 25 Dec 2022 16:35:54 -0800 Subject: [PATCH 04/44] Create SECURITY.md --- SECURITY.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..8ad2b1f --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,16 @@ +# Security Policy + +## Supported Versions + +`sphobjinv` development currently does not use any maintenance branches, +so any security fixes will be released inline with the primary development +branch. + + +## Reporting a Vulnerability + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure, including +any updates on progress toward a fix on a vulnerability and +on accept/decline status of the vulnerability report. From fbb8847bee8c59ce369072937857839451e47c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Mon, 28 Aug 2023 17:06:44 +0200 Subject: [PATCH 05/44] Mention priority 0 and 2 --- doc/source/syntax.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/source/syntax.rst b/doc/source/syntax.rst index 1bb62e4..64e3714 100644 --- a/doc/source/syntax.rst +++ b/doc/source/syntax.rst @@ -133,7 +133,8 @@ the string ``zlib`` somewhere within it, but for consistency it should be exactl ``{priority}`` Flag for `placement in search results `__. Most will be ``1`` (standard priority) or - ``-1`` (omit from results) for documentation built by Sphinx. + ``-1`` (omit from results) for documentation built by Sphinx; + values of ``0`` (higher priority) or ``2`` (lower priority) may also occur. To note, as of Jan 2022 this value is **not** used by ``intersphinx``; it is only used internally within the search function of the static webpages From af4333e3bb4003a294e181c5d1b62ec70c41a461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Thu, 31 Aug 2023 11:33:00 +0200 Subject: [PATCH 06/44] Update ArchLinux link in index --- doc/source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/index.rst b/doc/source/index.rst index f285ca2..58b6d38 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -55,7 +55,7 @@ and package managers, including: * Alpine Linux: ``py3-sphobjinv`` (`info `__) - * Arch Linux: ``python-sphobjinv`` (`info `__) + * Arch Linux: ``python-sphobjinv`` (`info `__) * Fedora: ``python-sphobjinv`` (`info `__) From c67f9849add7d39b7920d710f7b2b3d1265032ab Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sat, 20 Apr 2024 09:34:39 -0400 Subject: [PATCH 07/44] Rename to README.md and start converting --- README.rst => README.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) rename README.rst => README.md (89%) diff --git a/README.rst b/README.md similarity index 89% rename from README.rst rename to README.md index 6b2ed56..9a2e175 100644 --- a/README.rst +++ b/README.md @@ -1,23 +1,16 @@ -sphobjinv: Manipulate and inspect Sphinx objects.inv files -========================================================== +## sphobjinv: Manipulate and inspect Sphinx objects.inv files -**Current Development Version:** -.. image:: https://img.shields.io/github/actions/workflow/status/bskinn/sphobjinv/ci_tests.yml?logo=github&branch=main - :alt: GitHub Workflow Status - :target: https://github.com/bskinn/sphobjinv/actions +#### Current Development Version -.. image:: https://codecov.io/gh/bskinn/sphobjinv/branch/main/graph/badge.svg - :target: https://codecov.io/gh/bskinn/sphobjinv +[![GitHub Workflow Status][workflow badge]][workflow link target] [![Codecov Coverage][codecov badge]][codecov target] -**Most Recent Stable Release:** +#### Most Recent Stable Release: -.. image:: https://img.shields.io/pypi/v/sphobjinv.svg?logo=pypi - :target: https://pypi.org/project/sphobjinv +[![PyPI Version][pypi badge]][pypi link target] ![Python Versions][python versions badge] -.. image:: https://img.shields.io/pypi/pyversions/sphobjinv.svg?logo=python +#### Info: -**Info:** .. image:: https://img.shields.io/readthedocs/sphobjinv/latest.svg :target: http://sphobjinv.readthedocs.io/en/latest/ @@ -205,3 +198,12 @@ under a `MIT License `__. See `LICENSE.txt `__ for full license terms. + + +[codecov badge]: https://codecov.io/gh/bskinn/sphobjinv/branch/main/graph/badge.svg +[codecov target]: https://codecov.io/gh/bskinn/sphobjinv +[pypi badge]: https://img.shields.io/pypi/v/sphobjinv.svg?logo=pypi] +[pypi link target]: https://pypi.org/project/sphobjinv +[python versions badge]: https://img.shields.io/pypi/pyversions/sphobjinv.svg?logo=python +[workflow badge]: https://img.shields.io/github/actions/workflow/status/bskinn/sphobjinv/ci_tests.yml?logo=github&branch=main +[workflow link target]: https://github.com/bskinn/sphobjinv/actions From 24e231ef9452dc3c85d121d86cce0348b4fca71e Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sat, 20 Apr 2024 11:57:32 -0400 Subject: [PATCH 08/44] Point setup.py to the new README.md Also update the content type --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ad0c966..a81837a 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ def readme(): - content = Path("README.rst").read_text(encoding="utf-8") + content = Path("README.md").read_text(encoding="utf-8") new_ver = version_override if version_override else __version__ @@ -38,5 +38,5 @@ def content_update(content, pattern, sub): setup( name=NAME, long_description=readme(), - long_description_content_type="text/x-rst", + long_description_content_type="text/markdown", ) From 981f3c50910224d397a78cb56818c23eb371e904 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Wed, 24 Apr 2024 23:37:43 -0400 Subject: [PATCH 09/44] Try multiline badge blocks --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9a2e175..8c4f906 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,13 @@ #### Current Development Version -[![GitHub Workflow Status][workflow badge]][workflow link target] [![Codecov Coverage][codecov badge]][codecov target] +[![GitHub Workflow Status][workflow badge]][workflow link target] +[![Codecov Coverage][codecov badge]][codecov target] #### Most Recent Stable Release: -[![PyPI Version][pypi badge]][pypi link target] ![Python Versions][python versions badge] +[![PyPI Version][pypi badge]][pypi link target] +![Python Versions][python versions badge] #### Info: From e4969e9d88fd77a67af9a635cb1495f568263c07 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Wed, 24 Apr 2024 23:59:14 -0400 Subject: [PATCH 10/44] Continue converting README --- README.md | 204 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 107 insertions(+), 97 deletions(-) diff --git a/README.md b/README.md index 8c4f906..8ee0aad 100644 --- a/README.md +++ b/README.md @@ -6,147 +6,146 @@ [![GitHub Workflow Status][workflow badge]][workflow link target] [![Codecov Coverage][codecov badge]][codecov target] -#### Most Recent Stable Release: +#### Most Recent Stable Release [![PyPI Version][pypi badge]][pypi link target] ![Python Versions][python versions badge] -#### Info: +#### Info +[![ReadTheDocs status][readthedocs badge]][readthedocs link target] +[![gitter chat][gitter badge]][gitter link target] -.. image:: https://img.shields.io/readthedocs/sphobjinv/latest.svg - :target: http://sphobjinv.readthedocs.io/en/latest/ - -.. image:: https://badges.gitter.im/sphobjinv/community.svg - :alt: Join the chat at https://gitter.im/sphobjinv/community - :target: https://gitter.im/sphobjinv/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge - -.. image:: https://img.shields.io/github/license/mashape/apistatus.svg - :target: https://github.com/bskinn/sphobjinv/blob/stable/LICENSE.txt - -.. image:: https://img.shields.io/badge/code%20style-black-000000.svg - :target: https://github.com/psf/black - -.. image:: https://pepy.tech/badge/sphobjinv/month - :target: https://pepy.tech/project/sphobjinv?versions=2.0.1&versions=2.1&versions=2.2.2&versions=2.3&versions=2.3.1 +[![MIT License][license badge]][license link target] +[![black formatted][black badge]][black link target] +[![PePY stats][pepy badge]][pepy link target] ---- -**Using Sphinx?** +### Using Sphinx? -**Having trouble writing cross-references?** +#### Having trouble writing cross-references? -``sphobjinv`` (short for '**sph**\ inx **obj**\ ects.\ **inv**') can help! +`sphobjinv` (short for '**sph**inx **obj**ects.**inv**') can help! The syntax required for a functional Sphinx cross-reference is highly non-obvious in many cases. Sometimes Sphinx can guess correctly what you mean, but it's pretty hit-or-miss. The best approach is to provide Sphinx with a completely specified cross-reference, and that's where -``sphobjinv`` comes in. +`sphobjinv` comes in. -After a ``pip install sphobjinv`` (or ``pipx install sphobjinv``), find the +After a `pip install sphobjinv` (or `pipx install sphobjinv`), find the documentation set you want to cross-reference into, and pass it to -``sphobjinv suggest``. +`sphobjinv suggest`. -For internal cross-references, locate ``objects.inv`` within ``build/html``:: +For internal cross-references, locate `objects.inv` within `build/html`: - $ sphobjinv suggest doc/build/html/objects.inv as_rst -st 58 + - ------------------------------------------------ +```none +$ sphobjinv suggest doc/build/html/objects.inv as_rst -st 58 - Cannot infer intersphinx_mapping from a local objects.inv. +------------------------------------------------ - ------------------------------------------------ +Cannot infer intersphinx_mapping from a local objects.inv. - Project: sphobjinv - Version: 2.3 +------------------------------------------------ - 220 objects in inventory. +Project: sphobjinv +Version: 2.3 - ------------------------------------------------ +220 objects in inventory. - 11 results found at/above current threshold of 58. +------------------------------------------------ +11 results found at/above current threshold of 58. - Name Score - --------------------------------------------------- ------- - :py:property:`sphobjinv.data.SuperDataObj.as_rst` 60 - :py:class:`sphobjinv.cli.parser.PrsConst` 59 - :py:class:`sphobjinv.data.DataFields` 59 - :py:class:`sphobjinv.data.DataObjBytes` 59 - :py:class:`sphobjinv.data.DataObjStr` 59 - :py:class:`sphobjinv.data.SuperDataObj` 59 - :py:class:`sphobjinv.enum.HeaderFields` 59 - :py:class:`sphobjinv.enum.SourceTypes` 59 - :py:function:`sphobjinv.fileops.writebytes` 59 - :py:function:`sphobjinv.fileops.writejson` 59 - :py:class:`sphobjinv.inventory.Inventory` 59 -.. end shell command + Name Score +--------------------------------------------------- ------- +:py:property:`sphobjinv.data.SuperDataObj.as_rst` 60 +:py:class:`sphobjinv.cli.parser.PrsConst` 59 +:py:class:`sphobjinv.data.DataFields` 59 +:py:class:`sphobjinv.data.DataObjBytes` 59 +:py:class:`sphobjinv.data.DataObjStr` 59 +:py:class:`sphobjinv.data.SuperDataObj` 59 +:py:class:`sphobjinv.enum.HeaderFields` 59 +:py:class:`sphobjinv.enum.SourceTypes` 59 +:py:function:`sphobjinv.fileops.writebytes` 59 +:py:function:`sphobjinv.fileops.writejson` 59 +:py:class:`sphobjinv.inventory.Inventory` 59 +``` -The ``-s`` argument in the above shell command indicates to print the -``fuzzywuzzy`` match score along with each search result, and ``-t 50`` + + + +The `-s` argument in the above shell command indicates to print the +`fuzzywuzzy` match score along with each search result, and `-t 50` changes the reporting threshold for the match score. -For external references, just find the API documentation wherever it lives on -the web, and pass ``sphobjinv suggest`` a URL from within the documentation set -with the ``--url/-u`` flag. For example, say I need to know how to -cross-reference the ``linspace`` function from numpy (see -`here `__):: +For external references, find the API documentation wherever it lives on +the web, and pass `sphobjinv suggest` a URL from within the documentation set +with the `--url/-u` flag. For example, say I need to know how to +cross-reference the `linspace` function from numpy (see +[here][numpy linspace]): - $ sphobjinv suggest https://numpy.org/doc/1.23/reference/index.html linspace -su + - Attempting https://numpy.org/doc/1.23/reference/index.html ... - ... no recognized inventory. - Attempting "https://numpy.org/doc/1.23/reference/index.html/objects.inv" ... - ... HTTP error: 404 Not Found. - Attempting "https://numpy.org/doc/1.23/reference/objects.inv" ... - ... HTTP error: 404 Not Found. - Attempting "https://numpy.org/doc/1.23/objects.inv" ... - ... inventory found. +```none +$ sphobjinv suggest https://numpy.org/doc/1.23/reference/index.html linspace -su - ------------------------------------------------ +Attempting https://numpy.org/doc/1.23/reference/index.html ... + ... no recognized inventory. +Attempting "https://numpy.org/doc/1.23/reference/index.html/objects.inv" ... + ... HTTP error: 404 Not Found. +Attempting "https://numpy.org/doc/1.23/reference/objects.inv" ... + ... HTTP error: 404 Not Found. +Attempting "https://numpy.org/doc/1.23/objects.inv" ... + ... inventory found. - The intersphinx_mapping for this docset is LIKELY: +------------------------------------------------ - (https://numpy.org/doc/1.23/, None) +The intersphinx_mapping for this docset is LIKELY: - ------------------------------------------------ + (https://numpy.org/doc/1.23/, None) - Project: NumPy - Version: 1.23 +------------------------------------------------ - 8074 objects in inventory. +Project: NumPy +Version: 1.23 - ------------------------------------------------ +8074 objects in inventory. - 8 results found at/above current threshold of 75. +------------------------------------------------ +8 results found at/above current threshold of 75. - Name Score - -------------------------------------------------------------- ------- - :py:function:`numpy.linspace` 90 - :py:method:`numpy.polynomial.chebyshev.Chebyshev.linspace` 90 - :py:method:`numpy.polynomial.hermite.Hermite.linspace` 90 - :py:method:`numpy.polynomial.hermite_e.HermiteE.linspace` 90 - :py:method:`numpy.polynomial.laguerre.Laguerre.linspace` 90 - :py:method:`numpy.polynomial.legendre.Legendre.linspace` 90 - :py:method:`numpy.polynomial.polynomial.Polynomial.linspace` 90 - :std:doc:`reference/generated/numpy.linspace` 90 -.. end shell command + Name Score +-------------------------------------------------------------- ------- +:py:function:`numpy.linspace` 90 +:py:method:`numpy.polynomial.chebyshev.Chebyshev.linspace` 90 +:py:method:`numpy.polynomial.hermite.Hermite.linspace` 90 +:py:method:`numpy.polynomial.hermite_e.HermiteE.linspace` 90 +:py:method:`numpy.polynomial.laguerre.Laguerre.linspace` 90 +:py:method:`numpy.polynomial.legendre.Legendre.linspace` 90 +:py:method:`numpy.polynomial.polynomial.Polynomial.linspace` 90 +:std:doc:`reference/generated/numpy.linspace` 90 +``` + + -**NOTE** that the results from ``sphobjinv suggest`` are printed using the +**NOTE** that the results from `sphobjinv suggest` are printed using the longer *block directives*, whereas cross-references must be composed using the -*inline directives*. Thus, the above ``linspace()`` function must be -cross-referenced as ``:func:`numpy.linspace```, **not** -``:function:`numpy.linspace```. +*inline directives*. Thus, the above `linspace()` function must be +cross-referenced as ``` :func:`numpy.linspace` ``` , **not** +``` :function:`numpy.linspace` ```. **Need to edit an inventory after it's created, or compose one from scratch?** -``sphobjinv`` can help with that, too. +`sphobjinv` can help with that, too. -``objects.inv`` files can be decompressed to plaintext at the commandline:: +`objects.inv` files can be decompressed to plaintext at the commandline:: $ sphobjinv convert plain -o doc/build/html/objects.inv doc/scratch/ Conversion completed. @@ -154,12 +153,12 @@ cross-referenced as ``:func:`numpy.linspace```, **not** .. end shell command -JSON output is supported (``sphobjinv convert json ...``), and +JSON output is supported (`sphobjinv convert json ...`), and inventories can be re-compressed to the -partially-zlib-compressed form that ``intersphinx`` reads -(``sphobjinv convert zlib ...``). +partially-zlib-compressed form that `intersphinx` reads +(`sphobjinv convert zlib ...`). -Alternatively, ``sphobjinv`` exposes an API to enable automation of +Alternatively, `sphobjinv` exposes an API to enable automation of inventory creation/modification:: >>> import sphobjinv as soi @@ -174,7 +173,7 @@ inventory creation/modification:: DataObjStr(name='sphobjinv.cli.convert', domain='py', role='module', priority='0', uri='cli/implementation/convert.html#module-$', dispname='-') The API also enables straightforward re-export of an inventory, -for subsequent use with ``intersphinx`` cross-references. +for subsequent use with `intersphinx` cross-references. See `the docs `__ for more details. @@ -185,7 +184,7 @@ Full documentation is hosted at `Read The Docs `__. Available on `PyPI `__ -(``pip install sphobjinv``). +(`pip install sphobjinv`). Source on `GitHub `__. Bug reports and feature requests are welcomed at the @@ -193,19 +192,30 @@ and feature requests are welcomed at the Copyright (c) Brian Skinn 2016-2022 -The ``sphobjinv`` documentation (including docstrings and README) is licensed +The `sphobjinv` documentation (including docstrings and README) is licensed under a `Creative Commons Attribution 4.0 International License `__ -(CC-BY). The ``sphobjinv`` codebase is released under the +(CC-BY). The `sphobjinv` codebase is released under the `MIT License `__. See `LICENSE.txt `__ for full license terms. +[black badge]: https://img.shields.io/badge/code%20style-black-000000.svg +[black link target]: https://github.com/psf/black [codecov badge]: https://codecov.io/gh/bskinn/sphobjinv/branch/main/graph/badge.svg [codecov target]: https://codecov.io/gh/bskinn/sphobjinv +[gitter badge]: https://badges.gitter.im/sphobjinv/community.svg +[gitter link target]: https://gitter.im/sphobjinv/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge +[license badge]: https://img.shields.io/github/license/mashape/apistatus.svg +[license link target]: https://github.com/bskinn/sphobjinv/blob/stable/LICENSE.txt +[numpy linspace]: https://numpy.org/doc/1.23/reference/generated/numpy.linspace.html +[pepy badge]: https://pepy.tech/badge/sphobjinv/month +[pepy link target]: https://pepy.tech/project/sphobjinv?versions=2.0.1&versions=2.1&versions=2.2.2&versions=2.3&versions=2.3.1 [pypi badge]: https://img.shields.io/pypi/v/sphobjinv.svg?logo=pypi] [pypi link target]: https://pypi.org/project/sphobjinv [python versions badge]: https://img.shields.io/pypi/pyversions/sphobjinv.svg?logo=python +[readthedocs badge]: https://img.shields.io/readthedocs/sphobjinv/latest.svg +[readthedocs link target]: http://sphobjinv.readthedocs.io/en/latest/ [workflow badge]: https://img.shields.io/github/actions/workflow/status/bskinn/sphobjinv/ci_tests.yml?logo=github&branch=main [workflow link target]: https://github.com/bskinn/sphobjinv/actions From 0c7202e13037360cb136775a7555ab7799d1def5 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 5 May 2024 23:48:19 -0400 Subject: [PATCH 11/44] Finish converting README --- README.md | 75 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 8ee0aad..d92fd9f 100644 --- a/README.md +++ b/README.md @@ -145,13 +145,17 @@ cross-referenced as ``` :func:`numpy.linspace` ``` , **not** `sphobjinv` can help with that, too. -`objects.inv` files can be decompressed to plaintext at the commandline:: +`objects.inv` files can be decompressed to plaintext at the commandline: - $ sphobjinv convert plain -o doc/build/html/objects.inv doc/scratch/ - Conversion completed. - '...objects.inv' converted to '...objects.txt' (plain). + -.. end shell command +```none +$ sphobjinv convert plain -o doc/build/html/objects.inv doc/scratch/ +Conversion completed. +'...objects.inv' converted to '...objects.txt' (plain). +``` + + JSON output is supported (`sphobjinv convert json ...`), and inventories can be re-compressed to the @@ -159,56 +163,55 @@ partially-zlib-compressed form that `intersphinx` reads (`sphobjinv convert zlib ...`). Alternatively, `sphobjinv` exposes an API to enable automation of -inventory creation/modification:: - - >>> import sphobjinv as soi - >>> inv = soi.Inventory('doc/build/html/objects.inv') - >>> print(inv) - - >>> inv.project - 'sphobjinv' - >>> inv.version - '2.3' - >>> inv.objects[0] - DataObjStr(name='sphobjinv.cli.convert', domain='py', role='module', priority='0', uri='cli/implementation/convert.html#module-$', dispname='-') - -The API also enables straightforward re-export of an inventory, -for subsequent use with `intersphinx` cross-references. -See `the docs `__ -for more details. +inventory creation/modification: + +```python +>>> import sphobjinv as soi +>>> inv = soi.Inventory('doc/build/html/objects.inv') +>>> print(inv) + +>>> inv.project +'sphobjinv' +>>> inv.version +'2.3' +>>> inv.objects[0] +DataObjStr(name='sphobjinv.cli.convert', domain='py', role='module', priority='0', uri='cli/implementation/convert.html#module-$', dispname='-') +``` + +The API also enables straightforward re-export of an inventory, for subsequent +use with `intersphinx` cross-references. See [the docs][soi docs inv export] for +more details. ---- -Full documentation is hosted at -`Read The Docs `__. +Full documentation is hosted at [Read The Docs][readthedocs link target]. -Available on `PyPI `__ -(`pip install sphobjinv`). +Available on [PyPI][pypi link target] (`pip install sphobjinv`). -Source on `GitHub `__. Bug reports -and feature requests are welcomed at the -`Issues `__ page there. +Source on [GitHub][github repo]. Bug reports and feature requests are welcomed +at the [Issues][github issue tracker] page there. Copyright (c) Brian Skinn 2016-2022 The `sphobjinv` documentation (including docstrings and README) is licensed -under a -`Creative Commons Attribution 4.0 International License `__ -(CC-BY). The `sphobjinv` codebase is released under the -`MIT License `__. See -`LICENSE.txt `__ for -full license terms. +under a [Creative Commons Attribution 4.0 International License][cc-by 4.0] +(CC-BY). The `sphobjinv` codebase is released under the [MIT License]. See +[`LICENSE.txt`][license link target] for full license terms. [black badge]: https://img.shields.io/badge/code%20style-black-000000.svg [black link target]: https://github.com/psf/black +[cc-by 4.0]: http://creativecommons.org/licenses/by/4.0/ [codecov badge]: https://codecov.io/gh/bskinn/sphobjinv/branch/main/graph/badge.svg [codecov target]: https://codecov.io/gh/bskinn/sphobjinv +[soi docs inv export]: http://sphobjinv.readthedocs.io/en/latest/api_usage.html#exporting-an-inventory +[github issue tracker]: https://github.com/bskinn/sphobjinv/issues +[github repo]: https://github.com/bskinn/sphobjinv [gitter badge]: https://badges.gitter.im/sphobjinv/community.svg [gitter link target]: https://gitter.im/sphobjinv/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge [license badge]: https://img.shields.io/github/license/mashape/apistatus.svg [license link target]: https://github.com/bskinn/sphobjinv/blob/stable/LICENSE.txt +[mit license]: https://opensource.org/licenses/MIT [numpy linspace]: https://numpy.org/doc/1.23/reference/generated/numpy.linspace.html [pepy badge]: https://pepy.tech/badge/sphobjinv/month [pepy link target]: https://pepy.tech/project/sphobjinv?versions=2.0.1&versions=2.1&versions=2.2.2&versions=2.3&versions=2.3.1 From b35f98cbf94820e42974c06832fe475bf3ff16f7 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 5 May 2024 23:48:33 -0400 Subject: [PATCH 12/44] Fix flake8 'qualified name' complaint Have to use full paths for single modules now, apparently. See: https://github.com/PyCQA/bandit/discussions/725#discussioncomment-8619959 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 8e13b51..9e562d2 100644 --- a/tox.ini +++ b/tox.ini @@ -86,7 +86,7 @@ basepython= skip_install=True deps=-rrequirements-flake8.txt commands= - flake8 conftest.py src tests + flake8 ./conftest.py src tests [testenv:flake8-noqa] skip_install=True From 3b5ebb7ba30730389a1a60abc923d034ee227b4a Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 6 May 2024 09:14:56 -0400 Subject: [PATCH 13/44] Bump GHA workflow versions --- .github/workflows/ci_tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 7565e8e..4843fa6 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -10,10 +10,10 @@ jobs: steps: - name: Check out repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' cache: 'pip' @@ -68,10 +68,10 @@ jobs: steps: - name: Check out repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} cache: 'pip' From df624402735801ab1be14efa0d94ca7d779be576 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 6 May 2024 09:30:31 -0400 Subject: [PATCH 14/44] Ignore flake8 A005 Yep, we're shadowing submodules. We'll fix it eventually... --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 9e562d2..e109285 100644 --- a/tox.ini +++ b/tox.ini @@ -132,7 +132,8 @@ exclude = src/sphobjinv/_vendored # W503: black formats binary operators to start of line -ignore = W503 +# A005: Submodules are going to be shadowing builtins for the moment +ignore = W503,A005 show_source = True max_line_length = 88 format = %(cyan)s%(path)s%(reset)s:%(yellow)s%(row)d%(reset)s:%(green)s%(col)d%(reset)s %(red)s(%(code)s)%(reset)s %(text)s From 44116a3b1155e55c3f4ca151c35ecc821d380e81 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 6 May 2024 09:39:37 -0400 Subject: [PATCH 15/44] Fix some external URLs --- doc/source/conf.py | 6 +++--- doc/source/customfile.rst | 4 ++-- doc/source/index.rst | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 419bc1e..14e0cc9 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -123,11 +123,11 @@ .. _license_txt: https://github.com/bskinn/sphobjinv/blob/main/LICENSE.txt -.. _MIT License: https://opensource.org/licenses/MIT +.. _MIT License: https://opensource.org/license/MIT .. |CC BY 4.0| replace:: CC BY 4.0 International License -.. _CC BY 4.0: http://creativecommons.org/licenses/by/4.0/ +.. _CC BY 4.0: https://creativecommons.org/licenses/by/4.0/ .. |fuzzywuzzy| replace:: ``fuzzywuzzy`` @@ -135,7 +135,7 @@ .. |pipx| replace:: ``pipx`` -.. _pipx: https://pypa.github.io/pipx/ +.. _pipx: https://pipx.pypa.io/stable/ .. |python-Levenshtein| replace:: ``python-Levenshtein`` diff --git a/doc/source/customfile.rst b/doc/source/customfile.rst index 24871e4..64d13fe 100644 --- a/doc/source/customfile.rst +++ b/doc/source/customfile.rst @@ -71,10 +71,10 @@ can be found at the GitHub repo The `role` values here must be the **full** role names ("`block directives`"), described as the "directives" in the `Sphinx documentation for - domains `__, + domains `__, and not the abbreviated forms ("`inline directives`") `used when constructing cross-references - `__. + `__. Thus, for example, a :class:`~sphobjinv.data.DataObjStr` corresponding to a method on a class should be constructed with diff --git a/doc/source/index.rst b/doc/source/index.rst index 58b6d38..1f71b29 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -73,7 +73,7 @@ and package managers, including: * pkgsrc: ``textproc/py-sphobjinv`` (`info `__) - * spack: ``py-sphobjinv`` (`info `__) + * spack: ``py-sphobjinv`` (`info `__) |soi| is configured for use both as a From ff726c4f6f3bed1a4e3ef76b7fd3830ada11742a Mon Sep 17 00:00:00 2001 From: Christian von Schultz Date: Wed, 8 May 2024 09:41:00 +0200 Subject: [PATCH 16/44] Add Python 3.12, retire Python 3.7 Assuming we want to support four active Python versions, retire Python 3.7, which is end-of-life since nearly a year ago, and add support for Python 3.12. New Python versions are released once a year, and make for a good reason to make a release to PyPI, even if there haven't been any major changes to the code base. Not making a release for a year results in warnings such as "An important project maintenance signal to consider for sphobjinv is that it hasn't seen any new versions released to PyPI in the past 12 months, and could be considered as a discontinued project, or that which receives low attention from its maintainers" on https://snyk.io/advisor/python/sphobjinv, which companies use to determine if a project is an acceptable dependency. --- .github/workflows/ci_tests.yml | 2 +- CHANGELOG.md | 9 +++++++++ CONTRIBUTING.md | 8 ++++---- azure-pipelines.yml | 8 ++++---- setup.cfg | 4 ++-- tox.ini | 8 ++++---- 6 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 7565e8e..c11db3d 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -63,7 +63,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.7', '3.8', '3.9', '3.11'] + python: ['3.8', '3.9', '3.11', '3.12'] if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f4c74c..3c7a01d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project strives to adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +### Unreleased + +#### Added + + * The project now supports Python 3.12. + +#### Removed + + * Removed support for Python 3.7, which is end-of-life. ### [2.3.1] - 2022-11-29 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b2a915c..6e9297a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,7 +38,7 @@ $ git clone https://github.com/{you}/sphobjinv ``` Then, create a virtual environment for the project, in whatever location you -prefer. Any Python interpreter 3.7+ *should* work fine. +prefer. Any Python interpreter 3.8+ *should* work fine. I prefer to use `virtualenv` and create in `./env`: @@ -153,8 +153,8 @@ Note that while [`tox`](https://tox.wiki/en/latest/) *is* configured for the project, it is **not** set up to be an everyday test runner. Instead, it's used to execute an extensive matrix of test environments checking for the compatibility of different Python and dependency versions. You can run it if you -want, but you'll need working versions of all of Python 3.7 through 3.11 -installed and on `PATH` as `python3.7`, `python3.8`, etc. The nonlocal test +want, but you'll need working versions of all of Python 3.8 through 3.12 +installed and on `PATH` as `python3.8`, `python3.9`, etc. The nonlocal test suite is run for each `tox` environment, so it's best to use at most two parallel sub-processes to avoid oversaturating your network bandwidth; e.g.: @@ -250,7 +250,7 @@ with `make linkcheck`. Both Github Actions and Azure Pipelines are set up for the project, and should run on any forks of the repository. -Github Actions runs the test suite on Linux for Python 3.7 through 3.11, as well +Github Actions runs the test suite on Linux for Python 3.8 through 3.12, as well as the `flake8` lints and the Sphinx doctests and link-validity testing, and is configured to run on all commits. The workflow can be skipped per-commit by including `[skip ci]` in the commit message. diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d3acc29..1d57f97 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -82,8 +82,6 @@ stages: - template: azure-coretest.yml parameters: pythons: - py37: - spec: '3.7' py38: spec: '3.8' py39: @@ -92,6 +90,8 @@ stages: spec: '3.10' py311: spec: '3.11' + py312: + spec: '3.12' pypy3: spec: 'pypy3' platforms: [linux] @@ -99,8 +99,6 @@ stages: - template: azure-coretest.yml parameters: pythons: - py37: - spec: '3.7' py38: spec: '3.8' py39: @@ -109,6 +107,8 @@ stages: spec: '3.10' py311: spec: '3.11' + py312: + spec: '3.12' platforms: [windows, macOs] - template: azure-sdisttest.yml diff --git a/setup.cfg b/setup.cfg index 4d0049d..603d872 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,11 +25,11 @@ classifiers = Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Topic :: Documentation Topic :: Documentation :: Sphinx Topic :: Software Development @@ -44,7 +44,7 @@ install_requires = certifi jsonschema>=3.0 -python_requires = >=3.6 +python_requires = >=3.8 packages = find: package_dir = =src diff --git a/tox.ini b/tox.ini index 8e13b51..b4a07f0 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ minversion=2.0 isolated_build=True envlist= # Test all Python versions on latest lib versions - py3{7,8,9,10,11}-sphx_latest-attrs_latest-jsch_latest + py3{8,9,10,11,12}-sphx_latest-attrs_latest-jsch_latest # Test dev Python version on current in-repo dev lib versions py310-sphx_dev-attrs_dev-jsch_dev # Scan across Sphinx versions @@ -15,9 +15,9 @@ envlist= # Scan jsonschema versions py310-sphx_latest-attrs_latest-jsch_{3_0,3_x,4_0,4_8,dev} # Earliest supported Python and lib versions all together - py37-sphx_1_6_x-attrs_19_2-jsch_3_0 + py38-sphx_1_6_x-attrs_19_2-jsch_3_0 # Spot matrix of early Python, Sphinx, attrs versions - py3{7,8,9}-sphx_{1,2}_x-attrs_{19,20}_2-jsch_latest + py3{8,9}-sphx_{1,2}_x-attrs_{19,20}_2-jsch_latest # Test the specific Sphinx threshold cases where behavior changed py310-sphx_{2_3_1,2_4_0,3_2_1,3_3_0,3_4_0}-attrs_latest-jsch_latest # Simple 'does the sdist install' check @@ -76,11 +76,11 @@ deps= [testenv:linux] platform=linux basepython= + py312: python3.12 py311: python3.11 py310: python3.10 py39: python3.9 py38: python3.8 - py37: python3.7 [testenv:flake8] skip_install=True From b80cdf1708621a5c44500cb6a295b20a7d221d93 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Wed, 8 May 2024 23:20:18 -0400 Subject: [PATCH 17/44] Update test_readme.py Change the README filename and update the regex --- tests/test_readme.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_readme.py b/tests/test_readme.py index 4b5086f..27d7e1a 100644 --- a/tests/test_readme.py +++ b/tests/test_readme.py @@ -50,9 +50,10 @@ p_shell = re.compile( r""" - \n\s+[$](?P.*) # Entered command + \n```(\w+)? + \n\s*[$](?P.*) # Entered command (?P(\n.*)+?) # Line(s) of output - (?=\n\.\.) # Lookahead for explicit shell block endpoint + (?=\n```) # Lookahead for explicit shell block endpoint """, re.X, ) @@ -85,7 +86,7 @@ def test_readme_shell_cmds(ensure_doc_scratch, is_win, check): if is_win and sys.version_info < (3, 9): # pragma: no cover pytest.skip("Windows mishandles stdout/stderr for Python < 3.9") - text = Path("README.rst").read_text() + text = Path("README.md").read_text() chk = dt.OutputChecker() From 254ccbb0a2f842c5b73db35bd50ea30ffa92adef Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Wed, 8 May 2024 23:20:42 -0400 Subject: [PATCH 18/44] Remove unneeded shell text block markers --- README.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/README.md b/README.md index d92fd9f..078712e 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,6 @@ documentation set you want to cross-reference into, and pass it to For internal cross-references, locate `objects.inv` within `build/html`: - - ```none $ sphobjinv suggest doc/build/html/objects.inv as_rst -st 58 @@ -76,9 +74,6 @@ Version: 2.3 :py:class:`sphobjinv.inventory.Inventory` 59 ``` - - - The `-s` argument in the above shell command indicates to print the `fuzzywuzzy` match score along with each search result, and `-t 50` changes the reporting threshold for the match score. @@ -89,8 +84,6 @@ with the `--url/-u` flag. For example, say I need to know how to cross-reference the `linspace` function from numpy (see [here][numpy linspace]): - - ```none $ sphobjinv suggest https://numpy.org/doc/1.23/reference/index.html linspace -su @@ -133,8 +126,6 @@ Version: 1.23 :std:doc:`reference/generated/numpy.linspace` 90 ``` - - **NOTE** that the results from `sphobjinv suggest` are printed using the longer *block directives*, whereas cross-references must be composed using the *inline directives*. Thus, the above `linspace()` function must be @@ -147,16 +138,12 @@ cross-referenced as ``` :func:`numpy.linspace` ``` , **not** `objects.inv` files can be decompressed to plaintext at the commandline: - - ```none $ sphobjinv convert plain -o doc/build/html/objects.inv doc/scratch/ Conversion completed. '...objects.inv' converted to '...objects.txt' (plain). ``` - - JSON output is supported (`sphobjinv convert json ...`), and inventories can be re-compressed to the partially-zlib-compressed form that `intersphinx` reads From fa8afcb07789b942de16c0ade216791443fdfec9 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Wed, 8 May 2024 23:50:00 -0400 Subject: [PATCH 19/44] Update CHANGELOG --- CHANGELOG.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f4c74c..d45c72f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,25 @@ and this project strives to adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +### Unreleased + +#### Tests + + * Update test machinery for the shell examples in the README, downstream of + the conversion to Markdown ([#289]). + +#### Administrative + + * Bump `checkout` and `setup-python` GitHub Actions versions ([#289]). + + * Convert README from reST to Markdown ([#289], fixes [#287]). + + * Fix some broken/redirecting docs links ([#289]). + + * Adjust `flake8` configuration to account for some new lint warnings/errors + ([#289]). + + ### [2.3.1] - 2022-11-29 #### Changed @@ -534,3 +553,7 @@ and this project strives to adhere to * Programmatic conversion via API is available, but potentially buggy due to poor segregation of cmdline behaviors. This is to be fixed. + + +[#287]: https://github.com/bskinn/sphobjinv/issues/287 +[#289]: https://github.com/bskinn/sphobjinv/pull/289 From fc42f22d8b501ca0536ca97e070dbe59ccd7013d Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 21:35:27 -0400 Subject: [PATCH 20/44] Loosen pagination test --- tests/test_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index b1d5748..c679d8e 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -399,7 +399,7 @@ def test_cli_suggest_paginated(self, res_cmp, run_cmdline_test): """Confirm pagination works as expected for a controlled example.""" with stdio_mgr("\n" * 5) as (in_, out_, err_): run_cmdline_test(["suggest", res_cmp, "function", "-sapt30"]) - assert 5 == out_.getvalue().count("Press Enter to continue") + assert 1 < out_.getvalue().count("Press Enter to continue") class TestFail: From 82e74773a166a3afce66dbfc16020d31405a71e5 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 22:23:58 -0400 Subject: [PATCH 21/44] Update links out to Sphinx docs --- doc/source/index.rst | 2 +- doc/source/syntax.rst | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/source/index.rst b/doc/source/index.rst index 1f71b29..967f2cf 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -11,7 +11,7 @@ Welcome to sphobjinv! When documentation is built using, e.g., Sphinx's :obj:`~sphinx.builders.html.StandaloneHTMLBuilder`, an inventory of the named objects in the documentation set `is dumped -`__ +`__ to a file called |objects.inv| in the html build directory. (One common location is, |cour|\ doc/build/html\ |/cour|, though the exact location will vary depending on the details of how Sphinx is configured.) This file is read by |isphx| when diff --git a/doc/source/syntax.rst b/doc/source/syntax.rst index 64e3714..99f57d6 100644 --- a/doc/source/syntax.rst +++ b/doc/source/syntax.rst @@ -27,7 +27,7 @@ data line. ---- **The first line** `must be exactly -`__: +`__: .. code-block:: none @@ -36,7 +36,7 @@ data line. ---- **The second and third lines** `must obey -`__ +`__ the template: .. code-block:: none @@ -56,7 +56,7 @@ the |isphx| cross-references: ---- **The fourth line** `must contain -`__ +`__ the string ``zlib`` somewhere within it, but for consistency it should be exactly: .. code-block:: none @@ -67,7 +67,7 @@ the string ``zlib`` somewhere within it, but for consistency it should be exactl **All remaining lines** of the file are the objects data, each laid out in the `following syntax -`__: +`__: .. code-block:: none @@ -132,7 +132,7 @@ the string ``zlib`` somewhere within it, but for consistency it should be exactl ``{priority}`` Flag for `placement in search results - `__. Most will be ``1`` (standard priority) or + `__. Most will be ``1`` (standard priority) or ``-1`` (omit from results) for documentation built by Sphinx; values of ``0`` (higher priority) or ``2`` (lower priority) may also occur. @@ -217,11 +217,11 @@ size of the inventory file: `__," the portion following the ``#`` symbol) and the tail of the anchor is identical to |{name}|_, that tail is `replaced - `__ + `__ with ``$``. |br| |br| #. If |{dispname}|_ is identical to |{name}|_, it is `stored - `__ + `__ as ``-``. Thus, a standard |isphx| reference to this method would take the form: @@ -271,11 +271,11 @@ as in :obj:`This is join! `: .. |prio_js_search| replace:: here -.. _prio_js_search: https://github.com/sphinx-doc/sphinx/blob/2f60b44999d7e610d932529784f082fc1c6af989/sphinx/themes/basic/static/searchtools.js#L28-L47 +.. _prio_js_search: https://github.com/sphinx-doc/sphinx/blob/ac3f74a3e0fbb326f73989a16dfa369e072064ca/sphinx/themes/basic/static/searchtools.js#L28-L46 .. |prio_py_search| replace:: here -.. _prio_py_search: https://github.com/sphinx-doc/sphinx/blob/2f60b44999d7e610d932529784f082fc1c6af989/sphinx/search/__init__.py#L332-L333 +.. _prio_py_search: https://github.com/sphinx-doc/sphinx/blob/ac3f74a3e0fbb326f73989a16dfa369e072064ca/sphinx/search/__init__.py#L344-L345 .. |sphinx_uri_issue| replace:: sphinx-doc/sphinx#7096 @@ -297,4 +297,4 @@ as in :obj:`This is join! `: .. _rst-directive-option: https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#directive-rst-directive-option -.. _parsing regex: https://github.com/sphinx-doc/sphinx/blob/2f60b44999d7e610d932529784f082fc1c6af989/sphinx/util/inventory.py#L115-L116 +.. _parsing regex: https://github.com/sphinx-doc/sphinx/blob/ac3f74a3e0fbb326f73989a16dfa369e072064ca/sphinx/util/inventory.py#L134-L135 From 7de5ce12786547b1147bf94f8bd26cf31fab8b37 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 22:34:30 -0400 Subject: [PATCH 22/44] Remove broken distro refs from index.rst --- doc/source/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/index.rst b/doc/source/index.rst index 967f2cf..ad8f24a 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -55,7 +55,7 @@ and package managers, including: * Alpine Linux: ``py3-sphobjinv`` (`info `__) - * Arch Linux: ``python-sphobjinv`` (`info `__) + * Arch Linux: ``python-sphobjinv`` * Fedora: ``python-sphobjinv`` (`info `__) @@ -73,7 +73,7 @@ and package managers, including: * pkgsrc: ``textproc/py-sphobjinv`` (`info `__) - * spack: ``py-sphobjinv`` (`info `__) + * spack: ``py-sphobjinv`` |soi| is configured for use both as a From a1a48594db4f43e6bb58002b37026b63aab68efd Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 22:34:49 -0400 Subject: [PATCH 23/44] Update Python ref on customfile.rst --- doc/source/customfile.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/customfile.rst b/doc/source/customfile.rst index 64d13fe..3765cc5 100644 --- a/doc/source/customfile.rst +++ b/doc/source/customfile.rst @@ -143,7 +143,7 @@ can be found at the GitHub repo intersphinx_mapping = { # Standard reference to web docs, with web objects.inv - 'python': ('https://docs.python.org/3.5', None), + 'python': ('https://docs.python.org/3.12', None), # Django puts its objects.inv file in a non-standard location 'django': ('https://docs.djangoproject.com/en/dev/', 'https://docs.djangoproject.com/en/dev/_objects/'), From 513c3b7f4f86c3860aab97f893602bdeb66099e9 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 22:38:32 -0400 Subject: [PATCH 24/44] Update README shell examples --- README.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 078712e..95c7409 100644 --- a/README.md +++ b/README.md @@ -85,35 +85,34 @@ cross-reference the `linspace` function from numpy (see [here][numpy linspace]): ```none -$ sphobjinv suggest https://numpy.org/doc/1.23/reference/index.html linspace -su +$ sphobjinv suggest https://numpy.org/doc/1.26/reference/index.html linspace -su -Attempting https://numpy.org/doc/1.23/reference/index.html ... +Attempting https://numpy.org/doc/1.26/reference/index.html ... ... no recognized inventory. -Attempting "https://numpy.org/doc/1.23/reference/index.html/objects.inv" ... +Attempting "https://numpy.org/doc/1.26/reference/index.html/objects.inv" ... ... HTTP error: 404 Not Found. -Attempting "https://numpy.org/doc/1.23/reference/objects.inv" ... +Attempting "https://numpy.org/doc/1.26/reference/objects.inv" ... ... HTTP error: 404 Not Found. -Attempting "https://numpy.org/doc/1.23/objects.inv" ... +Attempting "https://numpy.org/doc/1.26/objects.inv" ... ... inventory found. ------------------------------------------------- +---------------------------------------------------------------------------------- The intersphinx_mapping for this docset is LIKELY: - (https://numpy.org/doc/1.23/, None) + (https://numpy.org/doc/1.26/, None) ------------------------------------------------- +---------------------------------------------------------------------------------- Project: NumPy -Version: 1.23 +Version: 1.26 -8074 objects in inventory. +8152 objects in inventory. ------------------------------------------------- +---------------------------------------------------------------------------------- 8 results found at/above current threshold of 75. - Name Score -------------------------------------------------------------- ------- :py:function:`numpy.linspace` 90 @@ -199,7 +198,7 @@ under a [Creative Commons Attribution 4.0 International License][cc-by 4.0] [license badge]: https://img.shields.io/github/license/mashape/apistatus.svg [license link target]: https://github.com/bskinn/sphobjinv/blob/stable/LICENSE.txt [mit license]: https://opensource.org/licenses/MIT -[numpy linspace]: https://numpy.org/doc/1.23/reference/generated/numpy.linspace.html +[numpy linspace]: https://numpy.org/doc/1.26/reference/generated/numpy.linspace.html [pepy badge]: https://pepy.tech/badge/sphobjinv/month [pepy link target]: https://pepy.tech/project/sphobjinv?versions=2.0.1&versions=2.1&versions=2.2.2&versions=2.3&versions=2.3.1 [pypi badge]: https://img.shields.io/pypi/v/sphobjinv.svg?logo=pypi] From 4fee280de87c78018738190424a8c4db68e9589e Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 22:42:31 -0400 Subject: [PATCH 25/44] Remove README shell tests --- README.md | 1 + azure-pipelines.yml | 4 +- conftest.py | 1 - tests/test_readme.py | 108 ------------------------------------------- tox.ini | 1 - 5 files changed, 3 insertions(+), 112 deletions(-) delete mode 100644 tests/test_readme.py diff --git a/README.md b/README.md index 95c7409..47c60d8 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,7 @@ inventory creation/modification: '2.3' >>> inv.objects[0] DataObjStr(name='sphobjinv.cli.convert', domain='py', role='module', priority='0', uri='cli/implementation/convert.html#module-$', dispname='-') + ``` The API also enables straightforward re-export of an inventory, for subsequent diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1d57f97..5802db1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -195,8 +195,8 @@ stages: - script: cd doc; make html displayName: Build docs - - script: pytest -k readme --readme --doctest-glob="README.rst" - displayName: Run README doc/shell tests + - script: pytest -k readme --doctest-glob="README.md" + displayName: Run README doctests - job: linkcheck diff --git a/conftest.py b/conftest.py index 5c10462..12e0f02 100644 --- a/conftest.py +++ b/conftest.py @@ -62,7 +62,6 @@ def pytest_addoption(parser): parser.addoption( "--flake8_ext", action="store_true", help="Include flake8 extensions test" ) - parser.addoption("--readme", action="store_true", help="Include README shell tests") @pytest.fixture(scope="session") diff --git a/tests/test_readme.py b/tests/test_readme.py deleted file mode 100644 index 27d7e1a..0000000 --- a/tests/test_readme.py +++ /dev/null @@ -1,108 +0,0 @@ -r"""*README shell command doctests for* ``sphobjinv``. - -``sphobjinv`` is a toolkit for manipulation and inspection of -Sphinx |objects.inv| files. - -**Author** - Brian Skinn (brian.skinn@gmail.com) - -**File Created** - 6 Aug 2018 - -**Copyright** - \(c) Brian Skinn 2016-2022 - -**Source Repository** - http://www.github.com/bskinn/sphobjinv - -**Documentation** - https://sphobjinv.readthedocs.io/en/stable - -**License** - Code: `MIT License`_ - - Docs & Docstrings: |CC BY 4.0|_ - - See |license_txt|_ for full license terms. - -**Members** - -""" - -import doctest as dt -import platform -import re -import shlex -import subprocess as sp # noqa: S404 -import sys -from pathlib import Path - - -import pytest -from sphinx import __version__ as sphinx_ver - - -reqs = Path("requirements-dev.txt").read_text() - -m_sphinx_req = re.search("^sphinx==(.+)$", reqs, re.I | re.M) -sphinx_req = m_sphinx_req.group(1) - - -p_shell = re.compile( - r""" - \n```(\w+)? - \n\s*[$](?P.*) # Entered command - (?P(\n.*)+?) # Line(s) of output - (?=\n```) # Lookahead for explicit shell block endpoint - """, - re.X, -) - - -pytestmark = [pytest.mark.readme] - - -@pytest.fixture(scope="module", autouse=True) -def skip_if_no_readme_option(pytestconfig): - """Skip test if --readme not provided. - - Auto-applied to all functions in module, since module is dedicated to README. - - """ - if not pytestconfig.getoption("--readme"): - pytest.skip("'--readme' not specified") # pragma: no cover - - -@pytest.mark.skipif( - sphinx_ver != sphinx_req, - reason="Skip if Sphinx version mismatches current dev version.", -) -@pytest.mark.skipif( - "pypy" in platform.python_implementation().lower(), - reason="Inconsistent suggest results on PyPy", -) -def test_readme_shell_cmds(ensure_doc_scratch, is_win, check): - """Perform testing on README shell command examples.""" - if is_win and sys.version_info < (3, 9): # pragma: no cover - pytest.skip("Windows mishandles stdout/stderr for Python < 3.9") - - text = Path("README.md").read_text() - - chk = dt.OutputChecker() - - dt_flags = dt.ELLIPSIS | dt.NORMALIZE_WHITESPACE - - for mch in p_shell.finditer(text): - cmd = mch.group("cmd") - out = mch.group("out") - - proc = sp.run( # noqa: S603 - shlex.split(cmd), stdout=sp.PIPE, stderr=sp.STDOUT, timeout=30 - ) - - result = proc.stdout.decode("utf-8") - - msg = "\n\nExpected:\n" + out + "\n\nGot:\n" + result - - with check(): - assert chk.check_output(out, result, dt_flags), msg diff --git a/tox.ini b/tox.ini index ce0cc43..f59cb09 100644 --- a/tox.ini +++ b/tox.ini @@ -113,7 +113,6 @@ markers = cli: Command-line interface tests api: Direct API tests intersphinx: Tests on intersphinx-related functionality - readme: Testing shell examples in README.rst fixture: Trivial tests for test suite fixtures testall: Tests that use *all* objects_xyz.inv files in tests/resource, if --testall is specified flake8_ext: Test checking that all desired plugins are active From 46243b16f1b9e0a2e28e0308d6b89d52eade8723 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 22:44:42 -0400 Subject: [PATCH 26/44] Update syntax.rst Python version str.join example now states 3.12 --- doc/source/syntax.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/syntax.rst b/doc/source/syntax.rst index 99f57d6..e086f12 100644 --- a/doc/source/syntax.rst +++ b/doc/source/syntax.rst @@ -194,7 +194,7 @@ of cross-references from other documentation source. **For illustration**, the following is the entry for the :meth:`join() ` method of the :class:`str` class in the -Python 3.9 |objects.inv|, broken out field-by-field: +Python 3.12 |objects.inv|, broken out field-by-field: .. code-block:: none From bb645ffa9ffda95e22bc58e8114c73a2e57f763a Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 23:00:47 -0400 Subject: [PATCH 27/44] Remove additional wayward --readme --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5802db1..5923c84 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -250,7 +250,7 @@ stages: - script: cd doc; make html; mkdir scratch displayName: Build docset - - script: pytest --cov=. --nonloc --flake8_ext --readme + - script: pytest --cov=. --nonloc --flake8_ext displayName: Run pytest with coverage on the entire project tree - script: coverage report --include="tests/*" --fail-under=100 From ac52608175cb69a00c72b8d0899d3b97879ec514 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 23:25:13 -0400 Subject: [PATCH 28/44] Bump Python and dep versions in tox suite --- tox.ini | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tox.ini b/tox.ini index f59cb09..31b8c89 100644 --- a/tox.ini +++ b/tox.ini @@ -4,22 +4,22 @@ isolated_build=True envlist= # Test all Python versions on latest lib versions py3{8,9,10,11,12}-sphx_latest-attrs_latest-jsch_latest - # Test dev Python version on current in-repo dev lib versions - py310-sphx_dev-attrs_dev-jsch_dev + # Test leading Python version on current in-repo dev lib versions + py312-sphx_dev-attrs_dev-jsch_dev # Scan across Sphinx versions - py310-sphx_{1_6_x,1_x,2_x,4_x,dev}-attrs_latest-jsch_latest + py312-sphx_{1_6_x,1_x,2_x,4_x,5_x,6_xdev}-attrs_latest-jsch_latest # sphx_3_x is incompatible with py310 due to a typing import. Test on py39 instead. py39-sphx_3_x-attrs_latest-jsch_latest # Scan attrs versions - py310-sphx_latest-attrs_{19_2,19_3,20_1,20_2,20_3,21_2,21_3,dev}-jsch_latest + py312-sphx_latest-attrs_{19_2,19_3,20_1,20_2,20_3,21_2,21_3,22_2,dev}-jsch_latest # Scan jsonschema versions - py310-sphx_latest-attrs_latest-jsch_{3_0,3_x,4_0,4_8,dev} + py312-sphx_latest-attrs_latest-jsch_{3_0,3_x,4_0,4_8,4_14,dev} # Earliest supported Python and lib versions all together py38-sphx_1_6_x-attrs_19_2-jsch_3_0 # Spot matrix of early Python, Sphinx, attrs versions py3{8,9}-sphx_{1,2}_x-attrs_{19,20}_2-jsch_latest # Test the specific Sphinx threshold cases where behavior changed - py310-sphx_{2_3_1,2_4_0,3_2_1,3_3_0,3_4_0}-attrs_latest-jsch_latest + py312-sphx_{2_3_1,2_4_0,3_2_1,3_3_0,3_4_0}-attrs_latest-jsch_latest # Simple 'does the sdist install' check sdist_install # Lints @@ -38,6 +38,8 @@ deps= sphx_2_x: sphinx<3 sphx_3_x: sphinx<4 sphx_4_x: sphinx<5 + sphx_5_x: sphinx<6 + sphx_6_x: sphinx<7 sphx_2_3_1: sphinx==2.3.1 sphx_2_4_0: sphinx==2.4.0 sphx_3_2_1: sphinx==3.2.1 @@ -53,6 +55,7 @@ deps= attrs_20_3: attrs==20.3 attrs_21_2: attrs==21.2 attrs_21_3: attrs==21.3 + attrs_22_2: attrs==22.2 attrs_latest: attrs attrs_dev: git+https://github.com/python-attrs/attrs @@ -60,6 +63,7 @@ deps= jsch_3_x: jsonschema<4 jsch_4_0: jsonschema<4.1 jsch_4_8: jsonschema<4.9 + jsch_4_14: jsonschema<4.15 jsch_latest: jsonschema jsch_dev: git+https://github.com/Julian/jsonschema From d383f6866186d51f413fc16060069614546f1262 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 23:27:07 -0400 Subject: [PATCH 29/44] Bump primary CI Python version to 3.11 --- .github/workflows/ci_tests.yml | 6 +++--- azure-pipelines.yml | 16 ++++++++-------- azure-sdisttest.yml | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index afe88ab..9597cfd 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -4,7 +4,7 @@ on: push jobs: all_checks: - name: Run all tests, lints, etc. (Python 3.10) + name: Run all tests, lints, etc. (Python 3.11) runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[skip ci]')" @@ -15,7 +15,7 @@ jobs: - name: Install Python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.11' cache: 'pip' cache-dependency-path: | requirements-ci.txt @@ -63,7 +63,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.8', '3.9', '3.11', '3.12'] + python: ['3.8', '3.9', '3.10', '3.12'] if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5923c84..61c3b37 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,7 +26,7 @@ stages: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.10' + versionSpec: '3.11' - task: Cache@2 inputs: @@ -58,7 +58,7 @@ stages: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.10' + versionSpec: '3.11' - task: Cache@2 inputs: @@ -127,7 +127,7 @@ stages: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.10' + versionSpec: '3.11' - task: Cache@2 inputs: @@ -153,7 +153,7 @@ stages: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.10' + versionSpec: '3.11' - task: Cache@2 inputs: @@ -179,7 +179,7 @@ stages: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.10' + versionSpec: '3.11' - script: pip install -r requirements-ci.txt displayName: Install CI requirements @@ -208,7 +208,7 @@ stages: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.10' + versionSpec: '3.11' - task: Cache@2 inputs: @@ -234,7 +234,7 @@ stages: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.10' + versionSpec: '3.11' - task: Cache@2 inputs: @@ -266,7 +266,7 @@ stages: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.10' + versionSpec: '3.11' - task: Cache@2 inputs: diff --git a/azure-sdisttest.yml b/azure-sdisttest.yml index 422881b..f7448ea 100644 --- a/azure-sdisttest.yml +++ b/azure-sdisttest.yml @@ -11,7 +11,7 @@ jobs: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.10' + versionSpec: '3.11' - task: Cache@2 inputs: From 24cb28a35655b54945b95091dd8a70746516848a Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 23:30:05 -0400 Subject: [PATCH 30/44] Add trial pyproject.toml --- pyproject_trial.toml | 91 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 pyproject_trial.toml diff --git a/pyproject_trial.toml b/pyproject_trial.toml new file mode 100644 index 0000000..f9aa877 --- /dev/null +++ b/pyproject_trial.toml @@ -0,0 +1,91 @@ +[build-system] +build-backend = "setuptools.build_meta" +requires = [ + "setuptools>=61.2", + "wheel", +] + +[project] +name = "sphobjinv" +description = "Sphinx objects.inv Inspection/Manipulation Tool" +license = {text = "MIT License"} +authors = [{name = "Brian Skinn", email = "brian.skinn@gmail.com"}] +classifiers = [ + "License :: OSI Approved", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Environment :: Console", + "Framework :: Sphinx", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Documentation", + "Topic :: Documentation :: Sphinx", + "Topic :: Software Development", + "Topic :: Software Development :: Documentation", + "Topic :: Utilities", + "Development Status :: 5 - Production/Stable", +] +keywords = ["sphinx", "sphinx-doc", "inventory", "manager", "inspector"] +requires-python = ">=3.8" +dependencies = [ + "attrs>=19.2", + "certifi", + "jsonschema>=3.0", +] +dynamic = ["version"] + +[project.urls] +Homepage = "https://github.com/bskinn/sphobjinv" +Changelog = "https://github.com/bskinn/sphobjinv/blob/main/CHANGELOG.md" +Docs = "https://sphobjinv.readthedocs.io/en/stable/" +Thank = "https://twitter.com/btskinn" +Donate = "https://github.com/sponsors/bskinn" + +[project.scripts] +sphobjinv = "sphobjinv.cli.core:main" + +[tool.setuptools] +package-dir = {"" = "src"} +platforms = ["any"] +license-files = ["LICENSE.txt"] +include-package-data = false + +[tool.setuptools.packages.find] +where = ["src"] +namespaces = false + +[tool.setuptools.dynamic] +version = {attr = "sphobjinv.version.__version__"} + +[tool.black] +line-length = 88 +include = ''' +( + ^/tests/.*[.]py$ + | ^/src/sphobjinv/.*[.]py$ + | ^/setup[.]py + | ^/conftest[.]py +) +''' +exclude = ''' +( + __pycache__ + | ^/[.] + | ^/doc + | ^/env + | ^/src/sphobjinv/_vendored +) +''' + +[tool.interrogate] +exclude = ["src/sphobjinv/_vendored"] +fail-under = 100 +verbose = 1 From aae650045fd413b24f38a559a2c32a7da76560c6 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 23:32:36 -0400 Subject: [PATCH 31/44] Rename trial pyproject.toml to real, and tweak --- pyproject.toml | 62 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3780104..fc42dc8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,70 @@ [build-system] build-backend = "setuptools.build_meta" requires = [ - "setuptools", + "setuptools>=61.2", "wheel", ] +[project] +name = "sphobjinv" +description = "Sphinx objects.inv Inspection/Manipulation Tool" +license = {text = "MIT License"} +authors = [{name = "Brian Skinn", email = "brian.skinn@gmail.com"}] +classifiers = [ + "License :: OSI Approved", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Environment :: Console", + "Framework :: Sphinx", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Documentation", + "Topic :: Documentation :: Sphinx", + "Topic :: Software Development", + "Topic :: Software Development :: Documentation", + "Topic :: Utilities", + "Development Status :: 5 - Production/Stable", +] +keywords = ["sphinx", "sphinx-doc", "inventory", "manager", "inspector"] +requires-python = ">=3.8" +dependencies = [ + "attrs>=19.2", + "certifi", + "jsonschema>=3.0", +] +dynamic = ["version", "readme"] + +[project.urls] +Homepage = "https://github.com/bskinn/sphobjinv" +Changelog = "https://github.com/bskinn/sphobjinv/blob/main/CHANGELOG.md" +Docs = "https://sphobjinv.readthedocs.io/en/stable/" +Thank = "https://twitter.com/btskinn" +Donate = "https://github.com/sponsors/bskinn" + +[project.scripts] +sphobjinv = "sphobjinv.cli.core:main" + +[tool.setuptools] +package-dir = {"" = "src"} +platforms = ["any"] +license-files = ["LICENSE.txt"] +include-package-data = false + +[tool.setuptools.packages.find] +where = ["src"] +namespaces = false + +[tool.setuptools.dynamic] +version = {attr = "sphobjinv.version.__version__"} + [tool.black] line-length = 88 include = ''' From aa1aa9ddf010faa75245a5d2758db154e77b1c66 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 23:32:53 -0400 Subject: [PATCH 32/44] Remove trial pyproject and obsolete setup.cfg --- pyproject_trial.toml | 91 -------------------------------------------- setup.cfg | 57 --------------------------- 2 files changed, 148 deletions(-) delete mode 100644 pyproject_trial.toml delete mode 100644 setup.cfg diff --git a/pyproject_trial.toml b/pyproject_trial.toml deleted file mode 100644 index f9aa877..0000000 --- a/pyproject_trial.toml +++ /dev/null @@ -1,91 +0,0 @@ -[build-system] -build-backend = "setuptools.build_meta" -requires = [ - "setuptools>=61.2", - "wheel", -] - -[project] -name = "sphobjinv" -description = "Sphinx objects.inv Inspection/Manipulation Tool" -license = {text = "MIT License"} -authors = [{name = "Brian Skinn", email = "brian.skinn@gmail.com"}] -classifiers = [ - "License :: OSI Approved", - "License :: OSI Approved :: MIT License", - "Natural Language :: English", - "Environment :: Console", - "Framework :: Sphinx", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Topic :: Documentation", - "Topic :: Documentation :: Sphinx", - "Topic :: Software Development", - "Topic :: Software Development :: Documentation", - "Topic :: Utilities", - "Development Status :: 5 - Production/Stable", -] -keywords = ["sphinx", "sphinx-doc", "inventory", "manager", "inspector"] -requires-python = ">=3.8" -dependencies = [ - "attrs>=19.2", - "certifi", - "jsonschema>=3.0", -] -dynamic = ["version"] - -[project.urls] -Homepage = "https://github.com/bskinn/sphobjinv" -Changelog = "https://github.com/bskinn/sphobjinv/blob/main/CHANGELOG.md" -Docs = "https://sphobjinv.readthedocs.io/en/stable/" -Thank = "https://twitter.com/btskinn" -Donate = "https://github.com/sponsors/bskinn" - -[project.scripts] -sphobjinv = "sphobjinv.cli.core:main" - -[tool.setuptools] -package-dir = {"" = "src"} -platforms = ["any"] -license-files = ["LICENSE.txt"] -include-package-data = false - -[tool.setuptools.packages.find] -where = ["src"] -namespaces = false - -[tool.setuptools.dynamic] -version = {attr = "sphobjinv.version.__version__"} - -[tool.black] -line-length = 88 -include = ''' -( - ^/tests/.*[.]py$ - | ^/src/sphobjinv/.*[.]py$ - | ^/setup[.]py - | ^/conftest[.]py -) -''' -exclude = ''' -( - __pycache__ - | ^/[.] - | ^/doc - | ^/env - | ^/src/sphobjinv/_vendored -) -''' - -[tool.interrogate] -exclude = ["src/sphobjinv/_vendored"] -fail-under = 100 -verbose = 1 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 603d872..0000000 --- a/setup.cfg +++ /dev/null @@ -1,57 +0,0 @@ -[metadata] -name = sphobjinv -version = attr: sphobjinv.version.__version__ -description = Sphinx objects.inv Inspection/Manipulation Tool -url = https://github.com/bskinn/sphobjinv -project_urls = - Changelog=https://github.com/bskinn/sphobjinv/blob/main/CHANGELOG.md - Docs=https://sphobjinv.readthedocs.io/en/stable/ - Thank=https://twitter.com/btskinn - Donate=https://github.com/sponsors/bskinn -license = MIT License -license_files = - LICENSE.txt -platforms = any -author = Brian Skinn -author_email = brian.skinn@gmail.com -classifiers = - License :: OSI Approved - License :: OSI Approved :: MIT License - Natural Language :: English - Environment :: Console - Framework :: Sphinx - Intended Audience :: Developers - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - Topic :: Documentation - Topic :: Documentation :: Sphinx - Topic :: Software Development - Topic :: Software Development :: Documentation - Topic :: Utilities - Development Status :: 5 - Production/Stable -keywords = sphinx, sphinx-doc, inventory, manager, inspector - -[options] -install_requires = - attrs>=19.2 - certifi - jsonschema>=3.0 - -python_requires = >=3.8 -packages = find: -package_dir = - =src - -[options.packages.find] -where = src - -[options.entry_points] -console_scripts = - sphobjinv=sphobjinv.cli.core:main From cb4cd7491a1730c387e5066e9a83c0e4bc669f2b Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 23:34:03 -0400 Subject: [PATCH 33/44] Switch to README.md in MANIFEST.in --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index c7069e4..e83169a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ include AUTHORS.md CHANGELOG.md CONTRIBUTING.md LICENSE.txt pyproject.toml -include README.rst requirements-dev.txt requirements-flake8.txt tox.ini +include README.md requirements-dev.txt requirements-flake8.txt tox.ini graft src/sphobjinv/_vendored/fuzzywuzzy From 3e43ab25cb32e4e27e57db911a77904a84c10f2b Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 23:39:25 -0400 Subject: [PATCH 34/44] Bump version to v2.3.2 --- src/sphobjinv/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sphobjinv/version.py b/src/sphobjinv/version.py index c62427c..93956ca 100644 --- a/src/sphobjinv/version.py +++ b/src/sphobjinv/version.py @@ -29,4 +29,4 @@ """ -__version__ = "2.3.2.dev0" +__version__ = "2.3.2" From 341c30557c04b4ebf60c33001051fa5915a4d678 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 23:43:35 -0400 Subject: [PATCH 35/44] Update copyright years --- LICENSE.txt | 2 +- README.md | 2 +- conftest.py | 2 +- doc/source/conf.py | 2 +- doc/source/syntax.rst | 4 ++-- src/sphobjinv/__init__.py | 2 +- src/sphobjinv/__main__.py | 2 +- src/sphobjinv/_vendored/__init__.py | 2 +- src/sphobjinv/_vendored/fuzzywuzzy/__init__.py | 2 +- src/sphobjinv/cli/__init__.py | 2 +- src/sphobjinv/cli/convert.py | 2 +- src/sphobjinv/cli/core.py | 2 +- src/sphobjinv/cli/load.py | 2 +- src/sphobjinv/cli/parser.py | 4 ++-- src/sphobjinv/cli/paths.py | 2 +- src/sphobjinv/cli/suggest.py | 2 +- src/sphobjinv/cli/ui.py | 2 +- src/sphobjinv/cli/write.py | 2 +- src/sphobjinv/data.py | 2 +- src/sphobjinv/enum.py | 2 +- src/sphobjinv/error.py | 2 +- src/sphobjinv/fileops.py | 2 +- src/sphobjinv/inventory.py | 2 +- src/sphobjinv/re.py | 2 +- src/sphobjinv/schema.py | 2 +- src/sphobjinv/version.py | 2 +- src/sphobjinv/zlib.py | 2 +- tests/test_api_fail.py | 2 +- tests/test_api_good.py | 2 +- tests/test_api_good_nonlocal.py | 2 +- tests/test_cli.py | 2 +- tests/test_cli_nonlocal.py | 2 +- tests/test_fixture.py | 2 +- tests/test_flake8_ext.py | 2 +- tests/test_intersphinx.py | 2 +- tests/test_valid_objects.py | 2 +- 36 files changed, 38 insertions(+), 38 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 3a32da7..fbebf23 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016-2022 Brian Skinn and community contributors +Copyright (c) 2016-2024 Brian Skinn and community contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index 47c60d8..f90a22a 100644 --- a/README.md +++ b/README.md @@ -178,7 +178,7 @@ Available on [PyPI][pypi link target] (`pip install sphobjinv`). Source on [GitHub][github repo]. Bug reports and feature requests are welcomed at the [Issues][github issue tracker] page there. -Copyright (c) Brian Skinn 2016-2022 +Copyright (c) Brian Skinn 2016-2024 The `sphobjinv` documentation (including docstrings and README) is licensed under a [Creative Commons Attribution 4.0 International License][cc-by 4.0] diff --git a/conftest.py b/conftest.py index 12e0f02..cccab68 100644 --- a/conftest.py +++ b/conftest.py @@ -10,7 +10,7 @@ 20 Mar 2019 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** http://www.github.com/bskinn/sphobjinv diff --git a/doc/source/conf.py b/doc/source/conf.py index 14e0cc9..a89ab04 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -18,7 +18,7 @@ # -- Project information ----------------------------------------------------- project = "sphobjinv" -copyright = "2016-2022, Brian Skinn" +copyright = "2016-2024, Brian Skinn" author = "Brian Skinn" # The full version for `release`, including alpha/beta/rc tags diff --git a/doc/source/syntax.rst b/doc/source/syntax.rst index e086f12..ab51b11 100644 --- a/doc/source/syntax.rst +++ b/doc/source/syntax.rst @@ -5,8 +5,8 @@ Sphinx objects.inv v2 Syntax After decompression, "version 2" Sphinx |objects.inv| files follow a syntax that, to the best of this author's ability to determine, is not included in the -Sphinx documentation. The below syntax is believed to be accurate as of Nov 2022 -(Sphinx v6.0.0b2). It is based on inspection of |objects.inv| files "in the +Sphinx documentation. The below syntax is believed to be accurate as of May 2024 +(Sphinx v7.3.7). It is based on inspection of |objects.inv| files "in the wild" and of the Sphinx inventory object `parsing regex`_. Based upon a quick ``git diff`` of the `Sphinx repository diff --git a/src/sphobjinv/__init__.py b/src/sphobjinv/__init__.py index e825f1b..325f1ba 100644 --- a/src/sphobjinv/__init__.py +++ b/src/sphobjinv/__init__.py @@ -10,7 +10,7 @@ 17 May 2016 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/__main__.py b/src/sphobjinv/__main__.py index 4b857e1..6328f25 100644 --- a/src/sphobjinv/__main__.py +++ b/src/sphobjinv/__main__.py @@ -10,7 +10,7 @@ 15 May 2020 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/_vendored/__init__.py b/src/sphobjinv/_vendored/__init__.py index 9fd9d19..1334246 100644 --- a/src/sphobjinv/_vendored/__init__.py +++ b/src/sphobjinv/_vendored/__init__.py @@ -12,7 +12,7 @@ 11 Dec 2021 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/_vendored/fuzzywuzzy/__init__.py b/src/sphobjinv/_vendored/fuzzywuzzy/__init__.py index 4d0ee0d..1fefbce 100644 --- a/src/sphobjinv/_vendored/fuzzywuzzy/__init__.py +++ b/src/sphobjinv/_vendored/fuzzywuzzy/__init__.py @@ -25,7 +25,7 @@ 11 Dec 2021 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/cli/__init__.py b/src/sphobjinv/cli/__init__.py index db6aa5c..6bd2ecd 100644 --- a/src/sphobjinv/cli/__init__.py +++ b/src/sphobjinv/cli/__init__.py @@ -10,7 +10,7 @@ 15 Nov 2020 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/cli/convert.py b/src/sphobjinv/cli/convert.py index 34f2cc2..b84eadf 100644 --- a/src/sphobjinv/cli/convert.py +++ b/src/sphobjinv/cli/convert.py @@ -10,7 +10,7 @@ 20 Oct 2022 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/cli/core.py b/src/sphobjinv/cli/core.py index dba7479..a5c73d7 100644 --- a/src/sphobjinv/cli/core.py +++ b/src/sphobjinv/cli/core.py @@ -10,7 +10,7 @@ 15 Nov 2020 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/cli/load.py b/src/sphobjinv/cli/load.py index f9bd326..d30850c 100644 --- a/src/sphobjinv/cli/load.py +++ b/src/sphobjinv/cli/load.py @@ -10,7 +10,7 @@ 17 Nov 2020 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/cli/parser.py b/src/sphobjinv/cli/parser.py index 1928c5d..a4d012e 100644 --- a/src/sphobjinv/cli/parser.py +++ b/src/sphobjinv/cli/parser.py @@ -10,7 +10,7 @@ 15 Nov 2020 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv @@ -44,7 +44,7 @@ class PrsConst: #: Version &c. output blurb VER_TXT = ( - f"\nsphobjinv v{__version__}\n\nCopyright (c) Brian Skinn 2016-2022\n" + f"\nsphobjinv v{__version__}\n\nCopyright (c) Brian Skinn 2016-2024\n" "License: The MIT License\n\n" "Bug reports & feature requests:" " https://github.com/bskinn/sphobjinv\n" diff --git a/src/sphobjinv/cli/paths.py b/src/sphobjinv/cli/paths.py index 73a68c3..4941768 100644 --- a/src/sphobjinv/cli/paths.py +++ b/src/sphobjinv/cli/paths.py @@ -10,7 +10,7 @@ 19 Nov 2020 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/cli/suggest.py b/src/sphobjinv/cli/suggest.py index 8bd7d65..6367c9d 100644 --- a/src/sphobjinv/cli/suggest.py +++ b/src/sphobjinv/cli/suggest.py @@ -10,7 +10,7 @@ 20 Oct 2022 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/cli/ui.py b/src/sphobjinv/cli/ui.py index 302f1b9..3dd5972 100644 --- a/src/sphobjinv/cli/ui.py +++ b/src/sphobjinv/cli/ui.py @@ -10,7 +10,7 @@ 19 Nov 2020 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/cli/write.py b/src/sphobjinv/cli/write.py index e7617bb..8611d94 100644 --- a/src/sphobjinv/cli/write.py +++ b/src/sphobjinv/cli/write.py @@ -10,7 +10,7 @@ 19 Nov 2020 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/data.py b/src/sphobjinv/data.py index 17d5fba..94dd1cf 100644 --- a/src/sphobjinv/data.py +++ b/src/sphobjinv/data.py @@ -10,7 +10,7 @@ 7 Nov 2017 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/enum.py b/src/sphobjinv/enum.py index 866eb8a..6cc3d3e 100644 --- a/src/sphobjinv/enum.py +++ b/src/sphobjinv/enum.py @@ -10,7 +10,7 @@ 4 May 2019 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/error.py b/src/sphobjinv/error.py index ceb90fc..cf2b21d 100644 --- a/src/sphobjinv/error.py +++ b/src/sphobjinv/error.py @@ -10,7 +10,7 @@ 5 Nov 2017 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/fileops.py b/src/sphobjinv/fileops.py index e2d01ed..225dca9 100644 --- a/src/sphobjinv/fileops.py +++ b/src/sphobjinv/fileops.py @@ -10,7 +10,7 @@ 5 Nov 2017 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/inventory.py b/src/sphobjinv/inventory.py index 3d62785..323ad41 100644 --- a/src/sphobjinv/inventory.py +++ b/src/sphobjinv/inventory.py @@ -10,7 +10,7 @@ 7 Dec 2017 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/re.py b/src/sphobjinv/re.py index c02199f..c9ba844 100644 --- a/src/sphobjinv/re.py +++ b/src/sphobjinv/re.py @@ -10,7 +10,7 @@ 5 Nov 2017 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/schema.py b/src/sphobjinv/schema.py index 9851fa5..7b61e23 100644 --- a/src/sphobjinv/schema.py +++ b/src/sphobjinv/schema.py @@ -11,7 +11,7 @@ 7 Dec 2017 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/version.py b/src/sphobjinv/version.py index 93956ca..1e154a3 100644 --- a/src/sphobjinv/version.py +++ b/src/sphobjinv/version.py @@ -10,7 +10,7 @@ 18 Mar 2019 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/src/sphobjinv/zlib.py b/src/sphobjinv/zlib.py index f256ce4..3100cfd 100644 --- a/src/sphobjinv/zlib.py +++ b/src/sphobjinv/zlib.py @@ -10,7 +10,7 @@ 5 Nov 2017 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** https://github.com/bskinn/sphobjinv diff --git a/tests/test_api_fail.py b/tests/test_api_fail.py index a584b73..50d8734 100644 --- a/tests/test_api_fail.py +++ b/tests/test_api_fail.py @@ -10,7 +10,7 @@ 20 Mar 2019 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** http://www.github.com/bskinn/sphobjinv diff --git a/tests/test_api_good.py b/tests/test_api_good.py index 2712d4b..d5b1280 100644 --- a/tests/test_api_good.py +++ b/tests/test_api_good.py @@ -10,7 +10,7 @@ 20 Mar 2019 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** http://www.github.com/bskinn/sphobjinv diff --git a/tests/test_api_good_nonlocal.py b/tests/test_api_good_nonlocal.py index b45ba5a..85bfb1d 100644 --- a/tests/test_api_good_nonlocal.py +++ b/tests/test_api_good_nonlocal.py @@ -10,7 +10,7 @@ 21 Mar 2019 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** http://www.github.com/bskinn/sphobjinv diff --git a/tests/test_cli.py b/tests/test_cli.py index c679d8e..71f99b8 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -10,7 +10,7 @@ 20 Mar 2019 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** http://www.github.com/bskinn/sphobjinv diff --git a/tests/test_cli_nonlocal.py b/tests/test_cli_nonlocal.py index 1e4da53..c2d8ea3 100644 --- a/tests/test_cli_nonlocal.py +++ b/tests/test_cli_nonlocal.py @@ -10,7 +10,7 @@ 20 Mar 2019 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** http://www.github.com/bskinn/sphobjinv diff --git a/tests/test_fixture.py b/tests/test_fixture.py index 1e94d4a..0a19aab 100644 --- a/tests/test_fixture.py +++ b/tests/test_fixture.py @@ -10,7 +10,7 @@ 20 Mar 2019 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** http://www.github.com/bskinn/sphobjinv diff --git a/tests/test_flake8_ext.py b/tests/test_flake8_ext.py index 2255488..1ae90ea 100644 --- a/tests/test_flake8_ext.py +++ b/tests/test_flake8_ext.py @@ -10,7 +10,7 @@ 27 Apr 2019 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** http://www.github.com/bskinn/sphobjinv diff --git a/tests/test_intersphinx.py b/tests/test_intersphinx.py index 177326d..24079a5 100644 --- a/tests/test_intersphinx.py +++ b/tests/test_intersphinx.py @@ -10,7 +10,7 @@ 21 Jun 2022 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** http://www.github.com/bskinn/sphobjinv diff --git a/tests/test_valid_objects.py b/tests/test_valid_objects.py index 109befa..648c954 100644 --- a/tests/test_valid_objects.py +++ b/tests/test_valid_objects.py @@ -10,7 +10,7 @@ 13 Feb 2021 **Copyright** - \(c) Brian Skinn 2016-2022 + \(c) Brian Skinn 2016-2024 **Source Repository** http://www.github.com/bskinn/sphobjinv From 79497f4138cec0ee12de48cb2658b7f3ebb96b20 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 23:45:35 -0400 Subject: [PATCH 36/44] Switch social link to Fosstodon --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fc42dc8..14a04df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ dynamic = ["version", "readme"] Homepage = "https://github.com/bskinn/sphobjinv" Changelog = "https://github.com/bskinn/sphobjinv/blob/main/CHANGELOG.md" Docs = "https://sphobjinv.readthedocs.io/en/stable/" -Thank = "https://twitter.com/btskinn" +Thank = "https://fosstodon.org/@btskinn" Donate = "https://github.com/sponsors/bskinn" [project.scripts] From caf463936d8efa152030c557c8c639753f88e706 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 23:50:59 -0400 Subject: [PATCH 37/44] Update CHANGELOG for v2.3.2 --- CHANGELOG.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ef891e..793b608 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,15 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project strives to adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -### Unreleased - -#### Added - - * The project now supports Python 3.12. - -#### Removed - - * Removed support for Python 3.7, which is end-of-life. +### [2.3.2] - 2024-05-20 #### Tests @@ -23,6 +15,10 @@ and this project strives to adhere to #### Administrative + * Added formal support for Python 3.12. + + * Removed formal support for Python 3.7, which is end-of-life. + * Bump `checkout` and `setup-python` GitHub Actions versions ([#289]). * Convert README from reST to Markdown ([#289], fixes [#287]). From 7842654ecc1d9744ca1563d73a06d06f29d53658 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Mon, 20 May 2024 23:54:23 -0400 Subject: [PATCH 38/44] Update CONTRIBUTING.md --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6e9297a..01f1f54 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,8 +5,8 @@ Thanks for your interest in contributing to `sphobjinv`! The aim of this document is to provide the information you need to get started smoothly on a contribution. -If you have any questions, please drop me a line on Twitter -([@btskinn](https://twitter.com/btskinn)) or open an +If you have any questions, please drop me a line on Mastodon +([@btskinn@fosstodon.org](https://fosstodon.org/@btskinn)) or open an [issue](https://github.com/bskinn/sphobjinv/issues). @@ -43,7 +43,7 @@ prefer. Any Python interpreter 3.8+ *should* work fine. I prefer to use `virtualenv` and create in `./env`: ``` -$ python3.10 -m virtualenv env --prompt="sphobjinv" +$ python3.11 -m virtualenv env --prompt="sphobjinv" ``` Activate the environment: From cf9d3baf12a6ee673a02e2093f95d3ebcd714b96 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Tue, 21 May 2024 00:01:38 -0400 Subject: [PATCH 39/44] Bump Sphinx to v7.3.7 --- requirements-ci.txt | 2 +- requirements-dev.txt | 2 +- requirements-rtd.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements-ci.txt b/requirements-ci.txt index e2ab803..80e9a73 100644 --- a/requirements-ci.txt +++ b/requirements-ci.txt @@ -10,7 +10,7 @@ pytest-check>=1.1.2 pytest-cov pytest-ordering pytest-timeout -sphinx==5.3.0 +sphinx==7.3.7 sphinx-issues sphinx-removed-in sphinx-rtd-theme>=0.5.1 diff --git a/requirements-dev.txt b/requirements-dev.txt index 3a15831..850e7f9 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -15,7 +15,7 @@ pytest-ordering pytest-timeout restview rope -sphinx==5.3.0 +sphinx==7.3.7 sphinx-autobuild sphinx-issues sphinx-removed-in diff --git a/requirements-rtd.txt b/requirements-rtd.txt index a5480e1..85270ed 100644 --- a/requirements-rtd.txt +++ b/requirements-rtd.txt @@ -1,5 +1,5 @@ attrs>=19.2 -sphinx==5.3.0 +sphinx==7.3.7 sphinx-issues sphinx-removed-in sphinx-rtd-theme>=0.5.1 From fa0ec1a3a5513a0d1086f2f17089152a200bf8be Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Tue, 21 May 2024 00:05:12 -0400 Subject: [PATCH 40/44] Drop dev Sphinx to 7.1.2 --- requirements-ci.txt | 2 +- requirements-dev.txt | 2 +- requirements-rtd.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements-ci.txt b/requirements-ci.txt index 80e9a73..af4b5b0 100644 --- a/requirements-ci.txt +++ b/requirements-ci.txt @@ -10,7 +10,7 @@ pytest-check>=1.1.2 pytest-cov pytest-ordering pytest-timeout -sphinx==7.3.7 +sphinx==7.1.2 sphinx-issues sphinx-removed-in sphinx-rtd-theme>=0.5.1 diff --git a/requirements-dev.txt b/requirements-dev.txt index 850e7f9..4a36818 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -15,7 +15,7 @@ pytest-ordering pytest-timeout restview rope -sphinx==7.3.7 +sphinx==7.1.2 sphinx-autobuild sphinx-issues sphinx-removed-in diff --git a/requirements-rtd.txt b/requirements-rtd.txt index 85270ed..0445b73 100644 --- a/requirements-rtd.txt +++ b/requirements-rtd.txt @@ -1,5 +1,5 @@ attrs>=19.2 -sphinx==7.3.7 +sphinx==7.1.2 sphinx-issues sphinx-removed-in sphinx-rtd-theme>=0.5.1 From 838eccfc2ac74df613d5b416e5ea60e2bff1636b Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Tue, 21 May 2024 22:46:36 -0400 Subject: [PATCH 41/44] Change version bump to 2.3.1.1 and update CHANGELOG --- CHANGELOG.md | 8 +++++--- src/sphobjinv/version.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 793b608..b6f7c2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project strives to adhere to -[Semantic Versioning](http://semver.org/spec/v2.0.0.html). +and this project follows an extension of +[Semantic Versioning](http://semver.org/spec/v2.0.0.html), where a bump in a +fourth number represents an administrative maintenance release with no code +changes. -### [2.3.2] - 2024-05-20 +### [2.3.1.1] - 2024-05-21 #### Tests diff --git a/src/sphobjinv/version.py b/src/sphobjinv/version.py index 1e154a3..7f12092 100644 --- a/src/sphobjinv/version.py +++ b/src/sphobjinv/version.py @@ -29,4 +29,4 @@ """ -__version__ = "2.3.2" +__version__ = "2.3.1.1" From 1d8f043e4cf07b47200c4607c49317717fffdc99 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Tue, 21 May 2024 23:09:25 -0400 Subject: [PATCH 42/44] Fix tox flake8-noqa invocation --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 31b8c89..3176583 100644 --- a/tox.ini +++ b/tox.ini @@ -97,7 +97,7 @@ skip_install=True deps=-rrequirements-flake8.txt commands= pip install flake8-noqa - flake8 --color=never --exit-zero conftest.py tests src + flake8 --color=never --exit-zero ./conftest.py tests src [testenv:interrogate] skip_install=True From 19969470e15a5cc809b30bd2037b606c28f67393 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Tue, 21 May 2024 23:09:40 -0400 Subject: [PATCH 43/44] Fix Azure README test job name --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 61c3b37..4a82c99 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -171,7 +171,7 @@ stages: - job: readme - displayName: Run README doctests/shell tests + displayName: Run README doctests pool: vmImage: 'Ubuntu-latest' From 385e4847107cf4838953bfbd3d0a54456b9fe285 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Tue, 21 May 2024 23:17:11 -0400 Subject: [PATCH 44/44] Remove duplicate Azure Pipelines trigger --- azure-pipelines.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4a82c99..64f0c2a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,6 +1,3 @@ -trigger: -- release-* - pr: branches: include: