ogc-na 0.4.5__py3-none-any.whl → 0.4.6__py3-none-any.whl
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.
Potentially problematic release.
This version of ogc-na might be problematic. Click here for more details.
- ogc/na/_version.py +2 -2
- ogc/na/annotate_schema.py +1 -14
- {ogc_na-0.4.5.dist-info → ogc_na-0.4.6.dist-info}/METADATA +1 -1
- {ogc_na-0.4.5.dist-info → ogc_na-0.4.6.dist-info}/RECORD +7 -7
- {ogc_na-0.4.5.dist-info → ogc_na-0.4.6.dist-info}/WHEEL +0 -0
- {ogc_na-0.4.5.dist-info → ogc_na-0.4.6.dist-info}/licenses/LICENSE +0 -0
- {ogc_na-0.4.5.dist-info → ogc_na-0.4.6.dist-info}/top_level.txt +0 -0
ogc/na/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.4.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 4,
|
|
31
|
+
__version__ = version = '0.4.6'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 4, 6)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
ogc/na/annotate_schema.py
CHANGED
|
@@ -538,29 +538,16 @@ class SchemaAnnotator:
|
|
|
538
538
|
updated_refs: set[int] = set()
|
|
539
539
|
|
|
540
540
|
def find_prop_context(prop, context_stack) -> dict | None:
|
|
541
|
-
vocab = UNDEFINED
|
|
542
541
|
for ctx in reversed(context_stack):
|
|
543
|
-
if vocab is UNDEFINED and '@vocab' in ctx:
|
|
544
|
-
vocab = ctx.get('@vocab')
|
|
545
542
|
if prop in ctx:
|
|
546
543
|
prop_ctx = ctx[prop]
|
|
547
544
|
if isinstance(prop_ctx, str):
|
|
548
|
-
if vocab and ':' not in prop_ctx and prop_ctx not in JSON_LD_KEYWORDS:
|
|
549
|
-
prop_ctx = f"{vocab}{prop_ctx}"
|
|
550
545
|
return {'@id': prop_ctx}
|
|
551
|
-
elif '@id' not in prop_ctx and '@reverse' not in prop_ctx
|
|
546
|
+
elif '@id' not in prop_ctx and '@reverse' not in prop_ctx:
|
|
552
547
|
raise ValueError(f'Missing @id for property {prop} in context {json.dumps(ctx, indent=2)}')
|
|
553
548
|
else:
|
|
554
549
|
result = {k: v for k, v in prop_ctx.items() if k in JSON_LD_KEYWORDS}
|
|
555
|
-
if vocab:
|
|
556
|
-
prop_id = result.get('@id')
|
|
557
|
-
if not prop_id:
|
|
558
|
-
result['@id'] = f"{vocab}{prop}"
|
|
559
|
-
elif ':' not in prop_id and prop_id not in JSON_LD_KEYWORDS:
|
|
560
|
-
result['@id'] = f"{vocab}{prop_id}"
|
|
561
550
|
return result
|
|
562
|
-
if vocab != UNDEFINED and isinstance(vocab, str):
|
|
563
|
-
return {'@id': f"{vocab}{prop}"}
|
|
564
551
|
|
|
565
552
|
def process_properties(obj: dict, context_stack: list[dict[str, Any]],
|
|
566
553
|
from_schema: ReferencedSchema, level) -> Iterable[str]:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
ogc/na/__init__.py,sha256=uzcNiJ3uKFNJ1HBfKxIwgAy2HMUFsLAe5RkrUg8ncac,464
|
|
2
|
-
ogc/na/_version.py,sha256=
|
|
3
|
-
ogc/na/annotate_schema.py,sha256=
|
|
2
|
+
ogc/na/_version.py,sha256=18TAUheMEe2us-SdlWuaPoE-optSFboNqdVGdL_jZ0I,704
|
|
3
|
+
ogc/na/annotate_schema.py,sha256=YeDVHBZf-XzRb0TrUa-On2DxQNnsL-ZoVeC8YR2Yry8,43818
|
|
4
4
|
ogc/na/domain_config.py,sha256=ORzITa1rTrD1MQdpWYrIVW5SwSa9lJd3hnyHIxNgiIU,13947
|
|
5
5
|
ogc/na/download.py,sha256=2afrLyl4WsAlxkCgXsl47fs9mNKfDmhVpeT2iwNSoq0,3354
|
|
6
6
|
ogc/na/exceptions.py,sha256=cwvnq79ih90T9lfwJww0zOx_QwuICaUvlo3Mc8m8ouA,85
|
|
@@ -16,8 +16,8 @@ ogc/na/input_filters/__init__.py,sha256=AhE7n_yECwxFKwOM3Jc0ft96TtF5i_Z-fHrS4HYO
|
|
|
16
16
|
ogc/na/input_filters/csv.py,sha256=nFfB1XQF_QApcGGzMqEvzD_b3pBtCtsfUECsZ9UGE6s,2616
|
|
17
17
|
ogc/na/input_filters/xlsx.py,sha256=X9EpFgC9WwHQD8iUJRGdaDYfgiLKjXPdhTVhDmNPAQ0,2730
|
|
18
18
|
ogc/na/input_filters/xml.py,sha256=9qYjp_w5JLInFM48zB15IYH9eTafjp1Aqd_8kfuW3aA,2074
|
|
19
|
-
ogc_na-0.4.
|
|
20
|
-
ogc_na-0.4.
|
|
21
|
-
ogc_na-0.4.
|
|
22
|
-
ogc_na-0.4.
|
|
23
|
-
ogc_na-0.4.
|
|
19
|
+
ogc_na-0.4.6.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
20
|
+
ogc_na-0.4.6.dist-info/METADATA,sha256=umuxzvMR5ssY7yHFKLG6JlUrk41rxRkYm9KoW59Vgzs,3917
|
|
21
|
+
ogc_na-0.4.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
22
|
+
ogc_na-0.4.6.dist-info/top_level.txt,sha256=Kvy3KhzcIhNPT4_nZuJCmS946ptRr_MDyU4IIhZJhCY,4
|
|
23
|
+
ogc_na-0.4.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|