Insula EarthCODE Publication Tool
Project description
Insula EarthCODE Publication Tool
Use this tool to generate templates with placeholder values for the EarthCODE project.
This tool can be used both as an import and as a CLI command.
The package is released publicly on PyPi, to install from anywhere simply use:
pip install insula-earthcode-publication-tool
Template Generator:
- CLI
-h, --help show this help message and exit
-p, --project If present generate a project template with the same name
-w, --workflow If present generate a workflow template with the same name
-e, --experiment If present generate an experiment template
-o, --product If present generate a product template
-t TARGET, --target TARGET
The target location where the templates will be generated.
Example usage using local code:
python template_generator.py -p -w -e -o -t targetdir
or using the equivalent custom command after installation:
insula_earthcode_template_gen -p -w -e -o -t targetdir
- Import
For usage inside notebooks just install the package, import it and call the generate_template() function.
Example usage equivalent to previous CLI call:
from insula_earthcode_publication_tool import generate_template
generate_template(project=True, workflow=True, experiment=True, product=True, target="targetdir")
STAC Json Generator:
After filling the templates with the correct information for a new product or workflow, the following command can generate a STAC json conform to the Open Science Catalog.
The generated project_collection.json shall be moved to catalog/projects/{project-id}/collection.json in the OSC.
The generated workflow_record.json shall be moved to catalog/workflows/{workflow-id}/record.json in the OSC
The generated files experiment_record.json, experiment_environment.yaml, experiment_input.yaml shall be moved to
catalog/experiments/{experiment-id} renamed without the "experiment_" part.
The generated product_collection.json shall be moved to catalog/products/{product-id}/collection.json in the OSC.
- CLI
-h, --help show this help message and exit
-p PROJECT, --project PROJECT
Project YAML template location
-w WORKFLOW, --workflow WORKFLOW
Workflow YAML template location
-e EXPERIMENT, --experiment EXPERIMENT
Experiment YAML template
-o PRODUCT, --product PRODUCT
Product YAML template location
-t TARGET, --target TARGET
The target location where the STAC jsons will be created.
Example usage using local code:
python stac_generator.py -p templ/project.yaml -w templ/workflow.yaml -e templ/experiment.yaml -o templ/product.yaml -t targetdir
or using the equivalent custom command after installation:
insula_earthcode_stac_gen -p templ/project.yaml -w templ/workflow.yaml -e templ/experiment.yaml -o templ/product.yaml -t targetdir
- Import
For usage inside notebooks just install the package, import it and call the generate_stac() function.
Example usage equivalent to previous CLI call:
from insula_earthcode_publication_tool import generate_stac
generate_stac(project="templ/project.yaml", workflow="templ/workflow.yaml", experiment="templ/experiment.yaml", product="templ/product.yaml", target="targetdir")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file insula_earthcode_publication_tool-1.0.9-py3-none-any.whl.
File metadata
- Download URL: insula_earthcode_publication_tool-1.0.9-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99b53608e94139654aafeb027e1755e5a2e9e2c9d8c91f4a057f06c140cf55bb
|
|
| MD5 |
d747c54734bea75f8bd8ab48883448b3
|
|
| BLAKE2b-256 |
3107c31b92ed24f75705ccad17675c03faf0955db32fe101f91dc62d42dad4ef
|