Contributing#

To add more functionality to symphony_ui, symphony_lib, or any component, first set up a dev environment. Then, packages can be updated and deployed. If your change could be useful to other users, please consider making a pull request.

Development Installation#

1. Install JavaScript package managers.

Install Node and Yarn globally on your machine.

2. Create a Python environment.

With conda, using symphony as the environment name:

conda create -n symphony python=3.11
conda activate symphony

Or, instead using venv:

virtualenv --python /usr/local/opt/python/bin/python3 venv
source venv/bin/activate

3. Install Python dependencies.

Install Python dependences by running:

pip install -r requirements.txt

4. Install Symphony packages.

First, install the symphony_ui Python package.

scripts/dev-install.sh

Optionally, install all the widgets:

scripts/dev-install-widgets.sh

5. Build and watch for changes.

For the main symphony_ui package:

yarn dev

For symphony_lib:

cd symphony_lib
yarn watch

Optionally, for the widgets:

scripts/dev-watch-widgets.sh

Deployment Note#

As all packages depend on symphony_lib, whenever symphony_lib is updated, all packages need to follow. To do that, you need to manually bump all _version.py files for all widgets and for the main Symphony package. Then, you can use:

scrips/dev-watch-widgets.sh