Welcome to Tethys App Warehouse’s documentation!

The Tethys App Warehouse is similar in concept to the iOS App Store for Apple mobile devices or the Google Play Store for Android mobile devices, but exclusively for Tethys Applications. The Tethys App Warehouse aims to make web applications portable by packaging Tethys Applications and hosting it on Miniconda repositories. The warehouse includes an option for developers to contribute their applications by following a two-step work-flow within the warehouse user interface, while the warehouse takes care of all the heavy lifting of correctly preparing the code and making it available as an easily installable Miniconda package.

Warning

This documentation as well as application is under development.

Installation

This application can be installed on your local Tethys portal in the following ways:

Install from GitHub

#Activate tethys environment if not already active
t

git clone https://github.com/BYU-Hydroinformatics/warehouse.git
cd warehouse
tethys install

Application Submission

Before attempting to submit your application to the warehouse, ensure that your application fulfills the requirements for Tethys App Warehouse:

Application Metadata + setup.py

The build process uses the setup.py file to pull the metadata for your application. The following fields are pulled from the setup.py and are displayed in the application warehouse:

  • Application name (Same as release package)

  • Version

  • Description

  • Keywords

  • Author Name

  • Author Email

  • URL

  • License

It is recommended to fill in the values in your setup.py so that your application has those details visible in the warehouse for easier discovery and filtering.

Each time you have a new version for your application, it is recommended to update the version number in your setup.py file so that a new package is built and published.

Steps to Submit

Developers can submit their applications to the warehouse by click on the Add App button as highlighted in the image below:

_images/add_button.png

Upon clicking that button, you will be presented with a modal that asks for the link to the GitHub Repository of your Tethys Application. It also instructs to put in an email address which is notified once the build is completed successfully and the application is available on the warehouse.

_images/add_step_1.png
  • Enter Notification email address (Mostly this will be your own or the developer’s email address)

  • Enter the link to your GitHub Repository

  • If there are multiple branches on your GitHub repository, you will be presented with a list of branches on your GitHub repository, Select the branch that you would like to submit to the application warehouse. The warehouse uses the Master branch in case

  • After selecting the branch the warehouse begins the processing. Once the build is done, an email will be sent to the address provided.

Note

After your application is successfully built, you will need to tell the warehouse to refresh your local list of applications. To do this click on the refresh button as shown in the image below.

_images/refresh_button.png

Production Installation

On a production server, ensure that you set the custom settings which require the SUDO password to the server user that has the ability to restart the Tethys Process. Usually this is the same as the user you used to setup Tethys. The password is stored in a Database and is only used when we need to restart the server after installing an application so that the changes can be seen.

Also, in case the Tethys portal is run within a Docker container, we need to ensure that the proxy setup on the host machine to forward Tethys requests to the Docker container supports Websockets as well. A working example is here:

# top-level http config for websocket headers
# If Upgrade is defined, Connection = upgrade
# If Upgrade is empty, Connection = close
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}


server {
    listen 8008 default_server;
    listen [::]:8008 default_server ipv6only=on;


location /tethys {
            rewrite ^/tethys/(.*)$ /$1 break;
            proxy_pass http://127.0.0.1:8006$uri$is_args$args;
            proxy_set_header Host $host;
            proxy_set_header X-Script-Name /tethys;
            proxy_cookie_path / /tethys;

            #WEBSOCKET Support
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $connection_upgrade;
        }

}

Compatibility

Publications

Future Improvements

Developers and Funding