Skip to content

Commit 7367f7b

Browse files
authored
Merge pull request #271 from bskinn/release-2.3.1
Merge v2.3.1 to `stable`
2 parents d6c2d02 + 3086b48 commit 7367f7b

28 files changed

+430
-104
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
tests/resource/objects_mkdoc_zlib0.inv binary
2-
2+
tests/resource/objects_attrs.txt binary

.github/workflows/ci_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
runs-on: ubuntu-latest
6464
strategy:
6565
matrix:
66-
python: ['3.6', '3.7', '3.8', '3.9', '3.11']
66+
python: ['3.7', '3.8', '3.9', '3.11']
6767
if: "!contains(github.event.head_commit.message, '[skip ci]')"
6868

6969
steps:

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: 'v3.2.0'
5+
rev: 'v4.3.0'
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- id: check-yaml
1010
- id: check-added-large-files
1111
- repo: https://github.com/psf/black
12-
rev: '22.3.0'
12+
rev: '22.10.0'
1313
hooks:
1414
- id: black
1515
- repo: https://github.com/tox-dev/pyproject-fmt
16-
rev: '0.3.2'
16+
rev: '0.3.5'
1717
hooks:
1818
- id: pyproject-fmt

CHANGELOG.md

Lines changed: 109 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,108 @@ and this project strives to adhere to
77
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
88

99

10+
### [2.3.1] - 2022-11-29
11+
12+
#### Changed
13+
14+
* The printout of the inferred `intersphinx_mapping` item for inventories
15+
retrieved by URL (`--url`) in the 'suggest' CLI mode is now relocated to
16+
fall immediately below the inventory-search output. It also now is displayed
17+
even if no objects in the `objects.inv` satisfy the score threshold.
18+
([#262](https://github.com/bskinn/sphobjinv/issues/262))
19+
20+
* The 'suggest' CLI mode output now includes dividers for improved
21+
readability.
22+
23+
#### Tests
24+
25+
* The plaintext `tests/resource/objects_attrs.txt` was converted to POSIX EOLs
26+
and declared as binary to git, in order to provide a consistent state for
27+
sdist packaging, regardless of platform (POSIX vs Windows).
28+
29+
* As a result, it was necessary to modify the `scratch_path` fixture to
30+
"`unix2dos`" this file on Windows systems, in order to provide a
31+
consistent test state.
32+
33+
* Similarly, the `decomp_cmp_test` fixture was modified to "`unix2dos`" the
34+
`objects_attrs.txt` resource before comparisons, again in order to provide
35+
a consistent reference artifact. Implementing required direct manipulation
36+
of the bytes contents of the file, instead of the `filecmp.cmp` method
37+
that had been used previously.
38+
39+
* The README doctests and shell tests have been removed from the default
40+
pytest suite. They must be explicitly opted-in with the `--readme` and
41+
`--doctest-glob="README.rst"` flags to pytest.
42+
43+
* A new job, `readme`, has been added to the `aux_tests` stage of the Azure
44+
Pipelines CI to run these tests for PRs and release branches.
45+
46+
* The constraint for `pytest-check` was bumped to `>=1.1.2` and all uses of
47+
the `check` fixture were revised from `with check.check(...):` to
48+
`with check(...):`. ([#265](https://github.com/bskinn/sphobjinv/issues/265))
49+
50+
* Azure Pipelines now has Python 3.11 available for all of Ubuntu, Windows and
51+
MacOS, so it was added to the core text matrix for all platforms.
52+
53+
* A new CI job was created on Azure Pipelines that creates an sdist from the
54+
current project, extracts it into a sandboxed environment, installs the dev
55+
dependencies, and runs the pytest suite (`azure-sdisttest.yml`).
56+
57+
* All uses of `pytest-check` were updated to use the
58+
[v1.1.2 syntax](https://github.com/okken/pytest-check/blob/main/changelog.md#110---2022-nov-21)
59+
(`check` fixture, or `from pytest_check import check`).
60+
61+
#### Internal
62+
63+
* The `sys.exit()` in the case of no objects falling above the 'suggest'
64+
search threshold was refactored into the main `do_suggest()` body, to
65+
minimize the surprise of an `exit()` call coming in a subfunction.
66+
([#263](https://github.com/bskinn/sphobjinv/issues/263))
67+
68+
#### Packaging
69+
70+
* `MANIFEST.in` was revised in order to provide a testable (`pytest --nonloc`)
71+
sdist, in order to streamline packaging of `sphobjinv` for conda-forge.
72+
(Thanks very much to [@anjos](https://github.com/anjos) for getting the
73+
recipes for `sphobjinv` and its dependencies in place! See
74+
[#264](https://github.com/bskinn/sphobjinv/issues/264).)
75+
76+
#### Administrative
77+
78+
* `sphobjinv` is now available via conda-forge! A note was added to the docs
79+
to indicate this.
80+
81+
* The version bump on `pytest-check` no longer permits the use of Python 3.6
82+
in CI. As Python 3.6 is nearly a year beyond EOL, this seems a reasonable
83+
time to officially drop support for it. `python_requires` will still be at
84+
`>=3.6` for now; it *should* still work for 3.6...but, no guarantees.
85+
86+
* The hook versions for `pre-commit-hooks`, `black`, and `pyproject-fmt` were
87+
updated to v4.3, v22.10, and v0.3.5, respectively.
88+
89+
* `CONTENT_LICENSE.txt` was created, to specifically house the full
90+
content/documentation license information.
91+
92+
* `LICENSE.txt` was revised to only hold the MIT License for the code,
93+
primarily so that Github's automatic systems will recognize the project as
94+
MIT licensed.
95+
96+
* Caching of pip downloads was added to all of the Azure Pipelines jobs.
97+
98+
* The version constraint for `pytest-check` was raised to `>=1.1.2`.
99+
100+
* A temporary upper bound was placed on the `flake8` version (now `>=5,<6`,
101+
instead of `>=5`) to avoid pip resolver failures likely due to conflicts
102+
with constraints declared by plugins.
103+
104+
* The older versions of `jsonschema` tested in the `tox` matrix were
105+
streamlined down to 3.0 (`==3.0`), 3.x (`<4`), 4.0 (`<4.1`) and 4.8
106+
(`<4.9`).
107+
108+
* The pin of `sphinx-issues==0.4.0` in the `tox` matrix was removed, to match
109+
the unpinned package in the `requirements-xxx.txt` files.
110+
111+
10112
### [2.3] - 2022-11-08
11113

12114
#### Added
@@ -24,6 +126,11 @@ and this project strives to adhere to
24126
with the URLs it checks when trying to retrieve a remote inventory.
25127
([#99](https://github.com/bskinn/sphobjinv/issues/99), plus more)
26128

129+
* CLI 'suggest' results output now displays more information about
130+
the total number of objects in the inventory, the search score threshold,
131+
and the number of results falling at/above that threshold.
132+
([#232](https://github.com/bskinn/sphobjinv/issues/232))
133+
27134
* A new CLI option, `-p`/`--paginate`, enables paging of the results from the
28135
`suggest` feature. ([#70](https://github.com/bskinn/sphobjinv/issues/70))
29136

@@ -61,7 +168,8 @@ and this project strives to adhere to
61168
`objects_sphinx.inv`, and the previous v1.6.6 was renamed to
62169
`objects_sphinx_1_6_6.inv`.
63170

64-
* The 'valid objects' test cases were updated to reflect the possibility for a colon within `{role}`:
171+
* The 'valid objects' test cases were updated to reflect the possibility for a
172+
colon within `{role}`:
65173

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

@@ -105,12 +213,6 @@ and this project strives to adhere to
105213

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

108-
#### Changed
109-
110-
* CLI 'suggest' results output now displays more information about
111-
the total number of objects in the inventory, the search score threshold,
112-
and the number of results falling at/above that threshold.
113-
114216
#### Fixed
115217

116218
* UnicodeDecodeErrors are ignored within the vendored `fuzzywuzzy` package

CONTENT_LICENSE.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The sphobjinv documentation (including docstrings and README) is licensed under
2+
a Creative Commons Attribution 4.0 International License (CC-BY).
3+
4+
See http://creativecommons.org/licenses/by/4.0/.

CONTRIBUTING.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Welcome!
1+
Welcome! <!-- omit in toc -->
22
--------
33

44
Thanks for your interest in contributing to `sphobjinv`!
@@ -10,7 +10,7 @@ If you have any questions, please drop me a line on Twitter
1010
[issue](https://github.com/bskinn/sphobjinv/issues).
1111

1212

13-
Table of Contents
13+
Table of Contents <!-- omit in toc -->
1414
-----------------
1515

1616
<!--TOC-->
@@ -23,7 +23,7 @@ Table of Contents
2323
- [Documentation](#documentation)
2424
- [Continuous Integration](#continuous-integration)
2525
- [CHANGELOG](#changelog)
26-
- [Issue & PR Templates](#issue--pr-templates)
26+
- [Issue and PR Templates](#issue-and-pr-templates)
2727
- [License](#license)
2828

2929
<!--TOC-->
@@ -38,7 +38,7 @@ $ git clone https://github.com/{you}/sphobjinv
3838
```
3939

4040
Then, create a virtual environment for the project, in whatever location you
41-
prefer. Any Python interpreter 3.6+ *should* work fine.
41+
prefer. Any Python interpreter 3.7+ *should* work fine.
4242

4343
I prefer to use `virtualenv` and create in `./env`:
4444

@@ -153,8 +153,8 @@ Note that while [`tox`](https://tox.wiki/en/latest/) *is* configured for the
153153
project, it is **not** set up to be an everyday test runner. Instead, it's used
154154
to execute an extensive matrix of test environments checking for the
155155
compatibility of different Python and dependency versions. You can run it if you
156-
want, but you'll need working versions of all of Python 3.6 through 3.11
157-
installed and on `PATH` as `python3.6`, `python3.7`, etc. The nonlocal test
156+
want, but you'll need working versions of all of Python 3.7 through 3.11
157+
installed and on `PATH` as `python3.7`, `python3.8`, etc. The nonlocal test
158158
suite is run for each `tox` environment, so it's best to use at most two
159159
parallel sub-processes to avoid oversaturating your network bandwidth; e.g.:
160160

@@ -250,7 +250,7 @@ with `make linkcheck`.
250250
Both Github Actions and Azure Pipelines are set up for the project, and should
251251
run on any forks of the repository.
252252

253-
Github Actions runs the test suite on Linux for Python 3.6 through 3.11, as well
253+
Github Actions runs the test suite on Linux for Python 3.7 through 3.11, as well
254254
as the `flake8` lints and the Sphinx doctests and link-validity testing, and is
255255
configured to run on all commits. The workflow can be skipped per-commit by
256256
including `[skip ci]` in the commit message.
@@ -279,7 +279,7 @@ settings, etc.) may also warrant a `CHANGELOG` bullet, depending on the
279279
situation. When in doubt, ask!
280280

281281

282-
## Issue & PR Templates
282+
## Issue and PR Templates
283283

284284
I've set up the project with a PR template and a couple of issue templates, to
285285
hopefully make it easier to provide all the information needed to act on code
@@ -290,4 +290,4 @@ issue/PR you want to create, though, then don't use them.
290290
## License
291291

292292
All code and documentation contributions will respectively take on the MIT
293-
License and CC-BY 4.0 license of the project at large.
293+
License and CC BY 4.0 license of the project at large.

LICENSE.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
The sphobjinv documentation (including docstrings) is licensed under a Creative
2-
Commons Attribution 4.0 International License (CC-BY).
3-
4-
See http://creativecommons.org/licenses/by/4.0/.
5-
6-
7-
The sphobjinv codebase is released under the MIT License, the text of which is
8-
included below.
9-
10-
11-
====================================================================================
12-
13-
141
The MIT License (MIT)
152

163
Copyright (c) 2016-2022 Brian Skinn and community contributors

MANIFEST.in

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
1-
include AUTHORS.md CHANGELOG.md CONTRIBUTING.md LICENSE.txt pyproject.toml README.rst
1+
include AUTHORS.md CHANGELOG.md CONTRIBUTING.md LICENSE.txt pyproject.toml
2+
include README.rst requirements-dev.txt requirements-flake8.txt tox.ini
3+
4+
graft src/sphobjinv/_vendored/fuzzywuzzy
5+
6+
graft doc/source
7+
include doc/make.bat doc/Makefile
8+
9+
include conftest.py
10+
graft tests
11+
prune tests/resource
12+
include tests/resource/objects_attrs* tests/resource/objects_sarge*
13+
14+
global-exclude __pycache__/*
15+
prune **/*.egg-info

README.rst

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ sphobjinv: Manipulate and inspect Sphinx objects.inv files
3333
:target: https://github.com/psf/black
3434

3535
.. image:: https://pepy.tech/badge/sphobjinv/month
36-
:target: https://pepy.tech/project/sphobjinv?versions=2.0.1&versions=2.1&versions=2.2.2&versions=2.3
36+
:target: https://pepy.tech/project/sphobjinv?versions=2.0.1&versions=2.1&versions=2.2.2&versions=2.3&versions=2.3.1
3737

3838
----
3939

@@ -57,14 +57,21 @@ For internal cross-references, locate ``objects.inv`` within ``build/html``::
5757

5858
$ sphobjinv suggest doc/build/html/objects.inv as_rst -st 58
5959

60+
------------------------------------------------
61+
62+
Cannot infer intersphinx_mapping from a local objects.inv.
63+
64+
------------------------------------------------
65+
6066
Project: sphobjinv
6167
Version: 2.3
6268

63-
219 objects in inventory.
69+
220 objects in inventory.
70+
71+
------------------------------------------------
6472

6573
11 results found at/above current threshold of 58.
6674

67-
Cannot infer intersphinx_mapping from a local objects.inv.
6875

6976
Name Score
7077
--------------------------------------------------- -------
@@ -103,16 +110,22 @@ cross-reference the ``linspace`` function from numpy (see
103110
Attempting "https://numpy.org/doc/1.23/objects.inv" ...
104111
... inventory found.
105112

113+
------------------------------------------------
114+
115+
The intersphinx_mapping for this docset is LIKELY:
116+
117+
(https://numpy.org/doc/1.23/, None)
118+
119+
------------------------------------------------
120+
106121
Project: NumPy
107122
Version: 1.23
108123

109124
8074 objects in inventory.
110125

111-
8 results found at/above current threshold of 75.
112-
113-
The intersphinx_mapping for this docset is LIKELY:
126+
------------------------------------------------
114127

115-
(https://numpy.org/doc/1.23/, None)
128+
8 results found at/above current threshold of 75.
116129

117130

118131
Name Score
@@ -157,7 +170,7 @@ inventory creation/modification::
157170
>>> import sphobjinv as soi
158171
>>> inv = soi.Inventory('doc/build/html/objects.inv')
159172
>>> print(inv)
160-
<Inventory (fname_zlib): sphobjinv v2.3, 219 objects>
173+
<Inventory (fname_zlib): sphobjinv v2.3, 220 objects>
161174
>>> inv.project
162175
'sphobjinv'
163176
>>> inv.version
@@ -185,7 +198,8 @@ and feature requests are welcomed at the
185198

186199
Copyright (c) Brian Skinn 2016-2022
187200

188-
The ``sphobjinv`` documentation (including docstrings) is licensed under a
201+
The ``sphobjinv`` documentation (including docstrings and README) is licensed
202+
under a
189203
`Creative Commons Attribution 4.0 International License <http://creativecommons.org/licenses/by/4.0/>`__
190204
(CC-BY). The ``sphobjinv`` codebase is released under the
191205
`MIT License <https://opensource.org/licenses/MIT>`__. See

azure-coretest.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Caching implemented as per
2+
# https://stackoverflow.com/a/70297887/4376000
3+
14
parameters:
25
pythons: []
36
platforms: []
@@ -15,6 +18,7 @@ jobs:
1518
image: 'macOS-latest'
1619
${{ if notIn(platform, 'macOs', 'linux', 'windows') }}:
1720
image: 'Ubuntu-latest'
21+
pip_cache_dir: $(Pipeline.Workspace)/.pip
1822

1923
pool:
2024
vmImage: $[ variables.image ]
@@ -26,6 +30,14 @@ jobs:
2630
architecture: 'x64'
2731
displayName: Use cached ${{ coalesce(python.value.name, python.key) }} for tests.
2832

33+
- task: Cache@2
34+
inputs:
35+
key: 'pip | "$(Agent.OS)" | requirements-dev.txt | requirements-flake8.txt'
36+
restoreKeys: |
37+
pip | "$(Agent.OS)"
38+
path: $(pip_cache_dir)
39+
displayName: Cache pip
40+
2941
- script: pip install -U --force-reinstall -r requirements-ci.txt
3042
displayName: Install CI requirements
3143

0 commit comments

Comments
 (0)