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.

The CLI retrieves the Git username and personal access token from a hidden file named .gitaccess. Ensure this file is located in the same directory where you execute the CLI command.

.gitaccess example

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

deep-code publish

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

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

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 bucket or your team bucket.

workflow-config.yaml example

workflow_id: "esa-cci-permafrost"
properties:
  title: "ESA CCI permafrost"
  description: "cube generation workflow for esa-cci-permafrost"
  keywords:
    - Earth Science
  themes:
      - cryosphere
  license: proprietary
  jupyter_kernel_info:
    name: deepesdl-xcube-1.8.3
    python_version: 3.11
    env_file: "https://github.com/deepesdl/cube-gen/blob/main/Permafrost/environment.yml"
jupyter_notebook_url: "https://github.com/deepesdl/cube-gen/blob/main/Permafrost/Create-CCI-Permafrost-cube-EarthCODE.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.tar.gz (28.6 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-py3-none-any.whl (35.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deep_code-0.0.1.tar.gz
  • Upload date:
  • Size: 28.6 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.tar.gz
Algorithm Hash digest
SHA256 fc254b3ae8973143ea824488329c638c28dd0be6a787520ab0687b54a51e83c8
MD5 a2a88c8ce87576c0fa47127d6c71352f
BLAKE2b-256 2360fdb8ff19a2f072498801de2423dbe7fc7c83f8718f60e38e1165bfcdc2ab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deep_code-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 35.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-py3-none-any.whl
Algorithm Hash digest
SHA256 0e7b85bcc2d0e140b9bb3a295d41c7a0af918e76d1486defc91f93247e19e62c
MD5 81c28d7ad97ad02d5a91d018ccfee2af
BLAKE2b-256 0c82ca118fe1de6dfce4e164e49ad2aa37fbc533111a96f281c22c60ce7747f4

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