Skip to main content

deepesdl earthcode integration utility tool

Project description

deep-code

Build Status codecov Code style: black License

deep-code is a lightweight python tool that comprises a command line interface(CLI) and Python API providing utilities that aid integration of DeepESDL datasets, experiments with EarthCODE.

The first release will focus on implementing the publish feature of DeepESDL experiments/workflow as OGC API record and Datasets as an OSC stac collection.

Setup

Install

deep-code will be available in PyPI and conda-forge. Till the stable release, developers/contributors can follow the below steps to install deep-code.

Installing from the repository for Developers/Contributors

To install deep-code directly from the git repository, clone the repository, and execute the steps below:

conda env create
conda activate deep-code
pip install -e .

This installs all the dependencies of deep-code into a fresh conda environment, and installs deep-code from the repository into the same environment.

Testing

To run the unit test suite:

pytest

To analyze test coverage

pytest --cov=deep-code

To produce an HTML coverage report

pytest --cov-report html --cov=deep-code

deep_code usage

deep_code provides a command-line tool called deep-code, which has several subcommands providing different utility functions. Use the --help option with these subcommands to get more details on usage.

deep-code publish-product

Publish a dataset which is a result of an experiment to the EarthCODE open-science catalog.

 deep-code publish-dataset /path/to/dataset-config.yaml

.gitaccess example

github-username: your-git-user
github-token: personal access token

dataset-config.yaml example

dataset_id: hydrology-1D-0.009deg-100x60x60-3.0.2.zarr
collection_id: hydrology
osc_themes:
  - Land
  - Oceans
# non-mandatory
documentation_link: https://deepesdl.readthedocs.io/en/latest/datasets/hydrology-1D-0.009deg-100x60x60-3.0.2.zarr/
access_link: s3://test
dataset_status: completed
osc_region: global
cf_parameter:
  - name: hydrology

dataset-id has to be a valid dataset-id from deep-esdl-public s3 or your team bucket.

deep-code publish-workflow

Publish a workflow/experiment to the EarthCODE open-science catalog.

deep-code publish-workflow /path/to/workflow-config.yaml

workflow-config.yaml example

workflow_id: "4D Med hydrology cube generation"
properties:
  title: "Hydrology cube generation recipe"
  description: "4D Med cube generation"
  keywords:
    - Earth Science
  themes:
      - Atmosphere
      - Ocean
      - Evaporation
  license: proprietary
  jupyter_kernel_info:
    name: deepesdl-xcube-1.7.1
    python_version: 3.11
    env_file: https://git/env.yml
links:
  - rel: "documentation"
    type: "application/json"
    title: "4DMed Hydrology Cube Generation Recipe"
    href: "https://github.com/deepesdl/cube-gen/tree/main/hydrology/README.md"
  - rel: "jupyter-notebook"
    type: "application/json"
    title: "Workflow Jupyter Notebook"
    href: "https://github.com/deepesdl/cube-gen/blob/main/hydrology/notebooks/reading_hydrology.ipynb"
contact:
  - name: Tejas Morbagal Harish
    organization: Brockmann Consult GmbH
    links:
      - rel: "about"
        type: "text/html"
        href: "https://www.brockmann-consult.de/"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deep_code-0.0.1.dev0.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deep_code-0.0.1.dev0-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

Details for the file deep_code-0.0.1.dev0.tar.gz.

File metadata

  • Download URL: deep_code-0.0.1.dev0.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for deep_code-0.0.1.dev0.tar.gz
Algorithm Hash digest
SHA256 e3bcfc44bad2d686f8e353f7dfcb5e12696a241efab73c010a9c6b044effd445
MD5 c51cf127200f4d7274dcb3582aa6aa21
BLAKE2b-256 d730603911eb3e93b46004da2f1aa4dcaf368e8643eb08f83cfb0f03240e5395

See more details on using hashes here.

File details

Details for the file deep_code-0.0.1.dev0-py3-none-any.whl.

File metadata

  • Download URL: deep_code-0.0.1.dev0-py3-none-any.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for deep_code-0.0.1.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 07b349622b746452e06cbd193504dc977eca84df3e1ea5f612ec580e302e2d40
MD5 08455fbd27a6d2fb9adea8aaaae3394a
BLAKE2b-256 5b3ef32f453783824a9421634c81da5da039f8d7aa42e675bedacdb721f5bdd2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page