Skip to content

Contributing to this project

Blake C edited this page Apr 18, 2024 · 5 revisions

First things first, you will need to clone the repository.

When working on one of the local (python) applications, you will need to run pip install -r local-pip-requirements.txt It is recommended to make a virtual environment first.

When working with docker you will need Docker Desktop. With the docker engine running, use the command docker compose up --build to start the creativity optional server.

Most of the local audio servers that are python scripts can be run using python3 path/to/local-audio-server.py from inside the virtual environment.

The local application for miscellaneous scripts follows the same general format as the audio applications, but is generalized to keep track of several commands and serve them asynchronously.

All of the main files should be well documented, I would recommend looking at them for more detailed information. Most of them also have a Task List at the top of the file with file-specific tasks.

If you are looking for a place to start, checking off those tasks would be greatly appreciated.

developing your own local servers

For examples, look at the local_application/ folder.

audio servers:

The primary way to communicate with the creativity-optional server is using HTTP POST requests, at the very least, the request should be a json with a 'data' key which contains an array of raw audio data.

misc server:

Use POST requests, but the json should have [key]: [value] pairs where the key is the name of the input and the value is an integer between 0 and 100

developing the docker application

Right now the flask server is the only thing running in the docker application, although this might change when adding support for server-side rendering. Everything in the docker application goes in the src/ folder.

developing the front-end

The front-end is a Vue application that is served by the flask server. It has two primary pages, the general settings page, and the output-only page. Both of these are very much works-in-progress. The source for the front-end can be found in vue-frontend/ Right now, the front-end periodically makes GET requests to the server for new information and sends POST requests to update settings.

making pull requests

The develop and main branches are protected. The general workflow looks something like this: from develop make a new branch that works on a specific thing. After working on the code, push the new branch and make a draft pull request. When your contribution is ready it will be converted to a normal pull request and merged into develop.