Skip to content

Commit aec21f5

Browse files
committed
Ensure REGISTRY shows up in the docs.
1 parent 25dc542 commit aec21f5

File tree

5 files changed

+23
-7
lines changed

5 files changed

+23
-7
lines changed

docs/conf.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import importlib.metadata
22
import re
33

4+
HOMEPAGE = "https://github.com/python-jsonschema/jsonschema-specifications"
5+
46
project = "jsonschema-specifications"
57
author = "Julian Berman"
68
copyright = f"2022, {author}"
@@ -38,12 +40,19 @@ def entire_domain(host):
3840

3941
linkcheck_ignore = [
4042
entire_domain("img.shields.io"),
41-
"https://github.com/python-jsonschema/jsonschema/actions",
42-
"https://github.com/python-jsonschema/jsonschema/workflows/CI/badge.svg",
43+
f"{HOMEPAGE}/actions",
44+
f"{HOMEPAGE}/workflows/CI/badge.svg",
4345
]
4446

4547
# = Extensions =
4648

49+
# -- autodoc --
50+
51+
autodoc_default_options = {
52+
"members": True,
53+
"member-order": "bysource",
54+
}
55+
4756
# -- autosectionlabel --
4857

4958
autosectionlabel_prefix_document = True

docs/spelling-wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
metaschemas
22
runtime
3+
schemas

docs/spelling_wordlist.txt

Whitespace-only changes.

jsonschema_specifications/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
from jsonschema_specifications._core import REGISTRY # noqa: F401
1+
from referencing import Registry as _Registry
2+
from referencing.jsonschema import SchemaRegistry as _SchemaRegistry
3+
4+
from jsonschema_specifications._core import _schemas
5+
6+
#: A `referencing.jsonschema.SchemaRegistry` containing all of the official
7+
#: meta-schemas and vocabularies.
8+
REGISTRY: _SchemaRegistry = (_schemas() @ _Registry()).crawl()
9+
10+
__all__ = ["REGISTRY"]

jsonschema_specifications/_core.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
except ImportError:
1010
from importlib_resources import files # type: ignore
1111

12-
from referencing import Registry, Resource
12+
from referencing import Resource
1313

1414

1515
def _schemas():
@@ -31,6 +31,3 @@ def _schemas():
3131
for path in children:
3232
contents = json.loads(path.read_text())
3333
yield Resource.from_contents(contents)
34-
35-
36-
REGISTRY: Registry = (_schemas() @ Registry()).crawl()

0 commit comments

Comments
 (0)