3  Setup

3.1 Installation

To run the demonstration, the project must first be installed. The technical note uses pixi to manage packages and tools. Everything used in this demonstration, including the tools in Table 1.2 are installed with the pixi environment.

Make sure you are using pixi run or have the environment activated (e.g., using pixi shell) to run any of the scripts or commands listed in this technical note.

The demonstration itself activates the environment using pixi shell-hook to avoid launching a new shell.

First, clone the git repository and navigate to it:

git clone https://github.com/ESA-Heatwise/heatwise-interoperability-demonstration
cd heatwise-interoperability-demonstration

The remaining steps assume that they are performed from within the root of the repository.

To install the pixi environment, run

pixi install --all

Finally, activate it

pixi shell

3.2 Staging

The demonstration requires input datasets on which to run the processors. Each of the HEATWISE software products comes with its own example input data.

The inputs are staged by cloning the source code repositories, containing the example inputs. This is automated by a script stage.sh,

which stage.sh
/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/scripts/stage.sh

and available as a pixi task. The demonstration is set up by running:

pixi run stage

This populates the software, application-packages and inputs directories under the project root. Later, outputs of the processors will be collected in the outputs directory.

tree -n -L 1 {software,inputs,application-packages}
software
├── heatwise-class-guided
├── heatwise-hsi-lst-prep
├── heatwise-lcz-classification
├── heatwise-lcz-pipeline
├── heatwise-patch-extraction
├── heatwise-pftnc
└── lstm-wp3-products
inputs
├── class-guided
├── combined_hotspots_materials
├── hotspots
├── hsi-lst-prep
├── inertia
├── lcz-classification
├── lcz-pipeline
├── patch-extraction
├── pftnc
└── unmixing
application-packages
├── heatwise-combined-hotspots-materials.cwl
├── heatwise-hotspots.cwl
├── heatwise-inertia.cwl
├── heatwise_class_guided.cwl
├── heatwise_hsi_lst_prep.cwl
├── heatwise_hysupp_unmixing.cwl
├── heatwise_lcz_predict.cwl
├── heatwise_patch_extraction.cwl
├── heatwise_pipeline.cwl
└── pftnc.cwl

20 directories, 10 files

3.3 Rendering

This technical note is implemented using the Quarto framework. Using Quarto, the same content can be rendered in different formats.

In the following, instructions are given to render the demonstration as Jupyter Notebooks for interactive demonstration as well as website and PDF formats. Quarto is based on pandoc and supports a number of further output formats. Rendering to other formats may require additional steps not documented here.

Please note that you must have followed the instructions listed in Section 3.1 before running.

The supported render targets are available as pixi tasks. See pixi.toml for the corresponding quarto commands.

3.3.1 Website

This generates a HTML website in the _site directory.

pixi run render-website

For development you may prefer to use

pixi run preview

to start a live server that updates with changes to the source files.

3.3.2 PDF

This generates a single PDF document in the _book_pdf directory.

pixi run render-pdf

3.3.3 Notebooks

This command generates a Jupyter Notebook to demonstrate interoperability of each of the software products. This configuration does not render the rest of the documentation (like these instructions). The notebooks will be available in the _notebooks directory.

pixi run render-notebooks

The Jupyter server can be started using:

pixi run show-notebooks

3.4 Cleanup

Staged software, inputs and outputs can be cleared using the clean command. You will have to run stage again as described above to render the documentation or perform the demonstration.

Please note that this command will delete any processing outputs! Use with care.

pixi run clean

The rendered documentation can be cleared with the clean-docs command.

pixi run clean-docs