geometamaker 0.1.0__py3-none-any.whl → 0.1.1__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.
- geometamaker/cli.py +1 -1
- geometamaker/geometamaker.py +7 -5
- geometamaker/models.py +3 -3
- {geometamaker-0.1.0.dist-info → geometamaker-0.1.1.dist-info}/METADATA +3 -2
- geometamaker-0.1.1.dist-info/RECORD +12 -0
- geometamaker-0.1.0.dist-info/RECORD +0 -12
- {geometamaker-0.1.0.dist-info → geometamaker-0.1.1.dist-info}/LICENSE.txt +0 -0
- {geometamaker-0.1.0.dist-info → geometamaker-0.1.1.dist-info}/WHEEL +0 -0
- {geometamaker-0.1.0.dist-info → geometamaker-0.1.1.dist-info}/entry_points.txt +0 -0
- {geometamaker-0.1.0.dist-info → geometamaker-0.1.1.dist-info}/top_level.txt +0 -0
geometamaker/cli.py
CHANGED
|
@@ -48,7 +48,7 @@ def echo_validation_error(error, filepath):
|
|
|
48
48
|
summary = u'\u2715' + f' {filepath}: {error.error_count()} validation errors'
|
|
49
49
|
click.secho(summary, fg='bright_red')
|
|
50
50
|
for e in error.errors():
|
|
51
|
-
location = '
|
|
51
|
+
location = '.'.join([str(loc) for loc in e['loc']])
|
|
52
52
|
msg_string = (f" {e['msg']}. [input_value={e['input']}, "
|
|
53
53
|
f"input_type={type(e['input']).__name__}]")
|
|
54
54
|
click.secho(location, bold=True)
|
geometamaker/geometamaker.py
CHANGED
|
@@ -471,15 +471,17 @@ def validate_dir(directory, recursive=False):
|
|
|
471
471
|
for filepath in file_list:
|
|
472
472
|
if filepath.endswith('.yml'):
|
|
473
473
|
yaml_files.append(filepath)
|
|
474
|
+
msg = ''
|
|
474
475
|
try:
|
|
475
476
|
error = validate(filepath)
|
|
476
477
|
if error:
|
|
477
|
-
|
|
478
|
-
else:
|
|
479
|
-
messages.append('')
|
|
478
|
+
msg = error
|
|
480
479
|
except ValueError:
|
|
481
|
-
|
|
482
|
-
|
|
480
|
+
msg = 'does not appear to be a geometamaker document'
|
|
481
|
+
except yaml.YAMLError as exc:
|
|
482
|
+
LOGGER.debug(exc)
|
|
483
|
+
msg = 'is not a readable yaml document'
|
|
484
|
+
messages.append(msg)
|
|
483
485
|
|
|
484
486
|
return (yaml_files, messages)
|
|
485
487
|
|
geometamaker/models.py
CHANGED
|
@@ -91,7 +91,7 @@ class BandSchema(Parent):
|
|
|
91
91
|
index: int
|
|
92
92
|
gdal_type: str
|
|
93
93
|
numpy_type: str
|
|
94
|
-
nodata: Union[int, float]
|
|
94
|
+
nodata: Union[int, float, None]
|
|
95
95
|
description: str = ''
|
|
96
96
|
title: str = ''
|
|
97
97
|
units: str = ''
|
|
@@ -242,7 +242,7 @@ class Profile(BaseMetadata):
|
|
|
242
242
|
target_path (str): path to a yaml file to be written
|
|
243
243
|
|
|
244
244
|
"""
|
|
245
|
-
with open(target_path, 'w') as file:
|
|
245
|
+
with open(target_path, 'w', encoding='utf-8') as file:
|
|
246
246
|
file.write(utils.yaml_dump(self.model_dump()))
|
|
247
247
|
|
|
248
248
|
|
|
@@ -523,7 +523,7 @@ class Resource(BaseMetadata):
|
|
|
523
523
|
target_path = os.path.join(
|
|
524
524
|
workspace, os.path.basename(self.metadata_path))
|
|
525
525
|
|
|
526
|
-
with open(target_path, 'w') as file:
|
|
526
|
+
with open(target_path, 'w', encoding='utf-8') as file:
|
|
527
527
|
file.write(utils.yaml_dump(
|
|
528
528
|
self.model_dump(exclude=['metadata_path'])))
|
|
529
529
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: geometamaker
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: metadata creation for geospatial data
|
|
5
5
|
Maintainer: Natural Capital Project Software Team
|
|
6
6
|
License:
|
|
@@ -219,9 +219,10 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
219
219
|
Classifier: Programming Language :: Python :: 3.10
|
|
220
220
|
Classifier: Programming Language :: Python :: 3.11
|
|
221
221
|
Classifier: Programming Language :: Python :: 3.12
|
|
222
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
222
223
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
223
224
|
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
224
|
-
Requires-Python:
|
|
225
|
+
Requires-Python: >=3.9
|
|
225
226
|
Description-Content-Type: text/markdown
|
|
226
227
|
License-File: LICENSE.txt
|
|
227
228
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
geometamaker/__init__.py,sha256=b3nR9UoJ7mWbD4z87B9BbrcnswpWEHgh9tC2SBvDYy4,391
|
|
2
|
+
geometamaker/cli.py,sha256=87-ZDiReWuqyWPGkRMedJVWmIhcMC41TUtgiqqz6E1k,6277
|
|
3
|
+
geometamaker/config.py,sha256=6xsBkU57QJlmehP0PcHL-f8Ev0KmYdrBrDb9IW5z99U,1974
|
|
4
|
+
geometamaker/geometamaker.py,sha256=JQpsNXo7EU_J11aZnN1RSPufw7L3DDf_nAvoevPLRJA,18522
|
|
5
|
+
geometamaker/models.py,sha256=aANY0vCKAz2gx4vIH0qnGicIhPXLTLZgXnByWOg-ER8,19054
|
|
6
|
+
geometamaker/utils.py,sha256=RLFtobLdUAeJEKBnzsQmC2h-eJTYn22tjNPAq261EhE,932
|
|
7
|
+
geometamaker-0.1.1.dist-info/LICENSE.txt,sha256=Pd-b5cKP4n2tFDpdx27qJSIq0d1ok0oEcGTlbtL6QMU,11560
|
|
8
|
+
geometamaker-0.1.1.dist-info/METADATA,sha256=4fqXeDNFxQT_X_JWkpKqXjH0_-SayMdf2fta57ubLNc,18674
|
|
9
|
+
geometamaker-0.1.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
10
|
+
geometamaker-0.1.1.dist-info/entry_points.txt,sha256=fY8nmpxmOO5kA47EBpKBKzaq3uZ1tWPA1sBgRJKvVU4,54
|
|
11
|
+
geometamaker-0.1.1.dist-info/top_level.txt,sha256=cm34aKGvrHyEgqNXi3Cx9LTU1Sm79r1RkpQZpy9MoxA,13
|
|
12
|
+
geometamaker-0.1.1.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
geometamaker/__init__.py,sha256=b3nR9UoJ7mWbD4z87B9BbrcnswpWEHgh9tC2SBvDYy4,391
|
|
2
|
-
geometamaker/cli.py,sha256=PYD5kKz2iBnzQnwZBdk78RdBRiGj4InWTB2Xy-gihWM,6256
|
|
3
|
-
geometamaker/config.py,sha256=6xsBkU57QJlmehP0PcHL-f8Ev0KmYdrBrDb9IW5z99U,1974
|
|
4
|
-
geometamaker/geometamaker.py,sha256=B4fFSvz8z-EF4VtVFnS6o50rAgasPM3PSyUGvl2H0gk,18439
|
|
5
|
-
geometamaker/models.py,sha256=AoODNiUyla7Kzwh_4jQFEcHtMpWKiY7GvUvcnxsI9dE,19012
|
|
6
|
-
geometamaker/utils.py,sha256=RLFtobLdUAeJEKBnzsQmC2h-eJTYn22tjNPAq261EhE,932
|
|
7
|
-
geometamaker-0.1.0.dist-info/LICENSE.txt,sha256=Pd-b5cKP4n2tFDpdx27qJSIq0d1ok0oEcGTlbtL6QMU,11560
|
|
8
|
-
geometamaker-0.1.0.dist-info/METADATA,sha256=rgdFjcEZn25uc3u7Ox-S6AhrbrffmbsTP-fr-B4LvUo,18628
|
|
9
|
-
geometamaker-0.1.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
10
|
-
geometamaker-0.1.0.dist-info/entry_points.txt,sha256=fY8nmpxmOO5kA47EBpKBKzaq3uZ1tWPA1sBgRJKvVU4,54
|
|
11
|
-
geometamaker-0.1.0.dist-info/top_level.txt,sha256=cm34aKGvrHyEgqNXi3Cx9LTU1Sm79r1RkpQZpy9MoxA,13
|
|
12
|
-
geometamaker-0.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|