Skip to main content

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.

Release files for xcengine 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xcengine 0.1.3
File Size Uploaded
xcengine-0.1.3.tar.gz 31.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xcengine 0.1.3
File Interpreter ABI Platform
xcengine-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 52.7 kB

Release files / xcengine-0.1.3.tar.gz

Download URL xcengine-0.1.3.tar.gz
Size 31.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b959952cae22fe8c2cb130d3997e1cda06c18c383ae202edebd7299671e8cbdd
BLAKE2b-256 checksum
How to use checksums
393cabc7d95452fa2a7878c5172642c2ff2443c289a580a06fd4e55644066332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / xcengine-0.1.3-py3-none-any.whl

Download URL xcengine-0.1.3-py3-none-any.whl
Size 21.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d102bc5c0e46a92976a8f41fea6ad1eae2dbdd9a1449077a7991ce60df51a609
BLAKE2b-256 checksum
How to use checksums
8652405a411c5a438ef5ed612fe09360fef2df0c26decbb350de95ba91e37cad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page