# deep-code
[](https://github.com/deepesdl/deep-code/actions/workflows/unittest-workflow.yaml)
[](https://codecov.io/gh/deepesdl/deep-code)
[](https://github.com/psf/black)
[](https://github.com/deepesdl/deep-code/blob/main/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 for now and will be available in conda-forge
in the near future. 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:
```commandline
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:
```commandline
pytest
```
To analyze test coverage
```shell
pytest --cov=deep-code
```
To produce an HTML coverage report
```commandline
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 generate-config
Generates starter configuration templates for publishing to EarthCODE openscience
catalog.
#### Usage
```
deep-code generate-config [OPTIONS]
```
#### Options
--output-dir, -o : Output directory (default: current)
#### Examples:
```
deep-code generate-config
deep-code generate-config -o ./configs
```
### deep-code publish
Publishes metadata of experiment, workflow and dataset to the EarthCODE open-science
catalog
### Usage
```
deep-code publish DATASET_CONFIG WORKFLOW_CONFIG [--environment ENVIRONMENT]
```
#### Arguments
DATASET_CONFIG - Path to the dataset configuration YAML file
(e.g., dataset-config.yaml)
WORKFLOW_CONFIG - Path to the workflow configuration YAML file
(e.g., workflow-config.yaml)
#### Options
--environment, -e - Target catalog environment:
production (default) | staging | testing
#### Examples:
1. Publish to staging catalog
```
deep-code publish dataset-config.yaml workflow-config.yaml --environment=staging
```
2. Publish to testing catalog
```
deep-code publish dataset-config.yaml workflow-config.yaml -e testing
```
3. Publish to production catalog
```
deep-code publish dataset-config.yaml workflow-config.yaml
```
#### dataset-config.yaml example
```
dataset_id: esa-cci-permafrost-1x1151x1641-1.0.0.zarr
collection_id: esa-cci-permafrost
osc_themes:
- cryosphere
osc_region: global
# non-mandatory
documentation_link: https://deepesdl.readthedocs.io/en/latest/datasets/esa-cci-permafrost-1x1151x1641-0-0-2-zarr
access_link: s3://deep-esdl-public/esa-cci-permafrost-1x1151x1641-1.0.0.zarr
dataset_status: completed
```
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/"
```
Raw data
{
"_id": null,
"home_page": null,
"name": "deep-code",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "analysis ready data, data science, datacube, xarray, zarr, xcube, stac, FAIR, reproducible workflow, DeepESDL",
"author": null,
"author_email": "Tejas Morbagal Harish <tejas.morbagalharish@brockmann-consult.de>",
"download_url": "https://files.pythonhosted.org/packages/1c/6e/5e159555029d5b6f0eeb7dfd6f1d59fc5a4607c28fef50f8151b6fdcf12a/deep_code-0.1.5.tar.gz",
"platform": null,
"description": "# deep-code\n\n[](https://github.com/deepesdl/deep-code/actions/workflows/unittest-workflow.yaml)\n[](https://codecov.io/gh/deepesdl/deep-code)\n[](https://github.com/psf/black)\n[](https://github.com/deepesdl/deep-code/blob/main/LICENSE)\n\n`deep-code` is a lightweight python tool that comprises a command line interface(CLI) \nand Python API providing utilities that aid integration of DeepESDL datasets, \nexperiments with EarthCODE.\n\nThe first release will focus on implementing the publish feature of DeepESDL \nexperiments/workflow as OGC API record and Datasets as an OSC stac collection.\n\n## Setup\n\n## Install\n`deep-code` will be available in PyPI for now and will be available in conda-forge \nin the near future. Till the stable release,\ndevelopers/contributors can follow the below steps to install deep-code.\n\n## Installing from the repository for Developers/Contributors\n\nTo install deep-code directly from the git repository, clone the repository, and execute the steps below:\n\n```commandline\nconda env create\nconda activate deep-code\npip install -e .\n```\n\nThis installs all the dependencies of `deep-code` into a fresh conda environment, \nand installs deep-code from the repository into the same environment.\n\n## Testing\n\nTo run the unit test suite:\n\n```commandline\npytest\n```\n\nTo analyze test coverage\n```shell\npytest --cov=deep-code\n```\n\nTo produce an HTML coverage report\n\n```commandline\npytest --cov-report html --cov=deep-code\n```\n\n## deep_code usage\n\n`deep_code` provides a command-line tool called deep-code, which has several subcommands \nproviding different utility functions.\nUse the --help option with these subcommands to get more details on usage.\n\nThe CLI retrieves the Git username and personal access token from a hidden file named \n.gitaccess. Ensure this file is located in the same directory where you execute the CLI\ncommand.\n\n#### .gitaccess example\n\n```\ngithub-username: your-git-user\ngithub-token: personal access token\n```\n### deep-code generate-config\n\nGenerates starter configuration templates for publishing to EarthCODE openscience \ncatalog.\n\n#### Usage\n```\ndeep-code generate-config [OPTIONS]\n```\n\n#### Options\n --output-dir, -o : Output directory (default: current)\n\n#### Examples:\n```\ndeep-code generate-config\ndeep-code generate-config -o ./configs\n```\n\n### deep-code publish\n\nPublishes metadata of experiment, workflow and dataset to the EarthCODE open-science \ncatalog\n\n### Usage\n```\ndeep-code publish DATASET_CONFIG WORKFLOW_CONFIG [--environment ENVIRONMENT]\n ```\n\n#### Arguments\n DATASET_CONFIG - Path to the dataset configuration YAML file\n (e.g., dataset-config.yaml)\n\n WORKFLOW_CONFIG - Path to the workflow configuration YAML file\n (e.g., workflow-config.yaml)\n\n#### Options\n --environment, -e - Target catalog environment:\n production (default) | staging | testing\n\n#### Examples:\n1. Publish to staging catalog\n```\ndeep-code publish dataset-config.yaml workflow-config.yaml --environment=staging\n```\n2. Publish to testing catalog\n```\ndeep-code publish dataset-config.yaml workflow-config.yaml -e testing\n```\n3. Publish to production catalog\n```\ndeep-code publish dataset-config.yaml workflow-config.yaml\n```\n#### dataset-config.yaml example\n\n```\ndataset_id: esa-cci-permafrost-1x1151x1641-1.0.0.zarr\ncollection_id: esa-cci-permafrost\nosc_themes:\n - cryosphere\nosc_region: global\n# non-mandatory\ndocumentation_link: https://deepesdl.readthedocs.io/en/latest/datasets/esa-cci-permafrost-1x1151x1641-0-0-2-zarr\naccess_link: s3://deep-esdl-public/esa-cci-permafrost-1x1151x1641-1.0.0.zarr\ndataset_status: completed\n```\n\ndataset-id has to be a valid dataset-id from `deep-esdl-public` s3 bucket or your team \nbucket.\n\n#### workflow-config.yaml example\n\n```\nworkflow_id: \"esa-cci-permafrost\"\nproperties:\n title: \"ESA CCI permafrost\"\n description: \"cube generation workflow for esa-cci-permafrost\"\n keywords:\n - Earth Science\n themes:\n - cryosphere\n license: proprietary\n jupyter_kernel_info:\n name: deepesdl-xcube-1.8.3\n python_version: 3.11\n env_file: \"https://github.com/deepesdl/cube-gen/blob/main/Permafrost/environment.yml\"\njupyter_notebook_url: \"https://github.com/deepesdl/cube-gen/blob/main/Permafrost/Create-CCI-Permafrost-cube-EarthCODE.ipynb\"\ncontact:\n - name: Tejas Morbagal Harish\n organization: Brockmann Consult GmbH\n links:\n - rel: \"about\"\n type: \"text/html\"\n href: \"https://www.brockmann-consult.de/\"\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "deepesdl earthcode integration utility tool",
"version": "0.1.5",
"project_urls": {
"Changelog": "https://github.com/deepesdl/deep-code/blob/main/CHANGES.md",
"Issues": "https://github.com/deepesdl/deep-code/issues",
"Repository": "https://github.com/deepesdl/deep-code"
},
"split_keywords": [
"analysis ready data",
" data science",
" datacube",
" xarray",
" zarr",
" xcube",
" stac",
" fair",
" reproducible workflow",
" deepesdl"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9df4bf292c1acf6c42b84b72324ee823e330b515497b55efffa3ee1ae7e25b5f",
"md5": "1192f6166d25bab623d4e5621da5b7bb",
"sha256": "315d4603a3da56d3aef3aec1d469905c462103d42fc34da8175910a15c804f73"
},
"downloads": -1,
"filename": "deep_code-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1192f6166d25bab623d4e5621da5b7bb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 44543,
"upload_time": "2025-08-20T07:25:20",
"upload_time_iso_8601": "2025-08-20T07:25:20.255380Z",
"url": "https://files.pythonhosted.org/packages/9d/f4/bf292c1acf6c42b84b72324ee823e330b515497b55efffa3ee1ae7e25b5f/deep_code-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "1c6e5e159555029d5b6f0eeb7dfd6f1d59fc5a4607c28fef50f8151b6fdcf12a",
"md5": "f7aec96d89a3aad4768efd17ada5ce72",
"sha256": "6d61092f73b36240f056bce7892498f1e941831c898718455f0bfd5e27287959"
},
"downloads": -1,
"filename": "deep_code-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "f7aec96d89a3aad4768efd17ada5ce72",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 35400,
"upload_time": "2025-08-20T07:25:22",
"upload_time_iso_8601": "2025-08-20T07:25:22.158227Z",
"url": "https://files.pythonhosted.org/packages/1c/6e/5e159555029d5b6f0eeb7dfd6f1d59fc5a4607c28fef50f8151b6fdcf12a/deep_code-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-20 07:25:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "deepesdl",
"github_project": "deep-code",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "deep-code"
}