ogc-na 0.3.46__py3-none-any.whl → 0.3.47__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
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.3.46'
16
- __version_tuple__ = version_tuple = (0, 3, 46)
15
+ __version__ = version = '0.3.47'
16
+ __version_tuple__ = version_tuple = (0, 3, 47)
ogc/na/annotate_schema.py CHANGED
@@ -688,6 +688,9 @@ class ContextBuilder:
688
688
  if prefixes:
689
689
  own_context.update(prefixes)
690
690
 
691
+ # store processed $defs and definitions to avoid parsing them twice
692
+ processed_refs = set()
693
+
691
694
  def read_properties(subschema: dict, from_schema: ReferencedSchema,
692
695
  onto_context: dict, schema_path: list[str]) -> dict | None:
693
696
  if schema_path:
@@ -746,6 +749,8 @@ class ContextBuilder:
746
749
 
747
750
  if '$ref' in subschema:
748
751
  ref = subschema['$ref']
752
+ ref_path_str = f"{from_schema.location}{ref}"
753
+ processed_refs.add(ref_path_str)
749
754
  referenced_schema = self.schema_resolver.resolve_schema(ref, from_schema)
750
755
  if referenced_schema:
751
756
  process_subschema(referenced_schema.subschema, referenced_schema, onto_context,
@@ -767,6 +772,15 @@ class ContextBuilder:
767
772
  if isinstance(pp, dict):
768
773
  process_subschema(pp, from_schema, onto_context, schema_path + [pp_k])
769
774
 
775
+ for p in ('definitions', '$defs'):
776
+ defs = subschema.get(p)
777
+ if defs and isinstance(defs, dict):
778
+ for entry_key, entry in defs.items():
779
+ def_path = schema_path + [entry_key]
780
+ def_path_str = f"{from_schema.location}#{'/'.join(def_path)}"
781
+ if def_path_str not in processed_refs:
782
+ process_subschema(entry, from_schema, onto_context, def_path)
783
+
770
784
  if ANNOTATION_EXTRA_TERMS in subschema:
771
785
  for extra_term, extra_term_context in subschema[ANNOTATION_EXTRA_TERMS].items():
772
786
  if extra_term not in onto_context:
ogc/na/domain_config.py CHANGED
@@ -11,7 +11,7 @@ from pathlib import Path
11
11
  from typing import Union, Optional, Sequence, cast, IO, TypeVar, Iterable
12
12
 
13
13
  import wcmatch.glob
14
- from rdflib import Graph, Namespace, URIRef, DCTERMS, DCAT, Literal
14
+ from rdflib import Graph, Namespace, URIRef, DCTERMS, DCAT, Literal, RDF
15
15
  from wcmatch.glob import globmatch
16
16
 
17
17
  from ogc.na.profile import ProfileRegistry
@@ -214,7 +214,7 @@ class DomainConfiguration:
214
214
 
215
215
  identifier = cfg_graph.value(cfg_ref, DCTERMS.identifier) or str(cfg_ref)
216
216
 
217
- if profile_refs:
217
+ if (cfg_ref, RDF.type, DCFG.DomainConfiguration) in cfg_graph:
218
218
  self.entries.append(DomainConfigurationEntry(
219
219
  working_directory=self.working_directory,
220
220
  glob=globs,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ogc_na
3
- Version: 0.3.46
3
+ Version: 0.3.47
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
  Project-URL: Homepage, https://github.com/opengeospatial/ogc-na-tools/
@@ -1,7 +1,7 @@
1
1
  ogc/na/__init__.py,sha256=uzcNiJ3uKFNJ1HBfKxIwgAy2HMUFsLAe5RkrUg8ncac,464
2
- ogc/na/_version.py,sha256=nKT1cOpmRV-LeICJaPCDMdhIUkMGhRcN3p0Hyw8DrwA,413
3
- ogc/na/annotate_schema.py,sha256=bVzQ-YjQ0ULJxaLxWk5ZFaVTKky2TbEY91VlYMqxmSs,40335
4
- ogc/na/domain_config.py,sha256=C6ao37dbXEKv_K7WcfzQgI3H1Hr3c4-3p24hgl2oH54,13896
2
+ ogc/na/_version.py,sha256=MU1To0oLGMljUY5xtLtnFwxvNZIg8MhRIqWxqn6vDSQ,413
3
+ ogc/na/annotate_schema.py,sha256=1W0gS190-s1f9cnmjzPakM82YB15aBYCHl1mmy2SehM,41052
4
+ ogc/na/domain_config.py,sha256=ORzITa1rTrD1MQdpWYrIVW5SwSa9lJd3hnyHIxNgiIU,13947
5
5
  ogc/na/download.py,sha256=2afrLyl4WsAlxkCgXsl47fs9mNKfDmhVpeT2iwNSoq0,3354
6
6
  ogc/na/gsp.py,sha256=KGa2G9i8kPefYTHNPUDoXnNyF7Tiwt8K__Ew_Qa7eeg,6048
7
7
  ogc/na/ingest_json.py,sha256=V_hZmU8veM6YqARjh8jy50dyhVCcjLLpjdXH6duTL_Y,35503
@@ -14,7 +14,7 @@ ogc/na/validation.py,sha256=5xjHH55NZKM8HtUk8XgVzm8W5ZlZY00u_qsWfXK_8dM,3732
14
14
  ogc/na/input_filters/__init__.py,sha256=AhE7n_yECwxFKwOM3Jc0ft96TtF5i_Z-fHrS4HYOjaE,1179
15
15
  ogc/na/input_filters/csv.py,sha256=nFfB1XQF_QApcGGzMqEvzD_b3pBtCtsfUECsZ9UGE6s,2616
16
16
  ogc/na/input_filters/xml.py,sha256=9qYjp_w5JLInFM48zB15IYH9eTafjp1Aqd_8kfuW3aA,2074
17
- ogc_na-0.3.46.dist-info/METADATA,sha256=gMk9QGd1n214nQuZUPe3vp7RdERy5yCus7q1lWTdJFk,3829
18
- ogc_na-0.3.46.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
19
- ogc_na-0.3.46.dist-info/top_level.txt,sha256=Kvy3KhzcIhNPT4_nZuJCmS946ptRr_MDyU4IIhZJhCY,4
20
- ogc_na-0.3.46.dist-info/RECORD,,
17
+ ogc_na-0.3.47.dist-info/METADATA,sha256=t22dnhWzSyECXYG8MiMqXAiTv3Hk-TYJGxV6mNN9MUY,3829
18
+ ogc_na-0.3.47.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
19
+ ogc_na-0.3.47.dist-info/top_level.txt,sha256=Kvy3KhzcIhNPT4_nZuJCmS946ptRr_MDyU4IIhZJhCY,4
20
+ ogc_na-0.3.47.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (70.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5