Skip to content

Commit a293958

Browse files
committed
feat
1 parent 7e785f3 commit a293958

6 files changed

Lines changed: 281 additions & 165 deletions

File tree

src/sphinxnotes/data/__init__.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313

1414
from . import meta
1515
from .data import (
16-
Registry,
16+
Registry as DataRegistry,
17+
REGISTRY as DATA_REGISTRY,
1718
PlainValue,
1819
Value,
1920
ValueWrapper,
2021
RawData,
21-
Data,
22+
ParsedData,
2223
Field,
2324
Schema,
2425
)
@@ -33,6 +34,8 @@
3334
BaseDataDefineRole,
3435
BaseDataDefineDirective,
3536
StrictDataDefineDirective,
37+
ExtraContextRegistry,
38+
EXTRACTX_REGISTRY,
3639
)
3740
from .config import Config
3841

@@ -48,7 +51,7 @@
4851
'Value',
4952
'ValueWrapper',
5053
'RawData',
51-
'Data',
54+
'ParsedData',
5255
'Field',
5356
'Schema',
5457
'Phase',
@@ -67,6 +70,17 @@
6770

6871
logger = logging.getLogger(__name__)
6972

73+
class Registry:
74+
"""The global, all-in-one registry for user."""
75+
@property
76+
def data(self) -> DataRegistry:
77+
return DATA_REGISTRY
78+
79+
@property
80+
def extractx(cls) -> ExtraContextRegistry:
81+
return EXTRACTX_REGISTRY
82+
83+
REGISTRY = Registry()
7084

7185
def setup(app: Sphinx):
7286
meta.pre_setup(app)

0 commit comments

Comments
 (0)