Skip to content

Commit

Permalink
Merge pull request #226 from ecobee/dev
Browse files Browse the repository at this point in the history
release 0.6.0-alpha
  • Loading branch information
tomstesco authored Mar 25, 2022
2 parents c425622 + f3f9515 commit e14c0ec
Show file tree
Hide file tree
Showing 28 changed files with 786 additions and 329 deletions.
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LOCAL_PACKAGE_DIR=<where you cloned the repo>
# docker and package info:
# do not change from default, may break integration
PACKAGE_NAME=building-controls-simulator
VERSION_TAG=0.4.1-alpha
VERSION_TAG=0.6.0-alpha
DOCKERHUB_REPOSITORY=tstesco
MAINTAINER=tom.stesco@gmail.com
USER_NAME=bcs
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
"--line-length",
"79"
],
"python.jediEnabled": true,
"python.jediEnabled": false,
"editor.rulers": [
79,
90
],
"python.languageServer": "Jedi",
"python.languageServer": "Pylance",
"spellright.language": [
"English"
],
Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# 0.6.0-alpha (2022-03-15)

# 0.5.0 (2021-06-13)
## Features and Improvements
- update dependencies to latest versions (see diff of requirements.txt)
- DataSpec and conversions support nullable and non-nullable data types in numpy and pandas

## Breaking changes
- Previously undefined behaviour of nullable data types must now be defined in conversions

## Bug fixes
- fixed make_epw_file and adding test_make_epw_file
- fixed DataClient issue with data type conversion after filling nulls
- fixed DataClient.py removal of columns that get truncated to all NA

# 0.5.0-alpha (2021-06-13)

## Features and Improvements
- simplify `.env` setup and usage
Expand Down
47 changes: 15 additions & 32 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,17 @@ RUN sudo apt-get update && sudo apt-get upgrade -y \
gfortran \
&& sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# install nodejs and npm (for plotly)
# install pyenv https://github.com/pyenv/pyenv-installer
# note: pyenv.run is not accessible to all networks, use github url
# install FMI library
# install FMUComplianceChecker
# install EnergyPlusToFMU
# download and extract PyFMI release
# because we dont use builtin PyFMI ODE simulation capabilities
RUN curl -sL https://deb.nodesource.com/setup_12.x | sudo bash - \
&& sudo apt-get update && sudo apt-get install -y nodejs \
&& curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash \
&& pyenv update && pyenv install 3.8.9 \
&& mkdir "${LIB_DIR}" && mkdir "${EXT_DIR}" \
RUN mkdir "${LIB_DIR}" && mkdir "${EXT_DIR}" \
&& cd "${EXT_DIR}" \
&& curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash \
&& pyenv update && pyenv install 3.8.12 \
&& wget "https://github.com/modelon-community/fmi-library/archive/refs/tags/2.3.zip" \
&& unzip "2.3.zip" && mv "fmi-library-2.3" "FMIL" \
&& rm -rf "2.3.zip" \
Expand Down Expand Up @@ -116,18 +113,18 @@ RUN curl -sL https://deb.nodesource.com/setup_12.x | sudo bash - \
&& cd "build" \
&& cmake -DCMAKE_INSTALL_PREFIX="${EXT_DIR}/lapack" .. \
&& cmake --build . -j --target install \
# get Assimulo source
# get Assimulo source (dep of PyFMI 2.8+)
&& cd "${EXT_DIR}" \
&& wget "https://github.com/modelon-community/Assimulo/archive/refs/tags/Assimulo-3.2.5.tar.gz" \
&& tar -xzf "Assimulo-3.2.5.tar.gz" && rm "Assimulo-3.2.5.tar.gz" \
&& mv "${EXT_DIR}/Assimulo-Assimulo-3.2.5" "${EXT_DIR}/Assimulo-3.2.5" \
&& wget "https://github.com/modelon-community/Assimulo/archive/refs/tags/Assimulo-3.2.9.tar.gz" \
&& tar -xzf "Assimulo-3.2.9.tar.gz" && rm "Assimulo-3.2.9.tar.gz" \
&& mv "${EXT_DIR}/Assimulo-Assimulo-3.2.9" "${EXT_DIR}/Assimulo-3.2.9" \
# get PyFMI source
&& cd "${EXT_DIR}" \
&& wget "https://github.com/modelon-community/PyFMI/archive/refs/tags/PyFMI-2.8.10.tar.gz" \
&& tar -xzf "PyFMI-2.8.10.tar.gz" && rm "PyFMI-2.8.10.tar.gz"\
&& mv "${EXT_DIR}/PyFMI-PyFMI-2.8.10" "${EXT_DIR}/PyFMI" \
# make PACKAGE_DIR and cleanup
&& wget "https://github.com/modelon-community/PyFMI/archive/refs/tags/PyFMI-2.9.5.tar.gz" \
&& tar -xzf "PyFMI-2.9.5.tar.gz" && rm "PyFMI-2.9.5.tar.gz"\
&& mv "${EXT_DIR}/PyFMI-PyFMI-2.9.5" "${EXT_DIR}/PyFMI" \
&& cd "${LIB_DIR}" \
# make PACKAGE_DIR and cleanup
&& mkdir "${PACKAGE_DIR}" \
&& sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand All @@ -144,38 +141,24 @@ RUN sudo chown -R "${USER_NAME}" "${PACKAGE_DIR}" \
&& sudo chmod +x "./scripts/setup/install_ep.sh" \
&& sudo ./scripts/setup/install_ep.sh "${ENERGYPLUS_INSTALL_DIR}" \
&& cd "${PACKAGE_DIR}" \
&& ${PYENV_ROOT}/versions/3.8.9/bin/python3.8 -m venv "${LIB_DIR}/${VENV_NAME}" \
&& ${PYENV_ROOT}/versions/3.8.12/bin/python3.8 -m venv "${LIB_DIR}/${VENV_NAME}" \
&& . "${LIB_DIR}/${VENV_NAME}/bin/activate" \
&& pip install --no-cache-dir --upgrade setuptools pip \
&& pip install --no-cache-dir -r "requirements.txt" \
# && pip install --no-cache-dir -r "requirements_unfixed.txt" \
# install bcs
&& pip install --editable . \
# install Assimulo (dep of PyFMI 2.8+)
&& cd "${EXT_DIR}/Assimulo-3.2.5" \
&& python setup.py install --sundials-home="${HOME}/sundials" --blas-home="${HOME}/lapack/lib" --lapack-home="${HOME}/lapack" \
&& cd "${EXT_DIR}/Assimulo-3.2.9" \
&& python setup.py install --sundials-home="${EXT_DIR}/sundials" --blas-home="${EXT_DIR}/lapack/lib" --lapack-home="${EXT_DIR}/lapack" \
# install PyFMI
&& cd "${EXT_DIR}/PyFMI" \
&& python "setup.py" install --fmil-home="${FMIL_HOME}" \
&& cd "${PACKAGE_DIR}" \
&& . "scripts/setup/install_solvers.sh" \
&& cd "${EXT_DIR}" \
&& wget "https://github.com/RJT1990/pyflux/archive/0.4.15.zip" \
&& unzip "0.4.15.zip" && rm "0.4.15.zip" \
&& cd "pyflux-0.4.15" \
&& pip install --no-cache-dir .
&& . "scripts/setup/install_solvers.sh"

# install jupyter lab extensions for plotly
# if jupyter lab build fails with webpack optimization, set --minimize=False
# copy .rc files to user home for use on startup. This can be further configured by user.
RUN cd "${PACKAGE_DIR}" \
&& . "${LIB_DIR}/${VENV_NAME}/bin/activate" \
&& export NODE_OPTIONS="--max-old-space-size=8192" \
&& jupyter labextension install @jupyter-widgets/jupyterlab-manager@2 --no-build \
&& jupyter labextension install jupyterlab-plotly --no-build \
&& jupyter labextension install plotlywidget@1.5.0 --no-build \
&& jupyter lab build --dev-build=False --minimize=True \
&& unset NODE_OPTIONS \
&& cp "${PACKAGE_DIR}/scripts/setup/.bashrc" "$HOME/.bashrc" \
&& cp "${PACKAGE_DIR}/scripts/setup/.pdbrc" "$HOME/.pdbrc" \
&& chmod +x "${PACKAGE_DIR}/scripts/setup/jupyter_lab_bkgrnd.sh"
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,6 @@ Several dependencies are installed from source so these must be removed from the
```
PyFMI
pyflux
Assimulo
hpipm-python
```
Expand Down
Loading

0 comments on commit e14c0ec

Please sign in to comment.