ogc-na 0.4.5__tar.gz → 0.4.7__tar.gz

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.

Files changed (63) hide show
  1. {ogc_na-0.4.5 → ogc_na-0.4.7}/PKG-INFO +1 -1
  2. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/_version.py +3 -3
  3. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/annotate_schema.py +1 -14
  4. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/download.py +4 -0
  5. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc_na.egg-info/PKG-INFO +1 -1
  6. {ogc_na-0.4.5 → ogc_na-0.4.7}/.github/workflows/mkdocs.yml +0 -0
  7. {ogc_na-0.4.5 → ogc_na-0.4.7}/.github/workflows/python-publish.yml +0 -0
  8. {ogc_na-0.4.5 → ogc_na-0.4.7}/.gitignore +0 -0
  9. {ogc_na-0.4.5 → ogc_na-0.4.7}/LICENSE +0 -0
  10. {ogc_na-0.4.5 → ogc_na-0.4.7}/MANIFEST.in +0 -0
  11. {ogc_na-0.4.5 → ogc_na-0.4.7}/README.md +0 -0
  12. {ogc_na-0.4.5 → ogc_na-0.4.7}/docs/examples.md +0 -0
  13. {ogc_na-0.4.5 → ogc_na-0.4.7}/docs/gen_ref_pages.py +0 -0
  14. {ogc_na-0.4.5 → ogc_na-0.4.7}/docs/index.md +0 -0
  15. {ogc_na-0.4.5 → ogc_na-0.4.7}/docs/jsonld-uplift.md +0 -0
  16. {ogc_na-0.4.5 → ogc_na-0.4.7}/docs/tutorials.md +0 -0
  17. {ogc_na-0.4.5 → ogc_na-0.4.7}/mkdocs.yml +0 -0
  18. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/__init__.py +0 -0
  19. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/domain_config.py +0 -0
  20. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/exceptions.py +0 -0
  21. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/gsp.py +0 -0
  22. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/ingest_json.py +0 -0
  23. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/input_filters/__init__.py +0 -0
  24. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/input_filters/csv.py +0 -0
  25. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/input_filters/xlsx.py +0 -0
  26. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/input_filters/xml.py +0 -0
  27. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/models.py +0 -0
  28. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/profile.py +0 -0
  29. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/provenance.py +0 -0
  30. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/update_vocabs.py +0 -0
  31. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/util.py +0 -0
  32. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc/na/validation.py +0 -0
  33. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc_na.egg-info/SOURCES.txt +0 -0
  34. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc_na.egg-info/dependency_links.txt +0 -0
  35. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc_na.egg-info/requires.txt +0 -0
  36. {ogc_na-0.4.5 → ogc_na-0.4.7}/ogc_na.egg-info/top_level.txt +0 -0
  37. {ogc_na-0.4.5 → ogc_na-0.4.7}/pyproject.toml +0 -0
  38. {ogc_na-0.4.5 → ogc_na-0.4.7}/rdf/catalog-v001.xml +0 -0
  39. {ogc_na-0.4.5 → ogc_na-0.4.7}/rdf/domaincfg.vocab.ttl +0 -0
  40. {ogc_na-0.4.5 → ogc_na-0.4.7}/requirements.txt +0 -0
  41. {ogc_na-0.4.5 → ogc_na-0.4.7}/setup.cfg +0 -0
  42. {ogc_na-0.4.5 → ogc_na-0.4.7}/setup.py +0 -0
  43. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/__init__.py +0 -0
  44. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/data/annotate-defs-schema.yml +0 -0
  45. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/data/empty.ttl +0 -0
  46. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/data/headers.csv +0 -0
  47. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/data/headers.xlsx +0 -0
  48. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/data/no-headers.csv +0 -0
  49. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/data/no-headers.xlsx +0 -0
  50. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/data/profile_tree.ttl +0 -0
  51. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/data/profile_tree_cyclic.ttl +0 -0
  52. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/data/sample-context.jsonld +0 -0
  53. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/data/sample-schema-prop-c.yml +0 -0
  54. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/data/sample-schema.yml +0 -0
  55. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/data/schema-anchors.json +0 -0
  56. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/data/schema-vocab.yml +0 -0
  57. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/data/two-sheets.xlsx +0 -0
  58. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/data/uplift_context_valid.yml +0 -0
  59. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/test_annotate_schema.py +0 -0
  60. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/test_ingest_json.py +0 -0
  61. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/test_input_filters_csv.py +0 -0
  62. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/test_input_filters_xlsx.py +0 -0
  63. {ogc_na-0.4.5 → ogc_na-0.4.7}/test/test_profile.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ogc_na
3
- Version: 0.4.5
3
+ Version: 0.4.7
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
@@ -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.7'
32
+ __version_tuple__ = version_tuple = (0, 4, 7)
33
33
 
34
- __commit_id__ = commit_id = 'gf687441ec'
34
+ __commit_id__ = commit_id = 'ge70441585'
@@ -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]:
@@ -20,6 +20,7 @@ def download_file(url: str,
20
20
  dest: str | Path,
21
21
  object_diff: bool = True,
22
22
  ignore_diff_errors: bool = True):
23
+ logger.info('Downloading %s to %s', url, dest)
23
24
  if not isinstance(dest, Path):
24
25
  dest = Path(dest)
25
26
  r = requests.get(url)
@@ -30,12 +31,15 @@ def download_file(url: str,
30
31
  newcontent = util.load_yaml(content=r.content)
31
32
  oldcontent = util.load_yaml(filename=dest)
32
33
  overwrite = newcontent != oldcontent
34
+ if overwrite:
35
+ logger.info('Contents have changed, existing file will be overwritten', dest)
33
36
  except Exception as e:
34
37
  if ignore_diff_errors:
35
38
  logger.warning('Error when loading content for diff: %s', str(e))
36
39
  else:
37
40
  raise
38
41
  if overwrite:
42
+ logger.info('Saving %s', dest)
39
43
  dest.parent.mkdir(parents=True, exist_ok=True)
40
44
  with open(dest, 'wb') as f:
41
45
  f.write(r.content)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ogc_na
3
- Version: 0.4.5
3
+ Version: 0.4.7
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes