An online tool for fast energy saving estimations of expanded temperature ranges.
Develop an interactive online calculator to provide estimations of potential energy savings based on expanded temperature deadbands. More information about the tool can be found here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Python 3 installed on your machine.
If you do not have Python installed on your machine you can follow this guide
This guide is for Mac OSX, Linux or Windows.
- Get the source code from the GitHub repository
$ git clone https://github.com/CenterForTheBuiltEnvironment/energy-calc.git
$ cd comfort_tool
- Create a virtual environment using the following command:
On Linux and MAC $ python3 -m venv venv
On Windows py -3 -m venv venv
- 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.
- Install Python dependencies
The dependencies of the comfort tool are all contained in requirements.txt.
Install them all using:
$ pip install -r requirements.txt
- Run the tool locally
Now you should be ready to run the tool locally.
python3 energycalc.py
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 virtualenv first.
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
You need to have gcloud installed on your computer. A short guide on how to deploy on Google Cloud Run can be found here.
First make sure you that gcloud is up-to-date and that you are logged in with the right account.
gcloud components update
gcloud auth list
gcloud run deploy energy-calc --source . --platform managed --project=energy-calc-310016 --allow-unauthenticated --region=us-central1