Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into finish_removing_gio
Browse files Browse the repository at this point in the history
  • Loading branch information
Myoldmopar committed Oct 19, 2020
2 parents a8948e5 + 6c1e5e5 commit 4e75f65
Show file tree
Hide file tree
Showing 631 changed files with 34,635 additions and 35,795 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/doc-problem-match.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "latex-parser",
"pattern": [
{
"regexp": "^\\[LATEX(WARNING|ERROR)::(.*?):(\\d+)::(.*?)\\]$",
"severity": 1,
"file": 2,
"line": 3,
"message": 4
}
]
}
]
}
5 changes: 4 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ jobs:

- name: Configure CMake
working-directory: ${{runner.workspace}}/EnergyPlus/doc/build
run: cmake -DTEX_INTERACTION=batchmode ..
run: cmake -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
Expand Down
133 changes: 53 additions & 80 deletions doc/tools/parse_latex_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,40 +168,6 @@ def find_multiply_defined_labels(root_dir, label):
target = "\\label{" + label + "}"
return find_locations(root_dir, target)


def parse_warning(line, src_dir):
"""
- line: string, the line to parse
- src_dir: string, the root directory of the LaTeX source files
RETURN: None or one of:
- {'type': 'Label multiply defined',
'label': string,
'message': string}
- {'type': 'Hyper reference undefined',
'label': string,
'message': string}
"""
m = LABEL_MULTIPLY_DEFINED_WARN.match(line)
if m is not None:
label = m.group(1)
locations = find_multiply_defined_labels(src_dir, label)
return {'severity': SEVERITY_WARNING,
'type': "Label multiply defined",
'locations': locations,
'message': line,
'label': m.group(1)}
m = HYPER_UNDEFINED_WARN.match(line)
if m is not None:
label = m.group(1)
locations = find_undefined_hyperref(src_dir, label)
return {'severity': SEVERITY_WARNING,
'type': "Hyper reference undefined",
'locations': locations,
'message': line,
'label': m.group(1)}
return None


def parse_line_number(message):
"""
- message: string
Expand Down Expand Up @@ -233,53 +199,68 @@ def __init__(self, log_path, src_dir, verbose=False):
self.src_dir = src_dir
self.verbose = verbose

def _read_tex_error(self, line):
def _read_tex_error(self):
line_no = parse_line_number(self._current_issue)
self._issues['issues'].append({
'severity': SEVERITY_ERROR,
'level': SEVERITY_ERROR,
'type': self._type,
'locations': [{
'file': self._current_tex_file,
'line': line_no}],
'path': self._current_tex_file,
'line': {"start": line_no, "end": line_no},
'message': self._current_issue.strip()})

def _read_warning(self, line):
warn = parse_warning(self._current_issue, self.src_dir)
if self._current_issue.strip() not in ISSUES_TO_SKIP:
if warn is not None:
self._issues['issues'].append(warn)
else:
line_no = parse_on_input_line(self._current_issue)
self._issues['issues'].append({
'severity': SEVERITY_WARNING,
'type': self._type,
'locations': [{
'file': self._current_tex_file,
'line': line_no}],
'message': self._current_issue.strip()})

def _read_error(self, line):
if self._current_issue not in ISSUES_TO_SKIP:
def _read_warning(self):
warns = []
m1 = LABEL_MULTIPLY_DEFINED_WARN.match(self._current_issue)
m2 = HYPER_UNDEFINED_WARN.match(self._current_issue)
if m1 is not None:
label = m1.group(1)
locations = find_multiply_defined_labels(self.src_dir, label)
for loc in locations:
warns.append({
'level': SEVERITY_WARNING,
'type': "Label multiply defined",
'path': loc["file"],
'line': {"start": loc["line"], "end": loc["line"]},
'message': self._current_issue.strip(),
'label': m1.group(1)
})
elif m2 is not None:
label = m2.group(1)
locations = find_undefined_hyperref(self.src_dir, label)
for loc in locations:
warns.append({
'level': SEVERITY_WARNING,
'type': "Hyper reference undefined",
'path': loc["file"],
'line': {"start": loc["line"], "end": loc["line"]},
'message': self._current_issue.strip(),
'label': m2.group(1)
})
elif self._current_issue.strip() not in ISSUES_TO_SKIP:
line_no = parse_on_input_line(self._current_issue)
self._issues['issues'].append({
'severity': SEVERITY_ERROR,
warns = [{
'level': SEVERITY_WARNING,
'type': self._type,
'locations': [{
'file': self._current_tex_file,
'line': line_no}],
'message': self._current_issue.strip()})
'path': self._current_tex_file,
'line': {"start": line_no, "end": line_no},
'message': self._current_issue.strip()}]
self._issues['issues'] += warns

def _read_error(self):
if self._current_issue not in ISSUES_TO_SKIP:
self._read_tex_error()

def _read_issue(self, line):
is_ws = (line.strip() == "")
first_line = (self._issue_line == 1)
nonempty = len(line) > 1
if is_ws and (not (first_line and nonempty)):
if self._in_tex_err:
self._read_tex_error(line)
self._read_tex_error()
elif self._in_warn:
self._read_warning(line)
self._read_warning()
elif self._in_err:
self._read_error(line)
self._read_error()
else:
raise Exception("unhandled issue read")
self._reset_after_read()
Expand Down Expand Up @@ -388,16 +369,10 @@ def update_paths_to_be_from_repo_root(issues, repo_root_to_src):
updated = []
for issue in issues:
update = copy.deepcopy(issue)
if 'locations' in update:
new_locs = []
for location in update['locations']:
loc = copy.deepcopy(location)
if 'file' in location:
loc['file'] = os.path.join(
repo_root_to_src,
location['file'])
new_locs.append(loc)
update['locations'] = new_locs
if 'path' in update:
update['path'] = os.path.join(
repo_root_to_src,
update['path'])
updated.append(update)
return updated

Expand Down Expand Up @@ -440,16 +415,14 @@ def find_issues(log_path, json_error_path, src_dir):
f = sys.stdout
for issue in errs['issues']:
f.write("[LATEX")
f.write(issue['severity'] + "::")
locs = [loc['file'] + ":" + str(loc['line'])
for loc in issue['locations']]
f.write(",".join(locs) + "::")
f.write(issue['level'] + "::")
f.write(issue['path'] + ":" + str(issue["line"]["start"]))
msg = issue['message'].replace("\r\n", " ")
msg = msg.replace("\n", " ")
msg = msg.replace("\r", " ")
msg = msg.replace("\t", " ")
msg = " ".join(msg.split())
f.write(msg + "]\n")
f.write("::" + msg + "]\n")
with open(json_error_path, 'w', encoding='utf-8') as f:
json.dump(errs, f, ensure_ascii=False, indent=4)
return (num_issues > 0)
Expand Down
44 changes: 24 additions & 20 deletions src/EnergyPlus/AirLoopHVACDOAS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ namespace AirLoopHVACDOAS {
thisMixer.name = UtilityRoutines::MakeUPPERCase(thisObjectName);
thisMixer.OutletNodeName = UtilityRoutines::MakeUPPERCase(fields.at("outlet_node_name"));
thisMixer.m_AirLoopMixer_Num = AirLoopMixerNum - 1;
thisMixer.OutletNodeNum = NodeInputManager::GetOnlySingleNode(thisMixer.OutletNodeName,
thisMixer.OutletNodeNum = NodeInputManager::GetOnlySingleNode(state,
thisMixer.OutletNodeName,
errorsFound,
cCurrentModuleObject,
thisObjectName,
Expand Down Expand Up @@ -518,9 +519,9 @@ namespace AirLoopHVACDOAS {

} else if (SELECT_CASE_var == "COIL:HEATING:STEAM") {
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).InletNodeNum(CompNum) =
SteamCoils::GetCoilSteamInletNode(CompType, CompName, InletNodeErrFlag);
SteamCoils::GetCoilSteamInletNode(state, CompType, CompName, InletNodeErrFlag);
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).OutletNodeNum(CompNum) =
SteamCoils::GetCoilSteamOutletNode(CompType, CompName, OutletNodeErrFlag);
SteamCoils::GetCoilSteamOutletNode(state, CompType, CompName, OutletNodeErrFlag);
} else if (SELECT_CASE_var == "COIL:COOLING:WATER:DETAILEDGEOMETRY") {
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).InletNodeNum(CompNum) = WaterCoils::GetCoilInletNode(state,
SELECT_CASE_var, state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), InletNodeErrFlag);
Expand Down Expand Up @@ -591,21 +592,21 @@ namespace AirLoopHVACDOAS {
} else if (SELECT_CASE_var == "HEATEXCHANGER:AIRTOAIR:FLATPLATE") {
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).HeatExchangerFlag = true;
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).InletNodeNum(CompNum) =
HeatRecovery::GetSupplyInletNode(state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), InletNodeErrFlag);
HeatRecovery::GetSupplyInletNode(state, state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), InletNodeErrFlag);
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).OutletNodeNum(CompNum) =
HeatRecovery::GetSupplyOutletNode(state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), OutletNodeErrFlag);
HeatRecovery::GetSupplyOutletNode(state, state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), OutletNodeErrFlag);
} else if (SELECT_CASE_var == "HEATEXCHANGER:AIRTOAIR:SENSIBLEANDLATENT") {
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).HeatExchangerFlag = true;
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).InletNodeNum(CompNum) =
HeatRecovery::GetSupplyInletNode(state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), InletNodeErrFlag);
HeatRecovery::GetSupplyInletNode(state, state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), InletNodeErrFlag);
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).OutletNodeNum(CompNum) =
HeatRecovery::GetSupplyOutletNode(state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), OutletNodeErrFlag);
HeatRecovery::GetSupplyOutletNode(state, state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), OutletNodeErrFlag);
} else if (SELECT_CASE_var == "HEATEXCHANGER:DESICCANT:BALANCEDFLOW") {
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).HeatExchangerFlag = true;
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).InletNodeNum(CompNum) =
HeatRecovery::GetSupplyInletNode(state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), InletNodeErrFlag);
HeatRecovery::GetSupplyInletNode(state, state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), InletNodeErrFlag);
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).OutletNodeNum(CompNum) =
HeatRecovery::GetSupplyOutletNode(state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), OutletNodeErrFlag);
HeatRecovery::GetSupplyOutletNode(state, state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), OutletNodeErrFlag);
// Desiccant Dehumidifier
} else if (SELECT_CASE_var == "DEHUMIDIFIER:DESICCANT:NOFANS") {
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).InletNodeNum(CompNum) = DesiccantDehumidifiers::GetProcAirInletNodeNum(state,
Expand All @@ -631,15 +632,15 @@ namespace AirLoopHVACDOAS {
// Unglazed Transpired Solar Collector
} else if (SELECT_CASE_var == "SOLARCOLLECTOR:UNGLAZEDTRANSPIRED") {
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).InletNodeNum(CompNum) =
TranspiredCollector::GetAirInletNodeNum(state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), InletNodeErrFlag);
TranspiredCollector::GetAirInletNodeNum(state, state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), InletNodeErrFlag);
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).OutletNodeNum(CompNum) =
TranspiredCollector::GetAirOutletNodeNum(state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), OutletNodeErrFlag);
TranspiredCollector::GetAirOutletNodeNum(state, state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), OutletNodeErrFlag);
// PVT air heater
} else if (SELECT_CASE_var == "SOLARCOLLECTOR:FLATPLATE:PHOTOVOLTAICTHERMAL") {
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).InletNodeNum(CompNum) = PhotovoltaicThermalCollectors::GetAirInletNodeNum(
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), InletNodeErrFlag);
state, state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), InletNodeErrFlag);
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).OutletNodeNum(CompNum) = PhotovoltaicThermalCollectors::GetAirOutletNodeNum(
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), OutletNodeErrFlag);
state, state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), OutletNodeErrFlag);
// Evaporative Cooler Types
} else if (SELECT_CASE_var == "EVAPORATIVECOOLER:DIRECT:CELDEKPAD") {
state.dataAirLoop->OutsideAirSys(thisDOAS.m_OASystemNum).InletNodeNum(CompNum) =
Expand Down Expand Up @@ -703,7 +704,7 @@ namespace AirLoopHVACDOAS {
}

thisDOAS.AvailManagerSchedName = UtilityRoutines::MakeUPPERCase(fields.at("availability_schedule_name"));
thisDOAS.m_AvailManagerSchedPtr = GetScheduleIndex(thisDOAS.AvailManagerSchedName);
thisDOAS.m_AvailManagerSchedPtr = GetScheduleIndex(state, thisDOAS.AvailManagerSchedName);
if (thisDOAS.m_AvailManagerSchedPtr == 0) {
cFieldName = "Availability Schedule Name";
ShowSevereError(cCurrentModuleObject + ", \"" + thisDOAS.Name + "\" " + cFieldName +
Expand Down Expand Up @@ -811,8 +812,9 @@ namespace AirLoopHVACDOAS {
if (UtilityRoutines::SameString(CompType, "COIL:HEATING:WATER")) {
WaterCoils::SimulateWaterCoilComponents(state, CompName, FirstHVACIteration, this->m_HeatCoilNum);
Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", CompName, ErrorsFound);
rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->HWLoopNum).FluidName,
DataGlobals::HWInitConvTemp,
rho = FluidProperties::GetDensityGlycol(state,
DataPlant::PlantLoop(this->HWLoopNum).FluidName,
DataGlobalConstants::HWInitConvTemp(),
DataPlant::PlantLoop(this->HWLoopNum).FluidIndex,
RoutineName);
PlantUtilities::InitComponentNodes(0.0,
Expand All @@ -827,8 +829,9 @@ namespace AirLoopHVACDOAS {
if (UtilityRoutines::SameString(CompType, "COIL:COOLING:WATER")) {
WaterCoils::SimulateWaterCoilComponents(state, CompName, FirstHVACIteration, this->m_CoolCoilNum);
Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Cooling:Water", CompName, ErrorsFound);
rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->CWLoopNum).FluidName,
DataGlobals::CWInitConvTemp,
rho = FluidProperties::GetDensityGlycol(state,
DataPlant::PlantLoop(this->CWLoopNum).FluidName,
DataGlobalConstants::CWInitConvTemp(),
DataPlant::PlantLoop(this->CWLoopNum).FluidIndex,
RoutineName);
PlantUtilities::InitComponentNodes(0.0,
Expand All @@ -843,8 +846,9 @@ namespace AirLoopHVACDOAS {
if (UtilityRoutines::SameString(CompType, "COIL:COOLING:WATER:DETAILEDGEOMETRY")) {
WaterCoils::SimulateWaterCoilComponents(state, CompName, FirstHVACIteration, this->m_CoolCoilNum);
Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Cooling:Water:DetailedGeometry", CompName, ErrorsFound);
rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->CWLoopNum).FluidName,
DataGlobals::CWInitConvTemp,
rho = FluidProperties::GetDensityGlycol(state,
DataPlant::PlantLoop(this->CWLoopNum).FluidName,
DataGlobalConstants::CWInitConvTemp(),
DataPlant::PlantLoop(this->CWLoopNum).FluidIndex,
RoutineName);
PlantUtilities::InitComponentNodes(0.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

#ifndef TOKELVIN
#include "../../../DataGlobals.hh"
#define TOKELVIN(T) (T + DataGlobals::KelvinConv)
#define TOKELVIN(T) (T + DataGlobalConstants::KelvinConv())
#else
// Need a fallback
#endif
Expand Down
Loading

8 comments on commit 4e75f65

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

finish_removing_gio (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (3025 of 3026 tests passed, 1 test warnings)

Messages:\n

  • 1 test had: EDD diffs.
  • 1 test had: EIO diffs.
  • 1 test had: ESO small diffs.
  • 1 test had: MTR small diffs.
  • 1 test had: Table big diffs.

Failures:\n

regression Test Summary

  • Passed: 736
  • Failed: 1

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.

finish_removing_gio (Myoldmopar) - Win64-Windows-10-VisualStudio-16: OK (2242 of 2242 tests passed, 0 test warnings)

Build Badge Test Badge

@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.

finish_removing_gio (Myoldmopar) - x86_64-MacOS-10.15-clang-11.0.0: OK (2986 of 2986 tests passed, 1 test warnings)

Messages:\n

  • 1 test had: EDD diffs.

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

finish_removing_gio (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1550 of 1550 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

finish_removing_gio (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (722 of 722 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

finish_removing_gio (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: Tests Failed (0 of 0 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

finish_removing_gio (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: Tests Failed (0 of 0 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

finish_removing_gio (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: Tests Failed (0 of 0 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.