metilda
April 14, 2026 ยท View on GitHub
Audio analysis web app.
Links
Web App
- Dev site: https://metilda-development-a68150797699.herokuapp.com/
- Prod site: https://metilda.net/
DevOps
Supported Platforms
Ubuntu Linux 20.04
Quickstart - Build and Run
Python
- Install a Python interpreter (the version is specified in runtime.txt, it is currently 3.8.10). Installation Instructions
- Create a virtualenv under the /venv folder
- Run these commands:
./venv/Scripts/python -r requirements.txt
./bin/runLocalServer.sh
React
- Install nodejs (the version is specified in
/frontend/package.json, it is currently 14.18.2) - Install Node Version Manager
- Run the following commands to switch to the correct version of node (Important for successfully running the frontend)
nvm install 14.18.2
nvm use 14.18.2
- Run these commands:
cd frontend
npm install
npm start
PyCharm IDE Configuration
TSLint
This feature enables tslint highlighting, it is only available in the Professional edition of PyCharm.
Configure tsconfig.json
- Open
Settings -> Language & Frameworks -> TypeScript - Set
Optionsto--project ./frontend/tsconfig.json
Configure tslint.json
- Open
Settings -> Language & Frameworks -> TypeScript -> TSLint - Select
Enable - Set
TSLint Packageto<REPO_DIR>\frontend\node_modules\tslint - Set
Configuration fileto<REPO_DIR>\frontend\tslint.json
Tests
Unit Tests
After configuring your build environment, run tests locally using ./bin/runTests.sh. For example:
/metilda$ ./bin/runTests.sh --python
Load Tests
To test web server behavior under load conditions use ./bin/loadTests.sh XXX where XXX is 5, 50, or 500 (the
number of simulated users).
Travis CI Configuration (Currently outdated)
Changing the Travis CI pipeline configuration requires that you have:
- Installed travis CLI
- Installed heroku CLI
- Repo hosted on GitHub
- Personal access token from your GitHub account
The .travis.yml file contains the configuration for running tests on Travis CI. Note the
secure field was made using these commands:
cmd> heroku logincmd> travis login --pro --github-token <YOUR_GIT_HUB_TOKEN>cmd> heroku authorizations:createcmd> travis encrypt <TOKEN_FROM_PREVIOUS_OUTPUT> --pro --add- Verify that the secure token has been set under
deploy > api_key
Deployment
The application is deployed to Heroku.
Deploy Configuration
The Python buildpack is configured for the application on Heroku. Additionally, several files are used by Heroku upon deployment:
runtime.txtdetermines the Python interpreter versionProcfileincludes the command that is used to start the web server
To initiate deployment:
- Run
./bin/push.shto deploy to Heroku
Development Environment
Build and Run on Ubuntu 20.04
Install Prerequisite Packages
$ sudo apt-get update
$ sudo apt-get install build-essential checkinstall virtualenv python-dev-is-python3 postgresql postgresql-contrib libpq-dev libfreetype6-dev libxft-dev ffmpeg
Install Praat - In order for the PELDA page to work the following steps need to be completed. https://www.fon.hum.uva.nl/praat/download_linux.html
$ wget https://www.fon.hum.uva.nl/praat/praat6156_linux64nogui.tar.gz
$ tar xzf praat6156_linux64nogui.tar.gz
$ cp praat_nogui /usr/bin/
Clone the Metilda Repository
$ git clone https://github.com/metilda-uw/metilda.git
Create and activate a virtual environment
$ virtualenv metilda --python=3.8.10
$ cd metilda
$ source bin/activate
*An alternative Option: Create a virtual environment via PyCharm & Follow PyCharm IDE Configuration steps
https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html
Verify that Python and Pip are installed correctly
$ python -V
$ pip -V
Install Python packages using requirements.txt
$ pip install -r requirements.txt
Install Node and NVM
- Install nodejs (the version is specified in
/frontend/package.json, it is currently 14.18.2). You can install the current version of Node then use nvm to manage the version used in the project.
$ apt install nodejs
- Install Node Version Manager
- Run the following commands to install and switch to the correct version of node (Important for successfully running the frontend)
$ nvm install 14.18.2
$ nvm use 14.18.2
Install NPM packages (run this one time at setup)
$ cd frontend
$ npm install
In two separate terminals run backend and frontend
Run backend (after activating virtual environment)
$ cd src
$ python -m metilda.local_server
Run frontend (In a second terminal window)
$ cd frontend
$ npm start