Skip to content

Development

Douglas Blank edited this page Mar 13, 2023 · 2 revisions

Development Installation

Getting the source:

git clone [email protected]:comet-ml/kangas.git

Backend - Python REST API

Install the Python backend from the above github clone:

cd kangas/backend
pip install -e .

Frontend - React Server Components

Run the frontend live from source:

cd kangas/frontend
yarn
yarn dev

You can run the backend without starting the frontend with:

kangas server --frontend no --open no --debug

Environment Variables

For the frontend:

  • KANGAS_BACKEND_PORT - the port number of the backend (default 4001)
  • KANGAS_HOST - the host IP address (for example, "127.0.1.1")
  • KANGAS_PROTOCOL - the protocol for the host (default "http")
  • KANGAS_HIDE_SELECTOR - flag to hide the DataGrid selector
  • KANGAS_ROOT - the file path to load DataGrids (default ".")

For the backend:

  • KANGAS_USE_CELERY - flag to use celery (default "0")
  • KANGAS_VERSION_CHECK - flag to check for new version of Kangas (default "1")

Server Flags

Many of the above environment variables can be set via the command-line flags to kangas server.

  • --backend-port - - the port number of the backend (default frontend-port + 1, e.g. 4001)
  • --backend - backend to use (default "flask"); options inlude: "tornado", or "no" for no backend
  • --debug-level - use this flag to set level of output from servers: DEBUG, INFO, WARNING, ERROR, or CRITICAL
  • --debug - use this flag to set display to DEBUG for output from servers
  • --filter - a filter to be applied to a given DataGrid
  • --frontend-port - the frontend port to use (default 400)
  • --frontend - the frontend to use; use 'no' for no frontend (default starts frontend)
  • --group - group to be applied to a given DataGrid
  • --hide-selector - use this flag to hide the DataGrid selector; default is to show the selector
  • --host - the name or IP the servers will listen on
  • --max-workers - use this flag to set the backend max_workers; default is min(32, number-of-CPUs + 4)
  • --open - how to open page in a webbrowser; 'tab', 'window', or 'no'
  • --protocol - use this flag to set a protocol for server requests. Defaults to "http"
  • --root - the directory from which to server datagrid files; default "."
  • --sort - sort order to be applied to a given DataGrid
  • --terminate - kill the Kangas servers

Table of Contents

Clone this wiki locally