intersphinx-registry 0.2411.25__tar.gz → 0.2501.23__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {intersphinx_registry-0.2411.25 → intersphinx_registry-0.2501.23}/PKG-INFO +1 -1
- {intersphinx_registry-0.2411.25 → intersphinx_registry-0.2501.23}/intersphinx_registry/__init__.py +2 -1
- intersphinx_registry-0.2501.23/intersphinx_registry/lookup.py +83 -0
- {intersphinx_registry-0.2411.25 → intersphinx_registry-0.2501.23}/intersphinx_registry/registry.json +6 -3
- intersphinx_registry-0.2411.25/intersphinx_registry/lookup.py +0 -74
- {intersphinx_registry-0.2411.25 → intersphinx_registry-0.2501.23}/LICENSE +0 -0
- {intersphinx_registry-0.2411.25 → intersphinx_registry-0.2501.23}/README.md +0 -0
- {intersphinx_registry-0.2411.25 → intersphinx_registry-0.2501.23}/intersphinx_registry/_info.py +0 -0
- {intersphinx_registry-0.2411.25 → intersphinx_registry-0.2501.23}/intersphinx_registry/py.typed +0 -0
- {intersphinx_registry-0.2411.25 → intersphinx_registry-0.2501.23}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: intersphinx_registry
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2501.23
|
|
4
4
|
Summary: This package provides convenient utilities and data to write a sphinx config file.
|
|
5
5
|
Author-email: Matthias Bussonnier <bussonniermatthias@gmail.com>
|
|
6
6
|
Description-Content-Type: text/markdown
|
{intersphinx_registry-0.2411.25 → intersphinx_registry-0.2501.23}/intersphinx_registry/__init__.py
RENAMED
|
@@ -11,7 +11,8 @@ from typing import Dict, Tuple, Set, Optional, cast
|
|
|
11
11
|
# See issue 4, we this the best format is Major.YYMM.day,
|
|
12
12
|
# in case of multiple releases a day we can borrow the next day's date.
|
|
13
13
|
# no 0 in front of the day as it is not pep440 compliant.
|
|
14
|
-
|
|
14
|
+
version_info = (0, 2501, 23)
|
|
15
|
+
__version__ = ".".join(map(str, version_info))
|
|
15
16
|
|
|
16
17
|
registry_file = Path(__file__).parent / "registry.json"
|
|
17
18
|
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
|
|
3
|
+
from . import get_intersphinx_mapping
|
|
4
|
+
from . import __version__
|
|
5
|
+
from urllib.parse import urljoin
|
|
6
|
+
|
|
7
|
+
from typing import Optional
|
|
8
|
+
|
|
9
|
+
from sphinx.util.inventory import InventoryFile
|
|
10
|
+
from io import BytesIO
|
|
11
|
+
|
|
12
|
+
import requests
|
|
13
|
+
|
|
14
|
+
if len(sys.argv) not in [2, 3]:
|
|
15
|
+
sys.exit(
|
|
16
|
+
"""Usage: python -m intersphinx_registry.lookup <package>[,package] [search_term]
|
|
17
|
+
|
|
18
|
+
Example:
|
|
19
|
+
|
|
20
|
+
$ python -m intersphinx_registry.lookup numpy,scipy array
|
|
21
|
+
$ python -m intersphinx_registry.lookup ipython formatters.html
|
|
22
|
+
|
|
23
|
+
"""
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def main():
|
|
28
|
+
print(f"Instersphinx-registry version {__version__}")
|
|
29
|
+
|
|
30
|
+
packages = set(sys.argv[1].split(","))
|
|
31
|
+
|
|
32
|
+
search_term: Optional[str]
|
|
33
|
+
if len(sys.argv) == 3:
|
|
34
|
+
search_term = sys.argv[2]
|
|
35
|
+
else:
|
|
36
|
+
search_term = None
|
|
37
|
+
|
|
38
|
+
# there will be only one url
|
|
39
|
+
urls = [
|
|
40
|
+
(u[0], (u[1] if u[1] else "objects.inv"))
|
|
41
|
+
for u in get_intersphinx_mapping(packages=packages).values()
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
flattened = []
|
|
45
|
+
for base_url, obj in urls:
|
|
46
|
+
|
|
47
|
+
final_url = urljoin(base_url, obj)
|
|
48
|
+
|
|
49
|
+
resp = requests.get(final_url)
|
|
50
|
+
|
|
51
|
+
inv = InventoryFile.load(BytesIO(resp.content), base_url, urljoin)
|
|
52
|
+
|
|
53
|
+
for key, v in inv.items():
|
|
54
|
+
inv_entries = sorted(v.items())
|
|
55
|
+
for entry, (_proj, _ver, url_path, display_name) in inv_entries:
|
|
56
|
+
# display_name = display_name * (display_name != '-')
|
|
57
|
+
flattened.append((key, entry, _proj, _ver, display_name, url_path))
|
|
58
|
+
|
|
59
|
+
filtered = []
|
|
60
|
+
|
|
61
|
+
width = [len(x) for x in flattened[0]]
|
|
62
|
+
|
|
63
|
+
for item in flattened:
|
|
64
|
+
key, entry, proj, version, display_name, url_path = item
|
|
65
|
+
if (
|
|
66
|
+
(search_term is None)
|
|
67
|
+
or (search_term in entry)
|
|
68
|
+
or (search_term in display_name)
|
|
69
|
+
or (search_term in url_path)
|
|
70
|
+
):
|
|
71
|
+
filtered.append((key, entry, proj, version, display_name, url_path))
|
|
72
|
+
width = [max(w, len(x)) for w, x in zip(width, item)]
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
for key, entry, proj, version, display_name, url_path in filtered:
|
|
76
|
+
w_key, w_entry, w_proj, w_version, w_di, w_url = width
|
|
77
|
+
print(
|
|
78
|
+
f"{key:<{w_key}} {entry:<{w_entry}} {proj:<{w_proj}} {version:<{w_version}} {display_name!r:<{w_di+2}} {url_path}"
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
if __name__ == "__main__":
|
|
83
|
+
main()
|
{intersphinx_registry-0.2411.25 → intersphinx_registry-0.2501.23}/intersphinx_registry/registry.json
RENAMED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"asv": ["https://asv.readthedocs.io/en/stable/", null],
|
|
6
6
|
"asyncssh": ["https://asyncssh.readthedocs.io/en/latest/", null],
|
|
7
7
|
"attrs": ["https://www.attrs.org/en/stable/", null],
|
|
8
|
-
"azure-core": ["https://azuresdkdocs.
|
|
9
|
-
"azure-identity": ["https://azuresdkdocs.
|
|
8
|
+
"azure-core": ["https://azuresdkdocs.z19.web.core.windows.net/python/azure-core/latest/", null],
|
|
9
|
+
"azure-identity": ["https://azuresdkdocs.z19.web.core.windows.net/python/azure-identity/latest/", null],
|
|
10
10
|
"bhub": ["https://binderhub.readthedocs.io/en/latest/", null],
|
|
11
11
|
"bokeh": ["https://docs.bokeh.org/en/latest/", null],
|
|
12
12
|
"boltons": ["https://boltons.readthedocs.io/en/latest/", null],
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"cffi": ["https://cffi.readthedocs.io/en/latest/", null],
|
|
17
17
|
"click": ["https://click.palletsprojects.com/", null],
|
|
18
18
|
"commonmark": ["https://commonmarkpy.readthedocs.io/en/stable/", null],
|
|
19
|
-
"conda": ["https://conda.io/en/
|
|
19
|
+
"conda": ["https://docs.conda.io/projects/conda/en/stable/", null],
|
|
20
|
+
"conda-build": ["https://docs.conda.io/projects/conda-build/en/stable/", null],
|
|
20
21
|
"configspace": ["https://automl.github.io/ConfigSpace/latest/", null],
|
|
21
22
|
"cycler": ["https://matplotlib.org/cycler/", null],
|
|
22
23
|
"cython": ["https://docs.cython.org/en/latest/", null],
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
"jupyterbook": ["https://jupyterbook.org/en/stable/", null],
|
|
55
56
|
"jupyterclient": ["https://jupyter-client.readthedocs.io/en/latest/", null],
|
|
56
57
|
"jupytercore": ["https://jupyter-core.readthedocs.io/en/latest/", null],
|
|
58
|
+
"jupyterlite": ["https://jupyterlite.readthedocs.io/en/stable/", null],
|
|
57
59
|
"jupytext": ["https://jupytext.readthedocs.io/en/stable/", null],
|
|
58
60
|
"kwarray": ["https://kwarray.readthedocs.io/en/latest/", null],
|
|
59
61
|
"kwimage": ["https://kwimage.readthedocs.io/en/latest/", null],
|
|
@@ -109,6 +111,7 @@
|
|
|
109
111
|
"pygraphviz": ["https://pygraphviz.github.io/documentation/stable/", null],
|
|
110
112
|
"pymde": ["https://pymde.org/", null],
|
|
111
113
|
"pymongo": ["https://pymongo.readthedocs.io/en/stable/", null],
|
|
114
|
+
"pynput": ["https://pynput.readthedocs.io/en/stable/", null],
|
|
112
115
|
"pynsist": ["https://pynsist.readthedocs.io/en/latest/", null],
|
|
113
116
|
"pyodide": ["https://pyodide.org/en/stable/", null],
|
|
114
117
|
"pypa": ["https://www.pypa.io/en/latest/", null],
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
|
|
3
|
-
from . import get_intersphinx_mapping
|
|
4
|
-
from urllib.parse import urljoin
|
|
5
|
-
|
|
6
|
-
from typing import Optional
|
|
7
|
-
|
|
8
|
-
from sphinx.util.inventory import InventoryFile
|
|
9
|
-
from io import BytesIO
|
|
10
|
-
|
|
11
|
-
import requests
|
|
12
|
-
|
|
13
|
-
if len(sys.argv) not in [2, 3]:
|
|
14
|
-
sys.exit(
|
|
15
|
-
"""Usage: python -m intersphinx_registry.lookup <package>[,package] [search_term]
|
|
16
|
-
|
|
17
|
-
Example:
|
|
18
|
-
|
|
19
|
-
$ python -m intersphinx_registry.lookup numpy,scipy array
|
|
20
|
-
$ python -m intersphinx_registry.lookup ipython formatters.html
|
|
21
|
-
|
|
22
|
-
"""
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
packages = set(sys.argv[1].split(","))
|
|
26
|
-
|
|
27
|
-
search_term: Optional[str]
|
|
28
|
-
if len(sys.argv) == 3:
|
|
29
|
-
search_term = sys.argv[2]
|
|
30
|
-
else:
|
|
31
|
-
search_term = None
|
|
32
|
-
|
|
33
|
-
# there will be only one url
|
|
34
|
-
urls = [
|
|
35
|
-
(u[0], (u[1] if u[1] else "objects.inv"))
|
|
36
|
-
for u in get_intersphinx_mapping(packages=packages).values()
|
|
37
|
-
]
|
|
38
|
-
|
|
39
|
-
flattened = []
|
|
40
|
-
for base_url, obj in urls:
|
|
41
|
-
|
|
42
|
-
final_url = urljoin(base_url, obj)
|
|
43
|
-
|
|
44
|
-
resp = requests.get(final_url)
|
|
45
|
-
|
|
46
|
-
inv = InventoryFile.load(BytesIO(resp.content), base_url, urljoin)
|
|
47
|
-
|
|
48
|
-
for key, v in inv.items():
|
|
49
|
-
inv_entries = sorted(v.items())
|
|
50
|
-
for entry, (_proj, _ver, url_path, display_name) in inv_entries:
|
|
51
|
-
# display_name = display_name * (display_name != '-')
|
|
52
|
-
flattened.append((key, entry, _proj, _ver, display_name, url_path))
|
|
53
|
-
|
|
54
|
-
filtered = []
|
|
55
|
-
|
|
56
|
-
width = [len(x) for x in flattened[0]]
|
|
57
|
-
|
|
58
|
-
for item in flattened:
|
|
59
|
-
key, entry, proj, version, display_name, url_path = item
|
|
60
|
-
if (
|
|
61
|
-
(search_term is None)
|
|
62
|
-
or (search_term in entry)
|
|
63
|
-
or (search_term in display_name)
|
|
64
|
-
or (search_term in url_path)
|
|
65
|
-
):
|
|
66
|
-
filtered.append((key, entry, proj, version, display_name, url_path))
|
|
67
|
-
width = [max(w, len(x)) for w, x in zip(width, item)]
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
for key, entry, proj, version, display_name, url_path in filtered:
|
|
71
|
-
w_key, w_entry, w_proj, w_version, w_di, w_url = width
|
|
72
|
-
print(
|
|
73
|
-
f"{key:<{w_key}} {entry:<{w_entry}} {proj:<{w_proj}} {version:<{w_version}} {display_name!r:<{w_di+2}} {url_path}"
|
|
74
|
-
)
|
|
File without changes
|
|
File without changes
|
{intersphinx_registry-0.2411.25 → intersphinx_registry-0.2501.23}/intersphinx_registry/_info.py
RENAMED
|
File without changes
|
{intersphinx_registry-0.2411.25 → intersphinx_registry-0.2501.23}/intersphinx_registry/py.typed
RENAMED
|
File without changes
|
|
File without changes
|