Last Updated: May 2022
Tethys Platform provides an easy way to create new app projects called a scaffold. The scaffold generates a Tethys app project with the minimum files and the folder structure that is required (see App Project Structure).
Create a new app for this tutorial as follows:
Activate the Tethys conda environment:
conda activate tethys
Scaffold a new app named
tethys scaffold dask_tutorial
App dependencies should be managed using the
install.yml instead of the
setup.py. This app will require the
tethys_dask_scheduler packages. Both packages are available on
conda-forge, which is the preferred Conda channel for Tethys. Open
tethysapp-dask_tutorial/install.yml and add these dependencies to the
requirements.conda section of the file:
# This file should be committed to your app code. version: 1.0 # This should match the app - package name in your setup.py name: dask_tutorial requirements: # Putting in a skip true param will skip the entire section. Ignoring the option will assume it be set to False skip: false conda: channels: - conda-forge packages: - dask - tethys_dask_scheduler pip: post:
Install the app and it's dependencies into your development Tethys Portal. In a terminal, change into the
tethysapp-dask_tutorial directory and execute the tethys install -d command.
cd tethysapp-dask_tutorial tethys install -d
Start up the development server to view the new app:
tethys manage start
To stop the development server press CTRL-C.
If you get errors related to Tethys not being able to connect to the database, start the database by running:
tethys db start
You can also stop the Tethys database by running:
tethys db stop
Browse to http://127.0.0.1:8000/apps in a web browser and login. The default portal user is:
Documentation for Dask may be found at https://dask.org
Dask is a tool for natively scaling and parallelizing python. It can broadly be categorized into dynamic task scheduling, and "big data" collections.
Dask Delayed tasks operate lazily. This means that execution is split onto a separate thread for completion and then return.
Dask Distributed is a tool for managing a medium sized cluster. See https://distributed.readthedocs.io/en/latest/