These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.


Python 3 and Node.js installed on your machine.
If you do not have Python installed on your machine you can follow this guide
If you do not have Node.js installed on your machine you can follow this guide


This guide is for Mac OSX, Linux or Windows.
  1. 1.
    Get the source code from the GitHub repository
    $ git clone
    $ cd comfort_tool
  2. 2.
    Create a virtual environment using the following command:
    On Linux and MAC $ python3 -m venv venv
    On Windows py -3 -m venv venv
  3. 3.
    Activate the virtualenv:
    On Linux and MAC $ . venv/bin/activate
    On Windows venv\Scripts\activate
    Your shell prompt will change to show the name of the activated environment.
  4. 4.
    Install Python dependencies
    The dependencies of the comfort tool are all contained in requirements.txt. Install them all using: $ pip install -r requirements.txt
  5. 5.
    Install Node.js dependencies
    npm install
  6. 6.
    Run CBE Thermal Comfort Tool locally
    Now you should be ready to run the tool locally. python3
    Visit http://localhost:5000 in your browser to check it out. Note that whenever you want to run the tool, you have to activate the virtual environment first.


We are using Jest to test the JavaScript functions.
If you want to find out more please read their official documentation or look at how we are testing the ERF functions (file name erf.js) using the test file erf.test.js.
Finally, run npm run test. You should write tests for all the new functions you add and ensure that you get positive results from the tests. Also run tests before deploying a new version of the CBE Thermal Comfort Tool.


When you release a new version of the tool you should first use bumpversion to update the version of the tool. You can use the following command:
bumpversion patch # alternatively you can use minor or major instead of patch
Secondly, you should describe the changes in docs/changelog/


We are deploying the tool using Google Cloud Run. The project is automatically deployed when you push to master the commit message includes the word bump version. Check the GitHub action in the folder ./.github/workflows/deploy.yml for more information about how we build and deploy the application.
Alternatively, you can deploy a new version of the tool to Google Cloud Run using the following command:
gcloud builds submit --tag --project=comfort-327718
gcloud run deploy comfort-tool --image --platform managed --project=comfort-327718 --allow-unauthenticated --region=us-central1