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 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.5'
32
- __version_tuple__ = version_tuple = (0, 4, 5)
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 and not vocab:
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
  Metadata-Version: 2.4
2
2
  Name: ogc_na
3
- Version: 0.4.5
3
+ Version: 0.4.6
4
4
  Summary: OGC Naming Authority tools
5
5
  Author-email: Rob Atkinson <ratkinson@ogc.org>, Piotr Zaborowski <pzaborowski@ogc.org>, Alejandro Villar <avillar@ogc.org>
6
6
  License-Expression: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  ogc/na/__init__.py,sha256=uzcNiJ3uKFNJ1HBfKxIwgAy2HMUFsLAe5RkrUg8ncac,464
2
- ogc/na/_version.py,sha256=4nCeAo6j-wL_OKq7GV7I-Pvif2nNPnyKifWxv88z0Y4,704
3
- ogc/na/annotate_schema.py,sha256=QgBeFYpE5cBRe8YVrKPdcJj2S4eKNEhmzSwcBQq9U2c,44589
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.5.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
20
- ogc_na-0.4.5.dist-info/METADATA,sha256=1ZqCMdhvmIWLv9wquPSJRUycQBrCRMLk1KhHWSh0nqo,3917
21
- ogc_na-0.4.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
- ogc_na-0.4.5.dist-info/top_level.txt,sha256=Kvy3KhzcIhNPT4_nZuJCmS946ptRr_MDyU4IIhZJhCY,4
23
- ogc_na-0.4.5.dist-info/RECORD,,
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