geometamaker 0.1.0__py3-none-any.whl → 0.1.2__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 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 = ', '.join(e['loc'])
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)
@@ -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
- messages.append(error)
478
- else:
479
- messages.append('')
478
+ msg = error
480
479
  except ValueError:
481
- messages.append(
482
- 'does not appear to be a geometamaker document')
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.0
3
+ Version: 0.1.2
4
4
  Summary: metadata creation for geospatial data
5
5
  Maintainer: Natural Capital Project Software Team
6
6
  License:
@@ -219,11 +219,23 @@ 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: <3.13,>=3.9
225
+ Requires-Python: >=3.9
225
226
  Description-Content-Type: text/markdown
226
227
  License-File: LICENSE.txt
228
+ Requires-Dist: aiohttp
229
+ Requires-Dist: click
230
+ Requires-Dist: fsspec
231
+ Requires-Dist: GDAL
232
+ Requires-Dist: frictionless>=5.10.0
233
+ Requires-Dist: numpy
234
+ Requires-Dist: platformdirs
235
+ Requires-Dist: Pydantic>=2.0
236
+ Requires-Dist: pygeoprocessing>=2.4.5
237
+ Requires-Dist: pyyaml
238
+ Requires-Dist: requests
227
239
 
228
240
  A Python library for creating human and machine-readable metadata for geospatial data.
229
241
 
@@ -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.2.dist-info/LICENSE.txt,sha256=Pd-b5cKP4n2tFDpdx27qJSIq0d1ok0oEcGTlbtL6QMU,11560
8
+ geometamaker-0.1.2.dist-info/METADATA,sha256=b2A4cOatxVrlv02MHxo66PrghdVgf5rx_rx_VxONIuI,18969
9
+ geometamaker-0.1.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
10
+ geometamaker-0.1.2.dist-info/entry_points.txt,sha256=fY8nmpxmOO5kA47EBpKBKzaq3uZ1tWPA1sBgRJKvVU4,54
11
+ geometamaker-0.1.2.dist-info/top_level.txt,sha256=cm34aKGvrHyEgqNXi3Cx9LTU1Sm79r1RkpQZpy9MoxA,13
12
+ geometamaker-0.1.2.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,,