Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into 8722_HVAC_Diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed Jul 1, 2021
2 parents 1916bec + 4708fe7 commit 92070af
Show file tree
Hide file tree
Showing 200 changed files with 5,211 additions and 4,385 deletions.
117 changes: 117 additions & 0 deletions .github/workflows/documentation-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Documentation Windows

on:
push:
branches: [ master, develop ]

env:
CMAKE_Fortran_COMPILER: "/c/msys64/mingw64/bin/x86_64-w64-mingw32-gfortran.exe"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_TYPE: Release

jobs:
build:
runs-on: windows-2019

steps:
- name: Checkout EnergyPlus
uses: actions/checkout@v2

- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Install System dependencies and LaTeX
shell: bash
run: |
set -x
echo "Downloading MiKTeX CLI installer"
# We download from a specific miror already # TODO: Should store this setup package somewhere ourselves
curl -L -O https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/miktexsetup-4.1-x64.zip
unzip miktexsetup-4.1-x64.zip
echo "Setting up the local package directory via download"
./miktexsetup_standalone --verbose \
--local-package-repository=C:/MiKTeX-Repo \
--remote-package-repository="https://ctan.math.illinois.edu/systems/win32/miktex/tm/packages/" \
--package-set=essential \
download
echo "Installing from the local package directory previously set up"
./miktexsetup_standalone --verbose \
--local-package-repository=C:/MiKTeX-Repo \
--package-set=essential \
--shared=yes \
install
echo "Adding MiKTeX bin folder to PATH and to GITHUB_PATH"
echo "C:/Program Files/MiKTeX/miktex/bin/x64/" >> $GITHUB_PATH
export PATH="/c/Program Files/MiKTeX/miktex/bin/x64/:$PATH"
echo "Configuring MiKTeX to install missing packages on the fly"
initexmf --admin --verbose --set-config-value='[MPM]AutoInstall=1'
echo "Configure default mirror for packages"
mpm --admin --set-repository="https://ctan.math.illinois.edu/systems/win32/miktex/tm/packages/"
# If later we pre-package into a zip/tar.gz all the packages we need, we can preinstall them via
# mpm --admin --set-repository=C:/MiKTeX-Repo
# mpm --verbose --admin --repository=C:\MiKTeX-Repo --require=@C:\MiKTeX-Repo\energyplus_packages.lst
# Avoid annoying warning: "xelatex: major issue: So far, you have not checked for updates as a MiKTeX user."
mpm --find-updates
mpm --admin --find-updates
- name: Install required packages
shell: bash
working-directory: ./doc/
run: |
mpm --verbose --admin --require=@energyplus_packages_windows.lst
# For quick debugging this could be useful, but note that it does not exhibit the main memory size exceeded error
# - name: Build Test package - Pass Number 1
# shell: bash
# working-directory: ./doc/test/
# run: |
# xelatex dependencies.tex
# nwords=$(pdftotext -f 2 -l 2 dependencies.pdf - | wc -w)
# [ "$nwords" -lt "10" ] && echo "TOC isn't available for pass NO. 1" || echo "TOC IS available for pass NO. 1"

- name: Create Build Directory
run: cmake -E make_directory ./doc/build/

- name: Configure CMake
working-directory: ./doc/build
shell: bash
run: |
set -x
cmake -G "Visual Studio 16 2019" -A x64 -DTEX_INTERACTION=batchmode -DDOCS_TESTING=ON ../
- name: Add problem matcher
run: echo "::add-matcher::.github/workflows/doc-problem-match.json"

- name: Build Docs
working-directory: ${{runner.workspace}}/EnergyPlus/doc/build
run: |
cmake --build . -j 2
# I made the BuildDOcumentation.cmake throw a FATAL_ERROR already on pass 2 and 3 of xelatex, so this is redundant now
# but if you want to just build `--target zPDF_InputOutputReference` and test it here, I'm leaving it as an example
# - name: Test InputOutputReference
# shell: bash
# working-directory: ./doc/build/pdf/
# run: |
# set -x
# pdfinfo InputOutputReference.pdf || true
# npages=$(pdfinfo InputOutputReference.pdf | /bin/grep "Pages:" | sed 's/[^0-9]*//')
# echo "Found $npages pages in the I/O Ref"
# nwords_in_toc=$(pdftotext -f 2 -l 2 InputOutputReference.pdf - | wc -l)
# set +x
# [ "$npages" -le "2800" ] && (echo "TOC is missing" && exit 1) || echo "Length of PDF appears ok"
# [ "$nwords_in_toc" -le "100" ] && (echo "TOC is empty" && exit 1) || echo "TOC appears ok"

- name: Upload entire pdf folder
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: InputOutputReference
path: ${{runner.workspace}}/EnergyPlus/doc/build/pdf/
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
python-version: 3.7

- name: Set up LaTeX
run: sudo apt update && sudo apt install -y texlive texlive-xetex texlive-science
run: sudo apt update && sudo apt install -y texlive texlive-xetex texlive-science poppler-utils

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/EnergyPlus/doc/build
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/linux_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ jobs:
with:
python-version: 3.7

- name: Setup QtIFW 4.x
uses: jmarrec/setup-qtifw@v1
with:
qtifw-version: '4.x'

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -37,14 +42,6 @@ jobs:
sudo apt-get update
sudo apt-get install texlive texlive-xetex texlive-science libxkbcommon-x11-0 xorg-dev libgl1-mesa-dev
- name: Install IFW
shell: bash
run: |
set -x
out_dir=${{ runner.workspace }}/Qt
aqt tool linux tools_ifw 4.1 qt.tools.ifw.41 --outputdir="$out_dir"
echo "$out_dir/Tools/QtInstallerFramework/4.1/bin" >> $GITHUB_PATH
- name: Create Build Directory
run: cmake -E make_directory ./build/

Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/mac_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ jobs:
with:
python-version: 3.7

- name: Setup QtIFW 4.x
uses: jmarrec/setup-qtifw@v1
with:
qtifw-version: '4.x'

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -37,14 +42,6 @@ jobs:
brew install --cask mactex
echo "/Library/TeX/texbin" >> $GITHUB_PATH
- name: Install IFW
shell: bash
run: |
set -x
out_dir=${{ runner.workspace }}/Qt
aqt tool mac tools_ifw 4.1 qt.tools.ifw.41 --outputdir="$out_dir"
echo "$out_dir/Tools/QtInstallerFramework/4.1/bin" >> $GITHUB_PATH
- name: Create Build Directory
run: cmake -E make_directory ./build/

Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/windows_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ jobs:
python-version: 3.7
architecture: ${{ matrix.arch }}

- name: Setup QtIFW 4.x
uses: jmarrec/setup-qtifw@v1
with:
qtifw-version: '4.x'

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -57,13 +62,13 @@ jobs:
./miktexsetup_standalone --verbose \
--local-package-repository=C:/ProgramData/MiKTeX-Repo \
--remote-package-repository="https://ctan.math.illinois.edu/systems/win32/miktex/tm/packages/" \
--package-set=basic \
--package-set=essential \
download
echo "Installing from the local package directory previously set up"
./miktexsetup_standalone --verbose \
--local-package-repository=C:/ProgramData/MiKTeX-Repo \
--package-set=basic \
--package-set=essential \
--shared \
install
Expand All @@ -80,13 +85,11 @@ jobs:
mpm --find-updates
mpm --admin --find-updates
- name: Install IFW
- name: Install required packages
shell: bash
working-directory: ./doc/
run: |
set -x
out_dir="C:/Qt"
aqt tool windows tools_ifw 4.1 qt.tools.ifw.41 --outputdir="$out_dir"
echo "$out_dir/Tools/QtInstallerFramework/4.1/bin" >> $GITHUB_PATH
mpm --verbose --admin --require=@energyplus_packages_windows.lst
- name: Create Build Directory
run: cmake -E make_directory ./build/
Expand Down
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cmake_policy(SET CMP0048 NEW) # handling project_version_* variables

project(EnergyPlus)

cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.17)

if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_GREATER "3.0")
cmake_policy(SET CMP0054 NEW) # CMake 3.1 added this policy
Expand Down Expand Up @@ -154,7 +154,12 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
endif()

# we are making *a Python 3.6 Interpreter* a required dependency, so find it here
find_package(PythonInterp 3.6 REQUIRED)
# If LINK_WITH_PYTHON, also request the Development (libs) at the same time, to ensure consistent version between interpreter and Development
if(LINK_WITH_PYTHON)
find_package(Python 3.6 COMPONENTS Interpreter Development REQUIRED)
else()
find_package(Python 3.6 COMPONENTS Interpreter REQUIRED)
endif()

if(BUILD_TESTING)
option(ENABLE_REGRESSION_TESTING "Enable Regression Tests" OFF)
Expand Down Expand Up @@ -270,7 +275,7 @@ endif()
add_subdirectory(idd)

execute_process(
COMMAND ${PYTHON_EXECUTABLE} "${PROJECT_SOURCE_DIR}/scripts/dev/generate_epJSON_schema/generate_epJSON_schema.py" "${PROJECT_SOURCE_DIR}"
COMMAND ${Python_EXECUTABLE} "${PROJECT_SOURCE_DIR}/scripts/dev/generate_epJSON_schema/generate_epJSON_schema.py" "${PROJECT_SOURCE_DIR}"
TIMEOUT 30
RESULT_VARIABLE generate_epJSON_schema_result)
if(${generate_epJSON_schema_result} MATCHES ".*timeout.*")
Expand Down
8 changes: 4 additions & 4 deletions cmake/Install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -229,18 +229,18 @@ file(MAKE_DIRECTORY ${DOCS_OUT})

# the output variables listing
install(
CODE "execute_process(COMMAND \"${PYTHON_EXECUTABLE}\" \"${PROJECT_SOURCE_DIR}/doc/tools/parse_output_variables.py\" \"${PROJECT_SOURCE_DIR}/src/EnergyPlus\" \"${DOCS_OUT}/SetupOutputVariables.csv\" \"${DOCS_OUT}/SetupOutputVariables.md\")"
CODE "execute_process(COMMAND \"${Python_EXECUTABLE}\" \"${PROJECT_SOURCE_DIR}/doc/tools/parse_output_variables.py\" \"${PROJECT_SOURCE_DIR}/src/EnergyPlus\" \"${DOCS_OUT}/SetupOutputVariables.csv\" \"${DOCS_OUT}/SetupOutputVariables.md\")"
)
install(FILES "${PROJECT_BINARY_DIR}/autodocs/SetupOutputVariables.csv" DESTINATION "./")

# the example file summary
install(
CODE "execute_process(COMMAND \"${PYTHON_EXECUTABLE}\" \"${PROJECT_SOURCE_DIR}/doc/tools/example_file_summary.py\" \"${PROJECT_SOURCE_DIR}/testfiles\" \"${DOCS_OUT}/ExampleFiles.html\")"
CODE "execute_process(COMMAND \"${Python_EXECUTABLE}\" \"${PROJECT_SOURCE_DIR}/doc/tools/example_file_summary.py\" \"${PROJECT_SOURCE_DIR}/testfiles\" \"${DOCS_OUT}/ExampleFiles.html\")"
COMPONENT ExampleFiles)
install(FILES "${DOCS_OUT}/ExampleFiles.html" DESTINATION "./ExampleFiles/" COMPONENT ExampleFiles)

# the example file objects link
install(CODE "execute_process(COMMAND \"${PYTHON_EXECUTABLE}\" \"${PROJECT_SOURCE_DIR}/doc/tools/example_file_objects.py\"
install(CODE "execute_process(COMMAND \"${Python_EXECUTABLE}\" \"${PROJECT_SOURCE_DIR}/doc/tools/example_file_objects.py\"
\"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Energy+.idd\" \"${PROJECT_SOURCE_DIR}/testfiles\" \"${DOCS_OUT}/ExampleFiles-ObjectsLink.html\")"
COMPONENT ExampleFiles)
install(FILES "${DOCS_OUT}/ExampleFiles-ObjectsLink.html" DESTINATION "./ExampleFiles/" COMPONENT ExampleFiles)
Expand All @@ -252,7 +252,7 @@ if(BUILD_CHANGELOG)
# Better to move this condition into the install CODE.
if(NOT "$ENV{GITHUB_TOKEN}" STREQUAL "")
install(
CODE "execute_process(COMMAND \"${PYTHON_EXECUTABLE}\" \"${PROJECT_SOURCE_DIR}/doc/tools/create_changelog.py\" \"${PROJECT_SOURCE_DIR}\" \"${DOCS_OUT}/changelog.md\" \"${DOCS_OUT}/changelog.html\" \"${GIT_EXECUTABLE}\" \"$ENV{GITHUB_TOKEN}\" \"${PREV_RELEASE_SHA}\" \"${CPACK_PACKAGE_VERSION}\")"
CODE "execute_process(COMMAND \"${Python_EXECUTABLE}\" \"${PROJECT_SOURCE_DIR}/doc/tools/create_changelog.py\" \"${PROJECT_SOURCE_DIR}\" \"${DOCS_OUT}/changelog.md\" \"${DOCS_OUT}/changelog.html\" \"${GIT_EXECUTABLE}\" \"$ENV{GITHUB_TOKEN}\" \"${PREV_RELEASE_SHA}\" \"${CPACK_PACKAGE_VERSION}\")"
)
install(FILES "${DOCS_OUT}/changelog.html" DESTINATION "./" OPTIONAL)
else()
Expand Down
2 changes: 1 addition & 1 deletion cmake/ProjectMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function(ADD_SIMULATION_TEST)
add_test(
NAME "regression.${IDF_NAME}"
COMMAND
${CMAKE_COMMAND} -DBINARY_DIR=${PROJECT_BINARY_DIR} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} -DIDF_FILE=${ADD_SIM_TEST_IDF_FILE}
${CMAKE_COMMAND} -DBINARY_DIR=${PROJECT_BINARY_DIR} -DPYTHON_EXECUTABLE=${Python_EXECUTABLE} -DIDF_FILE=${ADD_SIM_TEST_IDF_FILE}
-DREGRESSION_SCRIPT_PATH=${REGRESSION_SCRIPT_PATH} -DREGRESSION_BASELINE_PATH=${REGRESSION_BASELINE_PATH}
-DREGRESSION_BASELINE_SHA=${REGRESSION_BASELINE_SHA} -DCOMMIT_SHA=${COMMIT_SHA} -DDEVICE_ID=${DEVICE_ID} -P
${PROJECT_SOURCE_DIR}/cmake/RunRegression.cmake)
Expand Down
8 changes: 4 additions & 4 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
project(EnergyPlusDocs LANGUAGES NONE)

cmake_minimum_required(VERSION 3.5.1)
cmake_minimum_required(VERSION 3.12)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)

if(NOT EXISTS ${PYTHON_EXECUTABLE})
# we are making *a Python 3.6 Interpreter* a required dependency, so find it here
find_package(PythonInterp 3.6 REQUIRED)
if(NOT EXISTS ${Python_EXECUTABLE})
# If running docs standalone, Python isn't found yet.
find_package(Python 3.6 COMPONENTS Interpreter REQUIRED)
endif()

option(DOCS_TESTING "Test the docs for issues" OFF)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,13 @@ \subsection{Custom Files - Auxiliary Data}\label{custom-files---auxiliary-data}
\begin{longtable}[c]{p{1.5in}p{1.5in}p{1.5in}p{1.5in}}
\caption{Auxiliary Data for Custom Files \label{table:auxiliary-data-for-custom-files}} \tabularnewline
\toprule
Short Name & Long Name & Units & Useh by EnergyPlus \tabularnewline
Short Name & Long Name & Units & Used by EnergyPlus \tabularnewline
\midrule
\endfirsthead

\caption[]{Auxiliary Data for Custom Files} \tabularnewline
\toprule
Short Name & Long Name & Units & Useh by EnergyPlus \tabularnewline
Short Name & Long Name & Units & Used by EnergyPlus \tabularnewline
\midrule
\endhead

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ \section{EnergyPlus Weather File (EPW) Data Dictionary}\label{energyplus-weather
\note same as note on Heating Design Conditions
\end{lstlisting}

The Design Conditions header record encapsulates matching (using WMO\# -- World Meteorological Organization Station Number) design conditions for a weather file location. Currently only those design conditions contained in the ASHRAE Handbook of Fundamentals 2009 are contained in the weather files. These conditions can be used as desired. In addition, Design Day definition files have been created of all World, Canada, and United States Design Conditions. These files are available in the DataSet folder of the EnergyPlus installation.
The Design Conditions header record encapsulates matching (using WMO\# -- World Meteorological Organization Station Number) design conditions for a weather file location. Currently only those design conditions contained in the ASHRAE Handbook of Fundamentals 2009 are contained in the weather files. These conditions can be used as desired. In addition, Design Day definition files have been created of all World, Canada, and United States Design Conditions.

\begin{lstlisting}
TYPICAL/EXTREME PERIODS,
Expand Down
Loading

5 comments on commit 92070af

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8722_HVAC_Diagram (jmarrec) - x86_64-MacOS-10.15-clang-11.0.0: OK (3099 of 3099 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8722_HVAC_Diagram (jmarrec) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (3140 of 3140 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8722_HVAC_Diagram (jmarrec) - Win64-Windows-10-VisualStudio-16: OK (2349 of 2349 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8722_HVAC_Diagram (jmarrec) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1654 of 1654 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8722_HVAC_Diagram (jmarrec) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (726 of 726 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.