Skip to content

Commit

Permalink
Merge branch 'release-2.3' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
bskinn committed Nov 9, 2022
2 parents 1b2d5e3 + d505c2f commit d6c2d02
Show file tree
Hide file tree
Showing 73 changed files with 1,598 additions and 672 deletions.
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: pypi/sphobjinv # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: bskinn # Replace with a single Liberapay username
liberapay: # bskinn # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://paypal.me/btskinn'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
custom: # ['https://paypal.me/btskinn'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
18 changes: 13 additions & 5 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ jobs:

steps:
- name: Check out repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: |
requirements-ci.txt
requirements-flake8.txt
- name: Update pip & setuptools
run: python -m pip install -U pip setuptools
Expand Down Expand Up @@ -59,17 +63,21 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.6', '3.7', '3.8', '3.9']
python: ['3.6', '3.7', '3.8', '3.9', '3.11']
if: "!contains(github.event.head_commit.message, '[skip ci]')"

steps:
- name: Check out repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: |
requirements-ci.txt
requirements-flake8.txt
- name: Update pip & setuptools
run: python -m pip install -U pip setuptools
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: '22.1.0'
rev: '22.3.0'
hooks:
- id: black
- repo: https://github.com/tox-dev/pyproject-fmt
Expand Down
20 changes: 12 additions & 8 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@
# Required
version: 2

# Build with sphinx
sphinx:
configuration: doc/source/conf.py

# Build all the things
formats: all
# Build and VM configuration
build:
os: 'ubuntu-22.04'
tools:
python: '3.10'

# Python and requirements
# Python requirements
python:
version: '3.8'
install:
- requirements: requirements-rtd.txt
- method: pip
path: .

# Build with sphinx
sphinx:
configuration: doc/source/conf.py

# Build all the things
formats: all
42 changes: 25 additions & 17 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
Credits
=======

`sphobjinv` is authored and maintained by Brian Skinn ([Blog](https://bskinn.github.io)) ([Twitter](https://twitter.com/btskinn)).
`sphobjinv` is authored and maintained by Brian Skinn
([Blog](https://bskinn.github.io)) ([Twitter](https://twitter.com/btskinn)).

The idea for the project came about as I was starting to deepen my expertise with Sphinx, and found it
hugely frustrating to debug cross-references to objects in code. I discovered the `objects.inv` files
relatively quickly, but struggled with trying to get at the actual object information.
At the time (2016), the ability to [execute `sphinx.ext.intersphinx` as a module](https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#showing-all-links-of-an-intersphinx-mapping-file)
hadn't yet been documented (that happened in [2018](https://github.com/sphinx-doc/sphinx/commit/7aaba1758a4622298d15339fddd8556eb221af86)),
and a fair bit of searching didn't turn up anything promising.
The idea for the project came about as I was starting to deepen my expertise
with Sphinx, and found it hugely frustrating to debug cross-references to
objects in code. I discovered the `objects.inv` files relatively quickly, but
struggled with trying to get at the actual object information. At the time
(2016), the ability to
[execute `sphinx.ext.intersphinx` as a module](https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#showing-all-links-of-an-intersphinx-mapping-file)
hadn't yet been documented (that happened in
[2018](https://github.com/sphinx-doc/sphinx/commit/7aaba1758a4622298d15339fddd8556eb221af86)),
and a fair bit of searching didn't turn up anything promising.

Once I dug into the Sphinx code to figure out how to zlib-decompress the object data, it was relatively straightforward
to put together the initial v1.0 of `sphobjinv`, which could only (de)compress `objects.inv` files to/from plaintext.
As I started to use it regularly in my own documentation work, it became clear that there would be significant advantages
from also implementing functionality to assist with object searches, especially in large documentation sets.
Also, it seemed likely that a robust API for creation/manipulation of inventory contents would be useful, in order to
assist with things like scraping a non-Sphinx website to generate an `objects.inv` for cross-referencing in other docs.
This led to the current object-oriented API of `sphobjinv` v2.x.
Once I dug into the Sphinx code to figure out how to zlib-decompress the object
data, it was relatively straightforward to put together the initial v1.0 of
`sphobjinv`, which could only (de)compress `objects.inv` files to/from
plaintext. As I started to use it regularly in my own documentation work, it
became clear that there would be significant advantages to also implement object
searches, especially in large documentation sets. Also, it seemed likely that a
robust API for creation/manipulation of inventory contents would be useful, in
order to assist with things like scraping a non-Sphinx website to generate an
`objects.inv` for cross-referencing in other docs. This led to the current
object-oriented API of `sphobjinv` v2.x.

While there are [numerous](https://github.com/bskinn/sphobjinv/issues) possible enhancements to the project,
I'm quite satisfied with its ease of use and usefulness, at least for my purposes, and thus consider it fully stable.
I'm always glad to receive feature requests and bug reports, though.
While there are [numerous](https://github.com/bskinn/sphobjinv/issues) possible
enhancements to the project, I'm satisfied with its ease of use and usefulness,
at least for my purposes, and thus consider it fully stable. I'm always glad to
receive feature requests and bug reports, though.
102 changes: 102 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,110 @@ and this project strives to adhere to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).


### [2.3] - 2022-11-08

#### Added

* The CLI now prints the project name and version for the `objects.inv` as
part of the 'suggest' mode output.

* The CLI now prints an inferred `intersphinx_mapping` entry for a remote
docset as part of the 'suggest' mode output, where such inference is
possible. The output from this mapping inference was added to the relevant
tests, and a couple of unit tests on some basic pieces of functionality were
written. ([#149](https://github.com/bskinn/sphobjinv/issues/149))

* The CLI now provides considerably more information about what is happening
with the URLs it checks when trying to retrieve a remote inventory.
([#99](https://github.com/bskinn/sphobjinv/issues/99), plus more)

* A new CLI option, `-p`/`--paginate`, enables paging of the results from the
`suggest` feature. ([#70](https://github.com/bskinn/sphobjinv/issues/70))

#### Fixed

* The regex for parsing object lines from decompressed inventories now
correctly processes `{role}` values that contain internal colons.

* CLI corner case where options are passed but no subparser is specified
now results in a clean error-exit, instead of an exception.
([#239](https://github.com/bskinn/sphobjinv/issues/239))

#### Documentation

* Updated doctests to reflect the new v22.1 attrs `objects.inv` used for
demonstration purposes.

* Updated `syntax.rst` to indicate that the `{role}` in an inventory object
MAY contain a colon.

* Added new 'CLI implementation' pages for the new modules, downstream of the
refactoring of the CLI 'convert' and 'suggest' code.

* Revised the intro paragraph of the 'CLI usage' page to more clearly emphasize
the two CLI subcommands and the links to their respective docs pages.

* Fixed a mistake in the CLI help info for the `--url` argument to `convert`.

#### Tests

* Various tests were updated to reflect the contents of the new v22.1 attrs
`objects.inv` introduced to replace the previous v17.2 inventory.

* A modern Sphinx `objects.inv` (v6.0.0b) was added to `tests/resource` as
`objects_sphinx.inv`, and the previous v1.6.6 was renamed to
`objects_sphinx_1_6_6.inv`.

* The 'valid objects' test cases were updated to reflect the possibility for a colon within `{role}`:

* The colon-within-`{role}` test case was moved from 'invalid' to 'valid'.

* The colon-within-`{domain}` test case was also moved from 'invalid' to
'valid', but with an annotation added to indicate that it's not actually
viable---it will actually be interpreted incorrectly, with the first
portion of the colon-containing `{domain}` imported as `{domain}`, and the
remainder imported as part of `{role}`.

#### Internal

* Refactor CLI code to place the 'convert' and 'suggest' implementations in
their own modules.

* Refactor CLI 'suggest' code to the main `do_suggest()` function and a
handful of sub-functions.

* Rename the `log_print()` CLI helper function to the more-descriptive
`print_stderr()`.

* Bump development Sphinx version to v5.3.

* Bump flake8 version to >=5, due to the absorption of flake8-colors
colorization functionality. The flake8/tox config was updated accordingly.

* Bump pre-commit black hook to v22.3.0.

* Remove PyPy and Python 3.6 from Azure Pipelines test matrix.

* Revise `__version__` retrieval in `setup.py` to use an intermediate
dictionary with `exec()`.

* Update `setup.cfg` to use `license_files`, instead of the deprecated
`license_file`.

#### Administrative

* Apply CC BY 4.0 to documentation and docstrings and update project files to
reflect.


### [2.2.2] - 2022-03-22

#### Changed

* CLI 'suggest' results output now displays more information about
the total number of objects in the inventory, the search score threshold,
and the number of results falling at/above that threshold.

#### Fixed

* UnicodeDecodeErrors are ignored within the vendored `fuzzywuzzy` package
Expand Down
Loading

0 comments on commit d6c2d02

Please sign in to comment.