geometamaker 0.1.2__tar.gz → 0.2.1__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.
- {geometamaker-0.1.2 → geometamaker-0.2.1}/.github/workflows/test.yml +1 -1
- geometamaker-0.2.1/HISTORY.rst +76 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/PKG-INFO +34 -44
- {geometamaker-0.1.2 → geometamaker-0.2.1}/README.md +29 -40
- {geometamaker-0.1.2 → geometamaker-0.2.1}/docs/environment-rtd.yml +4 -0
- geometamaker-0.2.1/docs/source/archive_resource.rst +6 -0
- geometamaker-0.2.1/docs/source/basic_usage.rst +5 -0
- geometamaker-0.2.1/docs/source/collection_resource.rst +6 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/docs/source/conf.py +25 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/docs/source/index.rst +15 -1
- geometamaker-0.2.1/docs/source/installation.rst +25 -0
- geometamaker-0.2.1/docs/source/metadata_resources.rst +11 -0
- geometamaker-0.2.1/docs/source/profile.rst +6 -0
- geometamaker-0.2.1/docs/source/raster_resource.rst +6 -0
- geometamaker-0.2.1/docs/source/table_resource.rst +6 -0
- geometamaker-0.2.1/docs/source/vector_resource.rst +6 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/pyproject.toml +2 -2
- {geometamaker-0.1.2 → geometamaker-0.2.1}/src/geometamaker/__init__.py +2 -2
- geometamaker-0.2.1/src/geometamaker/cli.py +264 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/src/geometamaker/config.py +3 -4
- geometamaker-0.2.1/src/geometamaker/geometamaker.py +773 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/src/geometamaker/models.py +317 -114
- {geometamaker-0.1.2 → geometamaker-0.2.1}/src/geometamaker.egg-info/PKG-INFO +34 -44
- {geometamaker-0.1.2 → geometamaker-0.2.1}/src/geometamaker.egg-info/SOURCES.txt +12 -1
- geometamaker-0.2.1/tests/data/0.1.2/vector.geojson +8 -0
- geometamaker-0.2.1/tests/data/0.1.2/vector.geojson.yml +63 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/tests/test_geometamaker.py +410 -82
- geometamaker-0.2.1/tests/test_migrations.py +43 -0
- geometamaker-0.1.2/HISTORY.rst +0 -23
- geometamaker-0.1.2/src/geometamaker/cli.py +0 -158
- geometamaker-0.1.2/src/geometamaker/geometamaker.py +0 -531
- geometamaker-0.1.2/tests/data/template.yml +0 -68
- {geometamaker-0.1.2 → geometamaker-0.2.1}/.readthedocs.yml +0 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/LICENSE.txt +0 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/docs/Makefile +0 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/docs/make.bat +0 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/requirements.txt +0 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/setup.cfg +0 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/src/geometamaker/utils.py +0 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/src/geometamaker.egg-info/dependency_links.txt +0 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/src/geometamaker.egg-info/entry_points.txt +0 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/src/geometamaker.egg-info/requires.txt +0 -0
- {geometamaker-0.1.2 → geometamaker-0.2.1}/src/geometamaker.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
Release History
|
|
2
|
+
===============
|
|
3
|
+
|
|
4
|
+
0.2.1 (2026-02-02)
|
|
5
|
+
------------------
|
|
6
|
+
* Make sure that the option to compute band statistics will include
|
|
7
|
+
STATISTICS_VALID_PERCENT. https://github.com/natcap/geometamaker/issues/106
|
|
8
|
+
* Improve the error message if frictionless raises an exception while
|
|
9
|
+
trying to detect a filetype.
|
|
10
|
+
https://github.com/natcap/geometamaker/issues/107
|
|
11
|
+
* Fixed bug where non-ascii characters in filepaths raised an exception
|
|
12
|
+
in ``describe``. https://github.com/natcap/geometamaker/issues/112
|
|
13
|
+
|
|
14
|
+
0.2.0 (2025-07-22)
|
|
15
|
+
------------------
|
|
16
|
+
* Allow CLI to ``describe`` remote datasets.
|
|
17
|
+
https://github.com/natcap/geometamaker/issues/78
|
|
18
|
+
* Add support for describing tar gzip files in the same manner as zip
|
|
19
|
+
archives. https://github.com/natcap/geometamaker/issues/26
|
|
20
|
+
* Metadata documents for raster and vector datasets now include metadata
|
|
21
|
+
key:value pairs that are defined on the GDAL raster, band, vector, and
|
|
22
|
+
layer objects. https://github.com/natcap/geometamaker/issues/68
|
|
23
|
+
* Added an option to compute raster band statistics when calling ``describe``.
|
|
24
|
+
Statistics are included in the ``gdal_metadata`` section of metadata documents.
|
|
25
|
+
https://github.com/natcap/geometamaker/issues/77
|
|
26
|
+
* Vector metadata documents now include a 'data_model.layers' section
|
|
27
|
+
for properties of the dataset that are specific to the layer.
|
|
28
|
+
Existing metadata documents can be migrated to this new schema by
|
|
29
|
+
calling ``describe`` on the vector dataset. GeoMetaMaker still only
|
|
30
|
+
supports describing metadata for the first layer in a vector dataset.
|
|
31
|
+
https://github.com/natcap/geometamaker/issues/28
|
|
32
|
+
* Add support for describing folders as collections, generating a single
|
|
33
|
+
metadata file listing contained files along with their descriptions and
|
|
34
|
+
metadata. https://github.com/natcap/geometamaker/issues/66
|
|
35
|
+
* ``describe_dir`` has been deprecated as this functionality can be achieved
|
|
36
|
+
with ``describe_collection``. https://github.com/natcap/geometamaker/issues/98
|
|
37
|
+
* Existing attributes are now preserved when calling
|
|
38
|
+
``describe_collection`` on collection with existing metadata.
|
|
39
|
+
https://github.com/natcap/geometamaker/issues/95
|
|
40
|
+
* Removed the ``profile`` argument to ``describe``. ``set_contact`` and
|
|
41
|
+
``set_license`` can still be used to set those metadata properties.
|
|
42
|
+
``Config`` can still be used to create and store a default profile.
|
|
43
|
+
https://github.com/natcap/geometamaker/issues/92
|
|
44
|
+
* If an invalid metadata document exists when a dataset or collection is
|
|
45
|
+
described, do not prevent creation of a new metadata document.
|
|
46
|
+
Invalid/incompatible documents will be renamed by adding a '.bak' extension
|
|
47
|
+
before the new metadata document replaces them.
|
|
48
|
+
https://github.com/natcap/geometamaker/issues/89
|
|
49
|
+
* ``geometamaker describe``, when given a directory, will create a
|
|
50
|
+
"-metadata.yml" document for that directory, as well as metadata documents
|
|
51
|
+
for all datasets within.
|
|
52
|
+
https://github.com/natcap/geometamaker/issues/94
|
|
53
|
+
* ``geometamaker.validate_dir`` was updated to use the ``depth`` argument
|
|
54
|
+
instead of ``recursive``.
|
|
55
|
+
* If ``describe`` is called on a directory, a helpful error message is raised.
|
|
56
|
+
https://github.com/natcap/geometamaker/issues/98
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
0.1.2 (2025-02-05)
|
|
60
|
+
------------------
|
|
61
|
+
* Declared dependencies in ``pyproject.toml`` to facilitate pip installs.
|
|
62
|
+
|
|
63
|
+
0.1.1 (2025-02-04)
|
|
64
|
+
------------------
|
|
65
|
+
* Fixed a bug where rasters without a defined nodata value could not be
|
|
66
|
+
described. https://github.com/natcap/geometamaker/issues/70
|
|
67
|
+
* All YAML documents will be written as UTF-8 encoded files.
|
|
68
|
+
https://github.com/natcap/geometamaker/issues/71
|
|
69
|
+
* Fixed a bug in formatting of validation messages about nested attributes
|
|
70
|
+
https://github.com/natcap/geometamaker/issues/65
|
|
71
|
+
* Added exception handling to make validating directories more resilient to
|
|
72
|
+
unreadable yaml files. https://github.com/natcap/geometamaker/issues/62
|
|
73
|
+
|
|
74
|
+
0.1.0 (2025-01-10)
|
|
75
|
+
------------------
|
|
76
|
+
* First release!
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: geometamaker
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: metadata creation for geospatial data
|
|
5
|
-
Maintainer: Natural Capital
|
|
5
|
+
Maintainer: Natural Capital Alliance Software Team
|
|
6
6
|
License:
|
|
7
7
|
Apache License
|
|
8
8
|
Version 2.0, January 2004
|
|
@@ -215,11 +215,11 @@ Classifier: Operating System :: MacOS :: MacOS X
|
|
|
215
215
|
Classifier: Operating System :: Microsoft
|
|
216
216
|
Classifier: Operating System :: POSIX
|
|
217
217
|
Classifier: Programming Language :: Python :: 3
|
|
218
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
219
218
|
Classifier: Programming Language :: Python :: 3.10
|
|
220
219
|
Classifier: Programming Language :: Python :: 3.11
|
|
221
220
|
Classifier: Programming Language :: Python :: 3.12
|
|
222
221
|
Classifier: Programming Language :: Python :: 3.13
|
|
222
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
223
223
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
224
224
|
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
225
225
|
Requires-Python: >=3.9
|
|
@@ -236,16 +236,23 @@ Requires-Dist: Pydantic>=2.0
|
|
|
236
236
|
Requires-Dist: pygeoprocessing>=2.4.5
|
|
237
237
|
Requires-Dist: pyyaml
|
|
238
238
|
Requires-Dist: requests
|
|
239
|
+
Dynamic: license-file
|
|
239
240
|
|
|
240
|
-
|
|
241
|
+
## Introduction
|
|
242
|
+
|
|
243
|
+
GeoMetaMaker is a Python library for creating human and machine-readable
|
|
244
|
+
metadata for geospatial, tabular, and other data formats.
|
|
241
245
|
|
|
242
246
|
Supported datatypes include:
|
|
243
247
|
* everything supported by GDAL
|
|
244
248
|
* tabular formats supported by `frictionless`
|
|
245
249
|
* compressed formats supported by `frictionless`
|
|
246
250
|
|
|
251
|
+
## Installation
|
|
252
|
+
|
|
253
|
+
`mamba install -c conda-forge geometamaker`
|
|
247
254
|
|
|
248
|
-
|
|
255
|
+
## Basic Usage
|
|
249
256
|
|
|
250
257
|
This library comes with a command-line interface (CLI) called `geometamaker`.
|
|
251
258
|
Many of the examples below show how to use the Python interface, and then
|
|
@@ -282,6 +289,8 @@ resource.set_band_description(
|
|
|
282
289
|
|
|
283
290
|
resource.write()
|
|
284
291
|
```
|
|
292
|
+
For a complete list of methods and attributes:
|
|
293
|
+
https://geometamaker.readthedocs.io/en/latest/index.html
|
|
285
294
|
|
|
286
295
|
##### CLI
|
|
287
296
|
```
|
|
@@ -293,22 +302,30 @@ user-input. If you create a metadata document with the CLI, you may wish
|
|
|
293
302
|
to add these values manually by editing the
|
|
294
303
|
`watershed_gura.shp.yml` file in a text editor.
|
|
295
304
|
|
|
296
|
-
### Creating metadata for a
|
|
305
|
+
### Creating metadata for a collection of files:
|
|
306
|
+
Users can create a single metadata document to describe a directory of
|
|
307
|
+
files, with the option of excluding some files using a regular expression,
|
|
308
|
+
or limiting the number of subdirectory levels to traverse using the
|
|
309
|
+
`depth` or `-d` flag.
|
|
297
310
|
|
|
298
311
|
#### Python
|
|
299
312
|
```python
|
|
300
|
-
import os
|
|
301
|
-
|
|
302
313
|
import geometamaker
|
|
303
314
|
|
|
304
|
-
|
|
305
|
-
geometamaker.
|
|
315
|
+
collection_path = 'invest/data/invest-sample-data'
|
|
316
|
+
metadata = geometamaker.describe_collection(collection_path,
|
|
317
|
+
depth=2,
|
|
318
|
+
exclude_regex=r'.*\.json$',
|
|
319
|
+
describe_files=True)
|
|
320
|
+
metadata.write()
|
|
306
321
|
```
|
|
307
322
|
|
|
308
323
|
#### CLI
|
|
309
324
|
```
|
|
310
|
-
geometamaker describe -
|
|
325
|
+
geometamaker describe -d 2 --exclude .*\.json$ data/invest-sample-data
|
|
311
326
|
```
|
|
327
|
+
These examples will create `invest-sample-data-metadata.yml` as well as
|
|
328
|
+
create individual `.yml` documents for each dataset within the directory.
|
|
312
329
|
|
|
313
330
|
### Validating a metadata document:
|
|
314
331
|
If you have manually edited a `.yml` metadata document,
|
|
@@ -328,7 +345,7 @@ print(error)
|
|
|
328
345
|
geometamaker validate data/watershed_gura.shp.yml
|
|
329
346
|
```
|
|
330
347
|
|
|
331
|
-
### Validating all metadata documents in a directory
|
|
348
|
+
### Validating all metadata documents in a directory:
|
|
332
349
|
|
|
333
350
|
##### Python
|
|
334
351
|
```python
|
|
@@ -352,13 +369,10 @@ to all datasets they describe. Profiles can include `contact` information
|
|
|
352
369
|
and/or `license` information.
|
|
353
370
|
|
|
354
371
|
A profile can be saved to a configuration file so that it will be re-used
|
|
355
|
-
everytime you use `geometamaker`.
|
|
356
|
-
during runtime, which takes precedence over a profile in the config file.
|
|
372
|
+
everytime you use `geometamaker`.
|
|
357
373
|
|
|
358
|
-
|
|
374
|
+
##### Python
|
|
359
375
|
```python
|
|
360
|
-
import os
|
|
361
|
-
|
|
362
376
|
import geometamaker
|
|
363
377
|
from geometamaker import models
|
|
364
378
|
|
|
@@ -373,32 +387,11 @@ license = {
|
|
|
373
387
|
profile = models.Profile(contact=contact) # keyword arguments
|
|
374
388
|
profile.set_license(**license) # `set_*` methods
|
|
375
389
|
|
|
376
|
-
data_path = 'data/watershed_gura.shp'
|
|
377
|
-
# Pass the profile to the `describe` function
|
|
378
|
-
resource = geometamaker.describe(data_path, profile=profile)
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
#### Store a Profile in user-configuration
|
|
382
|
-
|
|
383
|
-
##### Python
|
|
384
|
-
```python
|
|
385
|
-
import os
|
|
386
|
-
|
|
387
|
-
import geometamaker
|
|
388
|
-
from geometamaker import models
|
|
389
|
-
|
|
390
|
-
contact = {
|
|
391
|
-
'individual_name': 'bob'
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
profile = models.Profile(contact=contact)
|
|
395
390
|
config = geometamaker.Config()
|
|
396
391
|
config.save(profile)
|
|
397
392
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
# need to be passed to `describe`. It is always applied.
|
|
401
|
-
resource = geometamaker.describe(data_path)
|
|
393
|
+
# The saved profile will automatically be applied during `describe`:
|
|
394
|
+
resource = geometamaker.describe('data/watershed_gura.shp')
|
|
402
395
|
```
|
|
403
396
|
|
|
404
397
|
##### CLI
|
|
@@ -407,6 +400,3 @@ geometamaker config
|
|
|
407
400
|
```
|
|
408
401
|
This will prompt the user to enter their profile information.
|
|
409
402
|
Also see `geometamaker config --help`.
|
|
410
|
-
|
|
411
|
-
### For a complete list of methods:
|
|
412
|
-
https://geometamaker.readthedocs.io/en/latest/api/geometamaker.html
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
## Introduction
|
|
2
|
+
|
|
3
|
+
GeoMetaMaker is a Python library for creating human and machine-readable
|
|
4
|
+
metadata for geospatial, tabular, and other data formats.
|
|
2
5
|
|
|
3
6
|
Supported datatypes include:
|
|
4
7
|
* everything supported by GDAL
|
|
5
8
|
* tabular formats supported by `frictionless`
|
|
6
9
|
* compressed formats supported by `frictionless`
|
|
7
10
|
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
`mamba install -c conda-forge geometamaker`
|
|
8
14
|
|
|
9
|
-
|
|
15
|
+
## Basic Usage
|
|
10
16
|
|
|
11
17
|
This library comes with a command-line interface (CLI) called `geometamaker`.
|
|
12
18
|
Many of the examples below show how to use the Python interface, and then
|
|
@@ -43,6 +49,8 @@ resource.set_band_description(
|
|
|
43
49
|
|
|
44
50
|
resource.write()
|
|
45
51
|
```
|
|
52
|
+
For a complete list of methods and attributes:
|
|
53
|
+
https://geometamaker.readthedocs.io/en/latest/index.html
|
|
46
54
|
|
|
47
55
|
##### CLI
|
|
48
56
|
```
|
|
@@ -54,22 +62,30 @@ user-input. If you create a metadata document with the CLI, you may wish
|
|
|
54
62
|
to add these values manually by editing the
|
|
55
63
|
`watershed_gura.shp.yml` file in a text editor.
|
|
56
64
|
|
|
57
|
-
### Creating metadata for a
|
|
65
|
+
### Creating metadata for a collection of files:
|
|
66
|
+
Users can create a single metadata document to describe a directory of
|
|
67
|
+
files, with the option of excluding some files using a regular expression,
|
|
68
|
+
or limiting the number of subdirectory levels to traverse using the
|
|
69
|
+
`depth` or `-d` flag.
|
|
58
70
|
|
|
59
71
|
#### Python
|
|
60
72
|
```python
|
|
61
|
-
import os
|
|
62
|
-
|
|
63
73
|
import geometamaker
|
|
64
74
|
|
|
65
|
-
|
|
66
|
-
geometamaker.
|
|
75
|
+
collection_path = 'invest/data/invest-sample-data'
|
|
76
|
+
metadata = geometamaker.describe_collection(collection_path,
|
|
77
|
+
depth=2,
|
|
78
|
+
exclude_regex=r'.*\.json$',
|
|
79
|
+
describe_files=True)
|
|
80
|
+
metadata.write()
|
|
67
81
|
```
|
|
68
82
|
|
|
69
83
|
#### CLI
|
|
70
84
|
```
|
|
71
|
-
geometamaker describe -
|
|
85
|
+
geometamaker describe -d 2 --exclude .*\.json$ data/invest-sample-data
|
|
72
86
|
```
|
|
87
|
+
These examples will create `invest-sample-data-metadata.yml` as well as
|
|
88
|
+
create individual `.yml` documents for each dataset within the directory.
|
|
73
89
|
|
|
74
90
|
### Validating a metadata document:
|
|
75
91
|
If you have manually edited a `.yml` metadata document,
|
|
@@ -89,7 +105,7 @@ print(error)
|
|
|
89
105
|
geometamaker validate data/watershed_gura.shp.yml
|
|
90
106
|
```
|
|
91
107
|
|
|
92
|
-
### Validating all metadata documents in a directory
|
|
108
|
+
### Validating all metadata documents in a directory:
|
|
93
109
|
|
|
94
110
|
##### Python
|
|
95
111
|
```python
|
|
@@ -113,13 +129,10 @@ to all datasets they describe. Profiles can include `contact` information
|
|
|
113
129
|
and/or `license` information.
|
|
114
130
|
|
|
115
131
|
A profile can be saved to a configuration file so that it will be re-used
|
|
116
|
-
everytime you use `geometamaker`.
|
|
117
|
-
during runtime, which takes precedence over a profile in the config file.
|
|
132
|
+
everytime you use `geometamaker`.
|
|
118
133
|
|
|
119
|
-
|
|
134
|
+
##### Python
|
|
120
135
|
```python
|
|
121
|
-
import os
|
|
122
|
-
|
|
123
136
|
import geometamaker
|
|
124
137
|
from geometamaker import models
|
|
125
138
|
|
|
@@ -134,32 +147,11 @@ license = {
|
|
|
134
147
|
profile = models.Profile(contact=contact) # keyword arguments
|
|
135
148
|
profile.set_license(**license) # `set_*` methods
|
|
136
149
|
|
|
137
|
-
data_path = 'data/watershed_gura.shp'
|
|
138
|
-
# Pass the profile to the `describe` function
|
|
139
|
-
resource = geometamaker.describe(data_path, profile=profile)
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
#### Store a Profile in user-configuration
|
|
143
|
-
|
|
144
|
-
##### Python
|
|
145
|
-
```python
|
|
146
|
-
import os
|
|
147
|
-
|
|
148
|
-
import geometamaker
|
|
149
|
-
from geometamaker import models
|
|
150
|
-
|
|
151
|
-
contact = {
|
|
152
|
-
'individual_name': 'bob'
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
profile = models.Profile(contact=contact)
|
|
156
150
|
config = geometamaker.Config()
|
|
157
151
|
config.save(profile)
|
|
158
152
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
# need to be passed to `describe`. It is always applied.
|
|
162
|
-
resource = geometamaker.describe(data_path)
|
|
153
|
+
# The saved profile will automatically be applied during `describe`:
|
|
154
|
+
resource = geometamaker.describe('data/watershed_gura.shp')
|
|
163
155
|
```
|
|
164
156
|
|
|
165
157
|
##### CLI
|
|
@@ -168,6 +160,3 @@ geometamaker config
|
|
|
168
160
|
```
|
|
169
161
|
This will prompt the user to enter their profile information.
|
|
170
162
|
Also see `geometamaker config --help`.
|
|
171
|
-
|
|
172
|
-
### For a complete list of methods:
|
|
173
|
-
https://geometamaker.readthedocs.io/en/latest/api/geometamaker.html
|
|
@@ -9,6 +9,7 @@ channels:
|
|
|
9
9
|
- conda-forge
|
|
10
10
|
dependencies:
|
|
11
11
|
- python=3.10
|
|
12
|
+
- pip
|
|
12
13
|
- frictionless
|
|
13
14
|
- fsspec
|
|
14
15
|
- gdal>=3
|
|
@@ -16,3 +17,6 @@ dependencies:
|
|
|
16
17
|
- pygeoprocessing>=2.4.2
|
|
17
18
|
- pyyaml
|
|
18
19
|
- sphinx_rtd_theme
|
|
20
|
+
- myst-parser
|
|
21
|
+
- pip:
|
|
22
|
+
- autodoc_pydantic
|
|
@@ -26,6 +26,8 @@ extensions = [
|
|
|
26
26
|
'sphinx.ext.viewcode',
|
|
27
27
|
'sphinx.ext.napoleon', # support google style docstrings
|
|
28
28
|
'sphinx.ext.autosummary',
|
|
29
|
+
'sphinxcontrib.autodoc_pydantic',
|
|
30
|
+
'myst_parser',
|
|
29
31
|
]
|
|
30
32
|
|
|
31
33
|
templates_path = ['_templates']
|
|
@@ -46,6 +48,29 @@ html_static_path = ['_static']
|
|
|
46
48
|
nitpicky = False
|
|
47
49
|
autoclass_content = 'both'
|
|
48
50
|
|
|
51
|
+
autodoc_pydantic_model_show_json = False
|
|
52
|
+
autodoc_pydantic_model_show_config_summary = False
|
|
53
|
+
autodoc_pydantic_model_show_field_summary = False
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def setup(app):
|
|
57
|
+
app.connect('autodoc-process-docstring',
|
|
58
|
+
process_module_specific_docstrings)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def process_module_specific_docstrings(app, what, name, obj, options, lines):
|
|
62
|
+
"""Strip inherited __init__ docstring from Pydantic models.
|
|
63
|
+
|
|
64
|
+
Remove the __init__ docstring content because
|
|
65
|
+
Pydantic models generate their own __init__ from the parent.
|
|
66
|
+
So `autodoc_inherit_docstrings = False` will not do the job.
|
|
67
|
+
|
|
68
|
+
"""
|
|
69
|
+
if what == "pydantic_model":
|
|
70
|
+
if hasattr(obj, "__init__") and obj.__init__.__doc__:
|
|
71
|
+
obj.__init__.__doc__ = None
|
|
72
|
+
|
|
73
|
+
|
|
49
74
|
DOCS_SOURCE_DIR = os.path.dirname(__file__)
|
|
50
75
|
sphinx.ext.apidoc.main([
|
|
51
76
|
'--force',
|
|
@@ -4,7 +4,21 @@
|
|
|
4
4
|
contain the root `toctree` directive.
|
|
5
5
|
|
|
6
6
|
GeoMetaMaker
|
|
7
|
-
|
|
7
|
+
============
|
|
8
|
+
|
|
9
|
+
Release: |release|
|
|
10
|
+
|
|
11
|
+
GeoMetaMaker is a Python library for creating human and machine-readable
|
|
12
|
+
metadata for geospatial, tabular, and other data formats.
|
|
13
|
+
|
|
14
|
+
GeoMetaMaker is developed by the `Natural Capital Project <https://naturalcapitalproject.stanford.edu>`_.
|
|
15
|
+
|
|
16
|
+
.. toctree::
|
|
17
|
+
:maxdepth: 1
|
|
18
|
+
|
|
19
|
+
installation
|
|
20
|
+
basic_usage
|
|
21
|
+
metadata_resources
|
|
8
22
|
|
|
9
23
|
.. toctree::
|
|
10
24
|
:maxdepth: 1
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Installation
|
|
2
|
+
============
|
|
3
|
+
|
|
4
|
+
Suggested Method: ``conda-forge``
|
|
5
|
+
---------------------------------
|
|
6
|
+
|
|
7
|
+
The easiest way to install ``geometamaker`` is using the
|
|
8
|
+
`conda <https://docs.conda.io/en/latest/miniconda.html>`_ or
|
|
9
|
+
`mamba <https://mamba.readthedocs.io/en/latest/installation.html>`_ package managers::
|
|
10
|
+
|
|
11
|
+
mamba install -c conda-forge geometamaker
|
|
12
|
+
|
|
13
|
+
If you prefer to use ``conda``, the command is otherwise the same::
|
|
14
|
+
|
|
15
|
+
conda install -c conda-forge geometamaker
|
|
16
|
+
|
|
17
|
+
Dependencies
|
|
18
|
+
------------
|
|
19
|
+
|
|
20
|
+
Dependencies for ``geometamaker`` are listed in ``requirements.txt`` and
|
|
21
|
+
included here for your reference. Your package manager should, under most
|
|
22
|
+
circumstances, handle the dependency resolution for you.
|
|
23
|
+
|
|
24
|
+
.. include:: ../../requirements.txt
|
|
25
|
+
:literal:
|
|
@@ -5,7 +5,7 @@ readme = "README.md"
|
|
|
5
5
|
requires-python = ">=3.9"
|
|
6
6
|
license = {file = "LICENSE.txt"}
|
|
7
7
|
maintainers = [
|
|
8
|
-
{name = "Natural Capital
|
|
8
|
+
{name = "Natural Capital Alliance Software Team"}
|
|
9
9
|
]
|
|
10
10
|
keywords = ["gis", "geospatial", "metadata"]
|
|
11
11
|
classifiers = [
|
|
@@ -17,11 +17,11 @@ classifiers = [
|
|
|
17
17
|
"Operating System :: Microsoft",
|
|
18
18
|
"Operating System :: POSIX",
|
|
19
19
|
"Programming Language :: Python :: 3",
|
|
20
|
-
"Programming Language :: Python :: 3.9",
|
|
21
20
|
"Programming Language :: Python :: 3.10",
|
|
22
21
|
"Programming Language :: Python :: 3.11",
|
|
23
22
|
"Programming Language :: Python :: 3.12",
|
|
24
23
|
"Programming Language :: Python :: 3.13",
|
|
24
|
+
"Programming Language :: Python :: 3.14",
|
|
25
25
|
"License :: OSI Approved :: Apache Software License",
|
|
26
26
|
"Topic :: Scientific/Engineering :: GIS"
|
|
27
27
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import importlib.metadata
|
|
2
2
|
|
|
3
3
|
from .geometamaker import describe
|
|
4
|
-
from .geometamaker import
|
|
4
|
+
from .geometamaker import describe_collection
|
|
5
5
|
from .geometamaker import validate
|
|
6
6
|
from .geometamaker import validate_dir
|
|
7
7
|
from .config import Config
|
|
@@ -10,4 +10,4 @@ from .models import Profile
|
|
|
10
10
|
|
|
11
11
|
__version__ = importlib.metadata.version('geometamaker')
|
|
12
12
|
|
|
13
|
-
__all__ = ('describe', '
|
|
13
|
+
__all__ = ('describe', 'describe_collection', 'validate', 'validate_dir', 'Config', 'Profile')
|