Open-source algorithms for data-driven building analysis and control
Install the current local opengrid files using the following command:
python3 -m pip install .Install the latest available published opengrid package using
python3 -m pip install opengridMake sure the following are installed on your system:
| Linux | MacOS | Windows | |
|---|---|---|---|
| git | apt install git |
brew install git |
via git-scm |
| python3 | apt install python3 |
brew install python3 |
via python.org |
Check if installation was succesful by running:
git --version
python3 --versionClone the opengrid repository to wherever you like:
git clone https://github.com/EpoxyD/opengrid.git && cd opengridFor safety and clarity we suggest you use a virtual development environment. This environment makes sure that there is no ambiguity between your already available python packages on your system and the ones you'll be using for development.
Get started using the following command. You are inside the new environment once you see the environment name in front of your terminal entry.
python3 -m venv venv
source ./venv/bin/activateWhen you are done developing, deactivate the virtual environment. This will give you back access to your own python packages. Do not remove the test environment if you are planning to use it again later. You can just re-activate it.
deactivate
(optional) rm -rf venvInstall required packages for development (Inside of virtual environment if you are using this).
python3 -m pip install -r requirements.txt
python3 -m pip install -r test/requirements.txtFirst, install the local package (as mentioned above). This will install the opengrid dependencies on your system, or in your virtual environment.
To test if everything is setup correctly you can execute one of the test scripts:
python3 -m pytest test/test_analyses.pyIf the terminal prints out something like:
test/test_analyses.py::AnalysisTest::test_count_peaks PASSED [ 16%]
test/test_analyses.py::AnalysisTest::test_load_factor PASSED [ 33%]
test/test_analyses.py::AnalysisTest::test_share_of_standby_1 PASSED [ 50%]
test/test_analyses.py::AnalysisTest::test_share_of_standby_2 PASSED [ 66%]
test/test_analyses.py::AnalysisTest::test_standby PASSED [ 83%]
test/test_analyses.py::AnalysisTest::test_standby_with_time_window PASSED [100%]Then your setup is OK! Welcome to the OpenGrid development team.