pywmdr 0.2.dev7__tar.gz → 0.2.dev9__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.
Files changed (28) hide show
  1. {pywmdr-0.2.dev7/pywmdr.egg-info → pywmdr-0.2.dev9}/PKG-INFO +1 -1
  2. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pyproject.toml +1 -1
  3. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr/pygeoapi_plugin.py +8 -3
  4. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9/pywmdr.egg-info}/PKG-INFO +1 -1
  5. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/LICENSE.md +0 -0
  6. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/README.md +0 -0
  7. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr/__init__.py +0 -0
  8. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr/bundle.py +0 -0
  9. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr/cli_options.py +0 -0
  10. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr/codelists.py +0 -0
  11. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr/errors.py +0 -0
  12. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr/ets.py +0 -0
  13. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr/migrations.py +0 -0
  14. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr/resources/0-20000-0-87582.xml +0 -0
  15. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr/resources/0-20008-0-THE.json +0 -0
  16. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr/resources/ets-report.json +0 -0
  17. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr/util.py +0 -0
  18. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr/wmdr2/__init__.py +0 -0
  19. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr/wmdr2/ets.py +0 -0
  20. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr.egg-info/SOURCES.txt +0 -0
  21. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr.egg-info/dependency_links.txt +0 -0
  22. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr.egg-info/entry_points.txt +0 -0
  23. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr.egg-info/requires.txt +0 -0
  24. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/pywmdr.egg-info/top_level.txt +0 -0
  25. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/setup.cfg +0 -0
  26. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/tests/test_codelists.py +0 -0
  27. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/tests/test_migrations.py +0 -0
  28. {pywmdr-0.2.dev7 → pywmdr-0.2.dev9}/tests/test_wmdr_ets.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pywmdr
3
- Version: 0.2.dev7
3
+ Version: 0.2.dev9
4
4
  Summary: A Python implementation of the test suite for WIGOS Metadata Record
5
5
  Author-email: Tom Kralidis <tomkralidis@gmail.com>
6
6
  Maintainer-email: Tom Kralidis <tomkralidis@gmail.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pywmdr"
7
- version = "0.2.dev7"
7
+ version = "0.2.dev9"
8
8
  description = "A Python implementation of the test suite for WIGOS Metadata Record"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -40,7 +40,7 @@
40
40
  # pywmdr-wmdr2-migrate:
41
41
  # type: process
42
42
  # processor:
43
- # name: pywmdr.pygeoapi_plugin.WMDR1toWMDR2Processor
43
+ # name: pywmdr.pygeoapi_plugin.WMDR2MigrateProcessor
44
44
  #
45
45
  #
46
46
  # 3. (re)start pygeoapi
@@ -54,6 +54,7 @@
54
54
  # provide a developer-friendly interface to test and run requests
55
55
  #
56
56
 
57
+ import html
57
58
  import json
58
59
  import logging
59
60
 
@@ -243,12 +244,16 @@ class WMDR2MigrateProcessor(BaseProcessor):
243
244
 
244
245
  if isinstance(record, str) and record.startswith('http'):
245
246
  LOGGER.debug('Record is a link')
246
- record = json.loads(urlopen_(record).read())
247
+ record = urlopen_(record).read()
247
248
  else:
248
249
  LOGGER.debug('Record is inline')
250
+ record = html.unescape(record)
249
251
 
250
252
  LOGGER.debug('Running ETS against record')
251
- response = Migration(record).migrate()
253
+ migration_ = Migration(record)
254
+ response = migration_.migrate()
255
+ if migration_.warnings:
256
+ response['_errors'] = migration_.warnings
252
257
 
253
258
  return mimetype, response
254
259
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pywmdr
3
- Version: 0.2.dev7
3
+ Version: 0.2.dev9
4
4
  Summary: A Python implementation of the test suite for WIGOS Metadata Record
5
5
  Author-email: Tom Kralidis <tomkralidis@gmail.com>
6
6
  Maintainer-email: Tom Kralidis <tomkralidis@gmail.com>
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