Skip to content

Commit

Permalink
merged master [ ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
JayHuLBL committed Jul 21, 2021
2 parents 8a15e42 + 4867dd7 commit 4ce2656
Show file tree
Hide file tree
Showing 1,822 changed files with 565,936 additions and 16,029 deletions.
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
libModelicaBuildingsEnergyPlus*.* filter=lfs diff=lfs merge=lfs -text
ModelicaBuildingsEnergyPlus*.dll filter=lfs diff=lfs merge=lfs -text
ModelicaBuildingsEnergyPlus*.lib filter=lfs diff=lfs merge=lfs -text
libepfmi*.* filter=lfs diff=lfs merge=lfs -text
libfmilib*.* filter=lfs diff=lfs merge=lfs -text
fmilib_shared*.* filter=lfs diff=lfs merge=lfs -text
epfmi*.* filter=lfs diff=lfs merge=lfs -text
VCRUNTIME*.dll filter=lfs diff=lfs merge=lfs -text
Buildings/Resources/src/ThermalZones/EnergyPlus/FMUs/Zones1.fmu filter=lfs diff=lfs merge=lfs -text
Buildings/Resources/src/ThermalZones/EnergyPlus/FMUs/Zones3.fmu filter=lfs diff=lfs merge=lfs -text
Buildings/Resources/bin/spawn-*/bin/spawn filter=lfs diff=lfs merge=lfs -text
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Open model '...'
2. Run script '....'
3. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Version**
- Modelica Buildings Library: [version or commit]
- Modelica simulation environment
- Operating system

**Additional context**
Add any other context about the problem here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/custom-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Custom issue
about: Issues other than bug report or feature request
title: ''
labels: ''
assignees: ''

---


20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
98 changes: 98 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Workflow for CI tests
name: CI-documentation-and-format

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master, maint_*, release* ]
pull_request:
branches: [ master, maint_*, release* ]

# Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:

defaults:
run:
shell: bash
working-directory: Buildings

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

test-formatting:
# Skip if the commit message contains "ci skip"
if: "!contains(github.event.head_commit.message, 'ci skip')"

runs-on: ubuntu-18.04

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: '3.6' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified

- name: "Install pip"
run: pip3 install --upgrade pip setuptools wheel

- name: "Install sphinx and its dependencies"
run: pip3 install \
sphinx==2.1.2 \
sphinx-bootstrap-theme==0.7.1 \
sphinxcontrib-bibtex==0.4.2 \
sphinxcontrib-plantuml==0.17 \
alabaster==0.7.12 \
MarkupSafe==1.1.1 \
Pygments==2.4.2 \
snowballstemmer==1.9.0 \
docutils==0.15.2 \
Babel==2.7.0 \
requests==2.22.0 \
Jinja2==2.10.1 \
latexcodec==1.0.7 \
pybtex==0.22.2 \
pybtex-docutils==0.2.1 \
oset==0.1.3 \
PyYAML==5.1.2

- name: "Install BuildingsPy"
run: pip3 install git+https://github.com/lbl-srg/BuildingsPy@master

- name: "Test html syntax"
run : ../bin/runUnitTests.py --validate-html-only

- name: "Test experiment setup"
run : ../bin/runUnitTests.py --validate-experiment-setup

- name: "Test if package.order are correct"
run : |
python -c 'import buildingspy.development.refactor as r; r.write_package_order(".", recursive=True)'
git diff --exit-code .
- name: "Verify files for invalid strings"
run: ${GITHUB_WORKSPACE}/bin/verifyFiles.py

- name: "Verify that all OpenModelica scripts are up to date, and no old scripts exist"
run : |
rm Resources/Scripts/OpenModelica/compareVars/*.mos
python -c 'import buildingspy.development.regressiontest as u; u.Tester().writeOpenModelicaResultDictionary()'
git status --porcelain Resources/Scripts/OpenModelica
test -z $(git status --porcelain Resources/Scripts/OpenModelica)
- name: "Test user guide"
run : (cd Resources/Documentation/userGuide; make regressiontest)

- name: "Test heat pump documentation"
run : (cd Resources/src/fluid/heatpumps/calibration/doc; make regressiontest)

- name: "Check for UnitConversion package to be consistent with the script that generates it"
run : |
cd ..
python Buildings/Resources/src/Controls/OBC/UnitConversions/unit_converters.py
git diff --exit-code Buildings
- name: Check for UTF-8 BOM
run: "! find . -name '*.mo' -print0 | xargs -0 grep -l $'^\\xEF\\xBB\\xBF' | grep ."
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ Buildings/Resources/src/fluid/heatpumps/calibration/doc/build/doctrees
# Spawn temporary directories
#########################################
tmp-eplus-*
eplus*
sqlite*
*/EnergyPlus-simulation*
86 changes: 64 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
<<<<<<< HEAD
dist: trusty
sudo: false
=======
os: Linux
dist: bionic
>>>>>>> master

language: python
python:
- "3.6"

branches:
only:
- master
- /^maint_.*$/
- release

cache: pip

notifications:
Expand All @@ -15,12 +26,38 @@ git:

services:
- docker
<<<<<<< HEAD

env:
global:
- ENERGYPLUS_VERSION=EnergyPlus-9.2.0-921312fa1d-Linux-x86_64
jobs:
- TEST_ARG="make test-documentation test-experiment-setup test-autogenerated-files test-verify-files"
=======
- xvfb


addons:
apt:
sources:
- sourceline: "deb https://build.openmodelica.org/omc/builds/linux/releases/1.16.1/ bionic release"
key_url: "http://build.openmodelica.org/apt/openmodelica.asc"
packages:
- omc=1.16.1-1
- omlib-modelica-3.2.2 #3.2.3 is not in https://build.openmodelica.org/omc/builds/linux/releases/1.16.1/dists/bionic/release/binary-amd64/Packages.gz


env:
global:
- ENERGYPLUS_VERSION=EnergyPlus-9.5.0-de239b2e5f-Linux-Ubuntu18.04-x86_64
- MODELICA_JSON_VERSION=6d950c3592fa021aa914ba4ff34a67cbb69962c6
- MODELICA_JSON_HOME=${TRAVIS_BUILD_DIR}/modelica-json

jobs:
- TEST_ARG="make test-cdl-conformance"
- TEST_ARG="make test-energyplus-validations"
- TEST_ARG="make test-bestest test-spawn-portability"
>>>>>>> master
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.{Air,Examples}\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.{Air,Examples}\""
- TEST_ARG="make test-jmodelica PACKAGE=\"Buildings.{Air,Examples}\""
Expand Down Expand Up @@ -72,6 +109,7 @@ env:

before_install:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
<<<<<<< HEAD
- if [[ "$TEST_ARG" == *test-dymola* ]]; then
docker pull "$DOCKER_USERNAME"/travis_ubuntu-1804_dymola-2020x-x86_64;
chmod +x Buildings/Resources/Scripts/travis/dymola/dymola;
Expand All @@ -80,6 +118,14 @@ before_install:
- if [[ "$TEST_ARG" == *test-optimica* ]]; then
docker pull "$DOCKER_USERNAME"/travis-ubuntu-1804-optimica;
chmod +x Buildings/Resources/Scripts/travis/optimica/jm_ipython.sh;
=======
- if [[ "$TEST_ARG" == *test-dymola* || "$TEST_ARG" == *test-bestest* || "$TEST_ARG" == *spawn-portability* ]]; then
docker pull "$DOCKER_USERNAME"/travis_ubuntu-1804_dymola:2022-x86_64;
cp Buildings/Resources/Scripts/travis/dymola/dymola $HOME/bin/;
fi;
- if [[ "$TEST_ARG" == *test-optimica* ]]; then
docker pull "$DOCKER_USERNAME"/travis-ubuntu-1804-optimica:r19089;
>>>>>>> master
cp Buildings/Resources/Scripts/travis/optimica/jm_ipython.sh $HOME/bin/jm_ipython.sh;
fi;
- if [[ "$TEST_ARG" == *test-jmodelica* ]]; then
Expand All @@ -88,10 +134,21 @@ before_install:
cp Buildings/Resources/Scripts/travis/jmodelica/jm_ipython.sh $HOME/bin/jm_ipython.sh;
fi;
- if [[ "$TEST_ARG" == *test-energyplus* ]]; then
wget https://github.com/NREL/EnergyPlus/releases/download/v9.2.0/${ENERGYPLUS_VERSION}.tar.gz;
wget --no-verbose https://github.com/NREL/EnergyPlus/releases/download/v9.5.0/${ENERGYPLUS_VERSION}.tar.gz;
tar xzf ${ENERGYPLUS_VERSION}.tar.gz;
cd ${ENERGYPLUS_VERSION};
mv energyplus EnergyPlus;
rm ${ENERGYPLUS_VERSION}.tar.gz;
echo "Installed EnergyPlus in ${PWD}/${ENERGYPLUS_VERSION}";
fi;
- if [[ "$TEST_ARG" == *test-cdl-conformance* ]]; then
wget --no-verbose https://github.com/lbl-srg/modelica-json/archive/${MODELICA_JSON_VERSION}.tar.gz;
tar xzf ${MODELICA_JSON_VERSION}.tar.gz;
rm ${MODELICA_JSON_VERSION}.tar.gz;
mv modelica-json-${MODELICA_JSON_VERSION} ${MODELICA_JSON_HOME};
cd ${MODELICA_JSON_HOME};
make install-node-packages;
make compile;
cd -;
echo "Installed modelica-json in ${MODELICA_JSON_HOME}";
fi;

# Install dependencies
Expand All @@ -101,26 +158,11 @@ before_install:
install:
- pip3 install --upgrade pip setuptools wheel
- pip3 install --only-binary=numpy,scipy,matplotlib numpy==1.13.3 scipy==0.19.1 matplotlib==2.1.0
- if [[ "$TEST_ARG" == *test-documentation* ]]; then
pip3 install sphinx==2.1.2 \
sphinx-bootstrap-theme==0.7.1 \
sphinxcontrib-bibtex==0.4.2 \
sphinxcontrib-plantuml==0.17 \
alabaster==0.7.12 \
MarkupSafe==1.1.1 \
Pygments==2.4.2 \
snowballstemmer==1.9.0 \
docutils==0.15.2 \
Babel==2.7.0 \
requests==2.22.0 \
Jinja2==2.10.1 \
latexcodec==1.0.7 \
pybtex==0.22.2
pybtex-docutils==0.2.1 \
oset==0.1.3 \
PyYAML==5.1.2;
fi;
- pip3 install git+https://github.com/lbl-srg/BuildingsPy@master
- if [[ "$TEST_ARG" == *test-energyplus* ]]; then
export PATH=${PATH}:${TRAVIS_BUILD_DIR}/${ENERGYPLUS_VERSION};
pip3 install pandas==1.0.1;
fi;

# Execute tests
script:
Expand Down
Loading

0 comments on commit 4ce2656

Please sign in to comment.