Skip to main content

Create OGC Earth Observation Application Packages from Jupyter notebooks

Project description

tests codecov docs

xcengine: turn Jupyter notebooks into Application Packages

xcengine provides tools to convert a Jupyter notebook into one of several parameterized, headlessly runnable forms:

Documentation

Documentation is hosted at https://xcube-dev.github.io/xcengine/.

Defining parameters in a notebook

xcengine uses the same convention as papermill for defining parameters in a notebook. All parameters should be set as Python variables in the same notebook code cell, and that cell should be designated as the parameter cell by giving it the tag parameters. In JupyterLab, you can do this using the property inspector (⚙⚙ icon in the right sidebar). See the papermill documentation for more details.

During conversion, xcetool will detect any variables that are set in the parameters cell and make them available as command-line parameters for the output script and container, and as workflow parameters for the application package.

Customizing output formats

An xcengine-generated script or image can automatically write all xarray.Dataset objects from the notebook code to disk, for example to be staged out as EO Application Package outputs. By default, Zarr format is used, but this can be changed to NetCDF on a per-dataset basis by applying an attribute:

my_dataset.attrs["xcengine_output_format"] = "netcdf"

xcetool usage

xcengine provides a command-line tool called xcetool, which has several subcommands for different functions. Use the --help option with these subcommands to get more details on usage.

xcetool make-script

Convert a Jupyter notebook to a non-interactive Python script.

xcetool image build

Convert a Jupyter notebook to a Docker container image. This subcommand can additionally produce a Common Workflow Language (CWL) file defining an OGC Earth Observation Application Package which uses the container image.

xcetool image run

Run a Docker container using an image converted from a Jupyter notebook.

Acknowledgements

xcengine was developed as part of the Open-Earth-Monitor Cyberinfrastructure project, which has received funding from the European Union's Horizon Europe research and innovation programme under grant agreement No. 101059548.

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

xcengine-0.1.1.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

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

xcengine-0.1.1-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file xcengine-0.1.1.tar.gz.

File metadata

  • Download URL: xcengine-0.1.1.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for xcengine-0.1.1.tar.gz
Algorithm Hash digest
SHA256 00c4d315a14ff2020f6523811c9d4f5e7d83c572dd80258a9c555d8ad3a225dd
MD5 fae6f89c9cfe82e4a9df6bb3ff1b78f3
BLAKE2b-256 178de46675cfd72954268b5612ddcaed05ea8f1e242d6a87f8c3d0d4b59828f3

See more details on using hashes here.

File details

Details for the file xcengine-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: xcengine-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for xcengine-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 073a43eb5c880550834bbbc6b919a1c6f869ff064e489295745ff08ceffcd63d
MD5 89fe3018148f8917aa70a2159a6ea466
BLAKE2b-256 5baea5016cf42a6851e0a682d45567e1def9b146ba04cf16009283b4d77e6f10

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