You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the source code of the ETM Pro:
an online web app that let you create a future energy scenario for various countries, municipalities, neighbourhoods and more.
This software is Open Source, so you can fork it and alter at your will.
New users are recommended to use Docker to run ETEngine. Doing so will avoid the need to install additional dependencies.
Get a copy of ETModel. You may choose to clone the repository using Git, or download a ZIP archive from Github.
Build the ETModel image:
docker-compose build
Install dependencies and seed the database:
docker-compose run --rm web bash -c 'bin/rails db:drop && bin/setup'
This command drops any existing ETModel database; be sure only to run this during the initial setup! This step will also provide you with an e-mail address and password for an administrator account.
By default, ETModel will send requests to the beta (staging) version of ETEngine. This is used for testing purposes and is more frequently updated than the live (production) version.
Run ETEngine locally
If you wish to run a local copy of ETEngine, ETModel must be told where to find its API. You must first find your machine's local/private IP address; ETModel will use this to send messages directly to ETEngine, and also by your browser when you are using the ETModel application to create scenarios. To get your IP address, run:
ipconfig getifaddr en0 # on macOS
hostname -I # on Linux
ipconfig # on Windows
Create a file called config/settings.local.yml containing:
ete_url: https://YOUR_IP_ADDRESS:3000
Branches
When running ETEngine locally, be sure to use the same branch or tag for ETModel, ETEngine, and ETSource. You are likely to encounter errors if you fail to do so.
For example, if you wish to run the latest version all three should be set to the master branch. If you wish to run the production release from March 2022, they should all use the same tag:
cd ../etengine && git checkout 2022.03
cd ../etsource && git checkout 2022.03
cd ../etmodel && git checkout 2022.03
Mac users should be able to install the following prerequisites with Homebrew, Ubuntu users can use apt-get.
Ruby 2.6.6 and a Ruby version manager such as rbenv
Mysql database server
Yarn 1.22.5
Installing
Pull this repository with git clone git@github.com:quintel/etmodel.git
Local Engine You can communicate with either a local version of ETEngine, or one of our servers by specifying the ete_url in config.yml. To use a local version, change the standard beta server url to https://localhost:<PORT> based on which port you are running the Engine on.
Database password If you added a username and password to your mysql service, please replace the standard login info in database.yml with your own credentials.
Run bundle install and yarn install to install all the dependencies
Create and fill local database with rake db:setup and RAILS_ENV=test rake db:setup
Fire up your local server with rails server -p3001
If you want to get admin access to your own page, the easiest way to do so
is to create an Admin User through the console and follow instructions:
rake db:create_admin
Bugs and feature requests
If you encounter a bug or if you have a feature request, you can either let us
know by creating an Issueor you
can try to fix it yourself and create a
pull request.
With thanks...
The Energy Transition Model is built by Quintel. It is made possible by
open source software, and assets kindly provided for free by many wonderful people and
organisations.