geometamaker 0.1.1__tar.gz → 0.2.0__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.2.0/HISTORY.rst +66 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/PKG-INFO +44 -43
- {geometamaker-0.1.1 → geometamaker-0.2.0}/README.md +29 -40
- {geometamaker-0.1.1 → geometamaker-0.2.0}/docs/environment-rtd.yml +4 -0
- geometamaker-0.2.0/docs/source/archive_resource.rst +6 -0
- geometamaker-0.2.0/docs/source/basic_usage.rst +5 -0
- geometamaker-0.2.0/docs/source/collection_resource.rst +6 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/docs/source/conf.py +25 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/docs/source/index.rst +15 -1
- geometamaker-0.2.0/docs/source/installation.rst +25 -0
- geometamaker-0.2.0/docs/source/metadata_resources.rst +11 -0
- geometamaker-0.2.0/docs/source/profile.rst +6 -0
- geometamaker-0.2.0/docs/source/raster_resource.rst +6 -0
- geometamaker-0.2.0/docs/source/table_resource.rst +6 -0
- geometamaker-0.2.0/docs/source/vector_resource.rst +6 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/pyproject.toml +3 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/src/geometamaker/__init__.py +2 -2
- geometamaker-0.2.0/src/geometamaker/cli.py +264 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/src/geometamaker/config.py +3 -4
- geometamaker-0.2.0/src/geometamaker/geometamaker.py +758 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/src/geometamaker/models.py +317 -114
- {geometamaker-0.1.1 → geometamaker-0.2.0}/src/geometamaker.egg-info/PKG-INFO +44 -43
- {geometamaker-0.1.1 → geometamaker-0.2.0}/src/geometamaker.egg-info/SOURCES.txt +13 -1
- geometamaker-0.2.0/src/geometamaker.egg-info/requires.txt +11 -0
- geometamaker-0.2.0/tests/data/0.1.2/vector.geojson +8 -0
- geometamaker-0.2.0/tests/data/0.1.2/vector.geojson.yml +63 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/tests/test_geometamaker.py +382 -78
- geometamaker-0.2.0/tests/test_migrations.py +43 -0
- geometamaker-0.1.1/HISTORY.rst +0 -19
- geometamaker-0.1.1/src/geometamaker/cli.py +0 -158
- geometamaker-0.1.1/src/geometamaker/geometamaker.py +0 -531
- geometamaker-0.1.1/tests/data/template.yml +0 -68
- {geometamaker-0.1.1 → geometamaker-0.2.0}/.github/workflows/test.yml +0 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/.readthedocs.yml +0 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/LICENSE.txt +0 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/docs/Makefile +0 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/docs/make.bat +0 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/requirements.txt +0 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/setup.cfg +0 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/src/geometamaker/utils.py +0 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/src/geometamaker.egg-info/dependency_links.txt +0 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/src/geometamaker.egg-info/entry_points.txt +0 -0
- {geometamaker-0.1.1 → geometamaker-0.2.0}/src/geometamaker.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
Release History
|
|
2
|
+
===============
|
|
3
|
+
|
|
4
|
+
0.2.0 (2025-07-22)
|
|
5
|
+
------------------
|
|
6
|
+
* Allow CLI to ``describe`` remote datasets.
|
|
7
|
+
https://github.com/natcap/geometamaker/issues/78
|
|
8
|
+
* Add support for describing tar gzip files in the same manner as zip
|
|
9
|
+
archives. https://github.com/natcap/geometamaker/issues/26
|
|
10
|
+
* Metadata documents for raster and vector datasets now include metadata
|
|
11
|
+
key:value pairs that are defined on the GDAL raster, band, vector, and
|
|
12
|
+
layer objects. https://github.com/natcap/geometamaker/issues/68
|
|
13
|
+
* Added an option to compute raster band statistics when calling ``describe``.
|
|
14
|
+
Statistics are included in the ``gdal_metadata`` section of metadata documents.
|
|
15
|
+
https://github.com/natcap/geometamaker/issues/77
|
|
16
|
+
* Vector metadata documents now include a 'data_model.layers' section
|
|
17
|
+
for properties of the dataset that are specific to the layer.
|
|
18
|
+
Existing metadata documents can be migrated to this new schema by
|
|
19
|
+
calling ``describe`` on the vector dataset. GeoMetaMaker still only
|
|
20
|
+
supports describing metadata for the first layer in a vector dataset.
|
|
21
|
+
https://github.com/natcap/geometamaker/issues/28
|
|
22
|
+
* Add support for describing folders as collections, generating a single
|
|
23
|
+
metadata file listing contained files along with their descriptions and
|
|
24
|
+
metadata. https://github.com/natcap/geometamaker/issues/66
|
|
25
|
+
* ``describe_dir`` has been deprecated as this functionality can be achieved
|
|
26
|
+
with ``describe_collection``. https://github.com/natcap/geometamaker/issues/98
|
|
27
|
+
* Existing attributes are now preserved when calling
|
|
28
|
+
``describe_collection`` on collection with existing metadata.
|
|
29
|
+
https://github.com/natcap/geometamaker/issues/95
|
|
30
|
+
* Removed the ``profile`` argument to ``describe``. ``set_contact`` and
|
|
31
|
+
``set_license`` can still be used to set those metadata properties.
|
|
32
|
+
``Config`` can still be used to create and store a default profile.
|
|
33
|
+
https://github.com/natcap/geometamaker/issues/92
|
|
34
|
+
* If an invalid metadata document exists when a dataset or collection is
|
|
35
|
+
described, do not prevent creation of a new metadata document.
|
|
36
|
+
Invalid/incompatible documents will be renamed by adding a '.bak' extension
|
|
37
|
+
before the new metadata document replaces them.
|
|
38
|
+
https://github.com/natcap/geometamaker/issues/89
|
|
39
|
+
* ``geometamaker describe``, when given a directory, will create a
|
|
40
|
+
"-metadata.yml" document for that directory, as well as metadata documents
|
|
41
|
+
for all datasets within.
|
|
42
|
+
https://github.com/natcap/geometamaker/issues/94
|
|
43
|
+
* ``geometamaker.validate_dir`` was updated to use the ``depth`` argument
|
|
44
|
+
instead of ``recursive``.
|
|
45
|
+
* If ``describe`` is called on a directory, a helpful error message is raised.
|
|
46
|
+
https://github.com/natcap/geometamaker/issues/98
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
0.1.2 (2025-02-05)
|
|
50
|
+
------------------
|
|
51
|
+
* Declared dependencies in ``pyproject.toml`` to facilitate pip installs.
|
|
52
|
+
|
|
53
|
+
0.1.1 (2025-02-04)
|
|
54
|
+
------------------
|
|
55
|
+
* Fixed a bug where rasters without a defined nodata value could not be
|
|
56
|
+
described. https://github.com/natcap/geometamaker/issues/70
|
|
57
|
+
* All YAML documents will be written as UTF-8 encoded files.
|
|
58
|
+
https://github.com/natcap/geometamaker/issues/71
|
|
59
|
+
* Fixed a bug in formatting of validation messages about nested attributes
|
|
60
|
+
https://github.com/natcap/geometamaker/issues/65
|
|
61
|
+
* Added exception handling to make validating directories more resilient to
|
|
62
|
+
unreadable yaml files. https://github.com/natcap/geometamaker/issues/62
|
|
63
|
+
|
|
64
|
+
0.1.0 (2025-01-10)
|
|
65
|
+
------------------
|
|
66
|
+
* First release!
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: geometamaker
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: metadata creation for geospatial data
|
|
5
5
|
Maintainer: Natural Capital Project Software Team
|
|
6
6
|
License:
|
|
@@ -225,16 +225,34 @@ Classifier: Topic :: Scientific/Engineering :: GIS
|
|
|
225
225
|
Requires-Python: >=3.9
|
|
226
226
|
Description-Content-Type: text/markdown
|
|
227
227
|
License-File: LICENSE.txt
|
|
228
|
-
|
|
229
|
-
|
|
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
|
|
239
|
+
Dynamic: license-file
|
|
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.
|
|
230
245
|
|
|
231
246
|
Supported datatypes include:
|
|
232
247
|
* everything supported by GDAL
|
|
233
248
|
* tabular formats supported by `frictionless`
|
|
234
249
|
* compressed formats supported by `frictionless`
|
|
235
250
|
|
|
251
|
+
## Installation
|
|
252
|
+
|
|
253
|
+
`mamba install -c conda-forge geometamaker`
|
|
236
254
|
|
|
237
|
-
|
|
255
|
+
## Basic Usage
|
|
238
256
|
|
|
239
257
|
This library comes with a command-line interface (CLI) called `geometamaker`.
|
|
240
258
|
Many of the examples below show how to use the Python interface, and then
|
|
@@ -271,6 +289,8 @@ resource.set_band_description(
|
|
|
271
289
|
|
|
272
290
|
resource.write()
|
|
273
291
|
```
|
|
292
|
+
For a complete list of methods and attributes:
|
|
293
|
+
https://geometamaker.readthedocs.io/en/latest/index.html
|
|
274
294
|
|
|
275
295
|
##### CLI
|
|
276
296
|
```
|
|
@@ -282,22 +302,30 @@ user-input. If you create a metadata document with the CLI, you may wish
|
|
|
282
302
|
to add these values manually by editing the
|
|
283
303
|
`watershed_gura.shp.yml` file in a text editor.
|
|
284
304
|
|
|
285
|
-
### 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.
|
|
286
310
|
|
|
287
311
|
#### Python
|
|
288
312
|
```python
|
|
289
|
-
import os
|
|
290
|
-
|
|
291
313
|
import geometamaker
|
|
292
314
|
|
|
293
|
-
|
|
294
|
-
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()
|
|
295
321
|
```
|
|
296
322
|
|
|
297
323
|
#### CLI
|
|
298
324
|
```
|
|
299
|
-
geometamaker describe -
|
|
325
|
+
geometamaker describe -d 2 --exclude .*\.json$ data/invest-sample-data
|
|
300
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.
|
|
301
329
|
|
|
302
330
|
### Validating a metadata document:
|
|
303
331
|
If you have manually edited a `.yml` metadata document,
|
|
@@ -317,7 +345,7 @@ print(error)
|
|
|
317
345
|
geometamaker validate data/watershed_gura.shp.yml
|
|
318
346
|
```
|
|
319
347
|
|
|
320
|
-
### Validating all metadata documents in a directory
|
|
348
|
+
### Validating all metadata documents in a directory:
|
|
321
349
|
|
|
322
350
|
##### Python
|
|
323
351
|
```python
|
|
@@ -341,13 +369,10 @@ to all datasets they describe. Profiles can include `contact` information
|
|
|
341
369
|
and/or `license` information.
|
|
342
370
|
|
|
343
371
|
A profile can be saved to a configuration file so that it will be re-used
|
|
344
|
-
everytime you use `geometamaker`.
|
|
345
|
-
during runtime, which takes precedence over a profile in the config file.
|
|
372
|
+
everytime you use `geometamaker`.
|
|
346
373
|
|
|
347
|
-
|
|
374
|
+
##### Python
|
|
348
375
|
```python
|
|
349
|
-
import os
|
|
350
|
-
|
|
351
376
|
import geometamaker
|
|
352
377
|
from geometamaker import models
|
|
353
378
|
|
|
@@ -362,32 +387,11 @@ license = {
|
|
|
362
387
|
profile = models.Profile(contact=contact) # keyword arguments
|
|
363
388
|
profile.set_license(**license) # `set_*` methods
|
|
364
389
|
|
|
365
|
-
data_path = 'data/watershed_gura.shp'
|
|
366
|
-
# Pass the profile to the `describe` function
|
|
367
|
-
resource = geometamaker.describe(data_path, profile=profile)
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
#### Store a Profile in user-configuration
|
|
371
|
-
|
|
372
|
-
##### Python
|
|
373
|
-
```python
|
|
374
|
-
import os
|
|
375
|
-
|
|
376
|
-
import geometamaker
|
|
377
|
-
from geometamaker import models
|
|
378
|
-
|
|
379
|
-
contact = {
|
|
380
|
-
'individual_name': 'bob'
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
profile = models.Profile(contact=contact)
|
|
384
390
|
config = geometamaker.Config()
|
|
385
391
|
config.save(profile)
|
|
386
392
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
# need to be passed to `describe`. It is always applied.
|
|
390
|
-
resource = geometamaker.describe(data_path)
|
|
393
|
+
# The saved profile will automatically be applied during `describe`:
|
|
394
|
+
resource = geometamaker.describe('data/watershed_gura.shp')
|
|
391
395
|
```
|
|
392
396
|
|
|
393
397
|
##### CLI
|
|
@@ -396,6 +400,3 @@ geometamaker config
|
|
|
396
400
|
```
|
|
397
401
|
This will prompt the user to enter their profile information.
|
|
398
402
|
Also see `geometamaker config --help`.
|
|
399
|
-
|
|
400
|
-
### For a complete list of methods:
|
|
401
|
-
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:
|
|
@@ -30,6 +30,9 @@ classifiers = [
|
|
|
30
30
|
# using the corresponding setup args `install_requires` and `extras_require`
|
|
31
31
|
dynamic = ["version", "dependencies", "optional-dependencies"]
|
|
32
32
|
|
|
33
|
+
[tool.setuptools.dynamic]
|
|
34
|
+
dependencies = {file = ["requirements.txt"]}
|
|
35
|
+
|
|
33
36
|
[tool.setuptools_scm]
|
|
34
37
|
version_scheme = "post-release"
|
|
35
38
|
local_scheme = "node-and-date"
|
|
@@ -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')
|