Skip to main content

A Tethys App for no code/low code web application development app

Project description

TethysDash

This app was created using an experimental Tethys + React app scaffold. It uses React for the frontend of the app and Tethys as the backend. For more detailed information, check the official TethysDash documentation

Quick Installation

  1. If creating a new python environment, create and activate it
    python3 -m venv test_env
    source test_env/bin/activate
  1. Install TethysDash
    pip install tethysdash
  1. Setup Tethys and TethysDash Databases and Services
    tethysdash setup
  1. Start Tethys Portal
    tethysdash start

Development Installation

You need to install both the Tethys dependencies and the node dependencies:

  1. If creating a new python environment, create and activate it
    python3 -m venv test_env
    source test_env/bin/activate
  1. Clone the Repo
git clone https://github.com/tethysplatform/tethysapp-tethys_dash
  1. Install the app in Tethys Platform
cd tethysapp-tethys_dash/
pip install -e .
  1. Setup Tethys and TethysDash Databases and Services
    tethysdash setup
  1. Install Plugin Examples (not necessary but recommended)
cd ..
git clone https://github.com/FIRO-Tethys/tethysdash_examples
cd tethysdash_examples
pip install -e .
  1. Start Tethys Portal
    tethysdash start

Frontend Development

The webpack dev server is configured to proxy the Tethys development server (see webpack.config.js). The app endpoint will be handled by the webpack development server and all other endpoints will be handled by the Tethys (Django) development server. As such, you will need to start both in separate terminals.

  1. Install the node and dependencies
cd tethysapp-tethys_dash/
npm install --dev
  1. Start Tethys development server
tethys manage start
  1. Start webpack development server (in separate terminal)
npm start

Frontend Build

Webpack is configured to bundle and build the React app into the tethysapp/<app_package>/public/frontend directory. Before building a Python distribution for release, you should build using this command:

npm run build

Note: The compiled frontend in tethysapp/tethysdash/public/frontend/ is not committed to the repository — CI builds it when publishing a release. When running the app from a clone, you must build it yourself first: either run npm run build before tethysdash start, or use the webpack dev server (npm start) which serves the bundle from memory. Without one of these, Django has no frontend bundle to serve.

Serving the built frontend in development

The production build emits content-hashed filenames (e.g. main.<hash>.js) and a manifest.json mapping logical names to the hashed files. Mode detection is automatic:

  • Hit Django directly (e.g. localhost:8000/apps/tethysdash/) → the page loads the hashed bundle named in manifest.json, served straight from the app's public/frontend/ directory.
  • Hit the webpack dev server (e.g. localhost:8080) → the dev server proxies the page request to Django with an X-Webpack-Dev-Server header. Django detects it and renders the unhashed main.js URL, which the dev server serves from memory.

No environment variable or DEBUG toggle is required to switch between the two.

Frontend Test

Use the following commands to lint and test the React portion of the app.

npm run lint
npm run test

The linting capability is powered by eslint and a number of plugins for React. The testing capabilities include jest, jsdom, testing-framework, user-event, and a few other JavaScript testing utilties to make it easy to test the frontend of the React-Tethys app.

Backend Lint and Test

The Python backend is linted with ruff and tested with pytest:

ruff check .
python -m pytest --reuse-db

Continuous Integration and Releasing

CI runs in GitHub Actions (.github/workflows/):

  • On every pull request to main (ci.yml): the frontend (eslint, prettier, jest) and backend (ruff, pytest) suites must pass.
  • On a version tag (release.yml): the suite re-runs, then the package is built and published to PyPI.

The package version is dynamic — it is derived from the git tag at build time by setuptools_scm, not stored in pyproject.toml. To cut a release, push a v-prefixed semantic-version tag from main:

git tag v0.19.17
git push origin v0.19.17

This triggers the release workflow, which publishes tethysdash 0.19.17 to PyPI (via PyPI Trusted Publishing) and creates a GitHub Release. Tags must use the v prefix for the workflow to fire.

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

tethysdash-0.19.18.tar.gz (58.8 MB view details)

Uploaded Source

Built Distribution

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

tethysdash-0.19.18-py3-none-any.whl (10.7 MB view details)

Uploaded Python 3

File details

Details for the file tethysdash-0.19.18.tar.gz.

File metadata

  • Download URL: tethysdash-0.19.18.tar.gz
  • Upload date:
  • Size: 58.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tethysdash-0.19.18.tar.gz
Algorithm Hash digest
SHA256 9a431b58a6b1ee569ee3a11935b0a6cb051727f5b1f56bd690848aea81e137b5
MD5 db36df2edc5b86d47f6a1a56b5735623
BLAKE2b-256 d82b9b85c7ab25f135ef3226aa1ef2e7a0dfe15295db1a41d69107888944b244

See more details on using hashes here.

Provenance

The following attestation bundles were made for tethysdash-0.19.18.tar.gz:

Publisher: release.yml on tethysplatform/tethysapp-tethys_dash

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tethysdash-0.19.18-py3-none-any.whl.

File metadata

  • Download URL: tethysdash-0.19.18-py3-none-any.whl
  • Upload date:
  • Size: 10.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tethysdash-0.19.18-py3-none-any.whl
Algorithm Hash digest
SHA256 3b2494150f648cd72088f9ec18a5a3021ad914c302fcf78dac957ad9dd8195cf
MD5 e52f4161eda57813876429c3b9e24d55
BLAKE2b-256 755de963305025c2547f915101ab7707832e8f7e1331559c94666e86216e76a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for tethysdash-0.19.18-py3-none-any.whl:

Publisher: release.yml on tethysplatform/tethysapp-tethys_dash

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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