Skip to content

Commit

Permalink
feat: Add github action.
Browse files Browse the repository at this point in the history
  • Loading branch information
andoludo committed Jul 3, 2024
1 parent dc04f66 commit cc4644d
Show file tree
Hide file tree
Showing 32 changed files with 2,974 additions and 636 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/tests-runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ jobs:

- name: Linting & mypy
run: poetry run nox

- name: Run tests
run: poetry run pytest
run: poetry run pytest -k "not test_simulate"
18 changes: 17 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ types-simplejson = "^3.19.0.20240218"
types-beautifulsoup4 = "^4.12.0.20240229"
pytest-mongo = "^3.1.0"
networkx-stubs = "^0.0.1"
pytest-ordering = "^0.6"

[build-system]
requires = ["poetry-core"]
Expand Down
14 changes: 7 additions & 7 deletions tests/data/buildings_free_float_single_zone.mo

Large diffs are not rendered by default.

2,285 changes: 2,285 additions & 0 deletions tests/data/buildings_free_float_single_zone_with_data.mo

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions tests/data/buildings_free_float_three_zones.mo

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions tests/data/buildings_free_float_two_zones.mo

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions tests/data/buildings_simple_hydronic.mo

Large diffs are not rendered by default.

82 changes: 41 additions & 41 deletions tests/data/buildings_simple_hydronic_three_zones.mo

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions tests/data/buildings_two_rooms_with_storage.mo

Large diffs are not rendered by default.

170 changes: 85 additions & 85 deletions tests/data/house_model.mo

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions tests/data/ideas_free_float_single_zone.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2163,25 +2163,25 @@ extends Modelica.Icons.MaterialPropertiesPackage;
end Glazing;

package Materials "Library of construction materials"
extends Modelica.Icons.MaterialPropertiesPackage; record plywood = IDEAS.Buildings.Data.Interfaces.Material (
k=0.12,
c=1210.0,
rho=540.0,
epsLw=0.88,
epsSw=0.55); record id_100 = IDEAS.Buildings.Data.Interfaces.Material (
extends Modelica.Icons.MaterialPropertiesPackage; record id_100 = IDEAS.Buildings.Data.Interfaces.Material (
k=1.0,
c=840.0,
rho=2500.0,
epsLw=0.88,
epsSw=0.55); record insulation_board = IDEAS.Buildings.Data.Interfaces.Material (
k=0.03,
c=1200.0,
rho=40.0,
epsLw=0.88,
epsSw=0.55); record concrete = IDEAS.Buildings.Data.Interfaces.Material (
k=1.4,
c=840.0,
rho=2240.0,
epsLw=0.88,
epsSw=0.55); record insulation_board = IDEAS.Buildings.Data.Interfaces.Material (
k=0.03,
c=1200.0,
rho=40.0,
epsSw=0.55); record plywood = IDEAS.Buildings.Data.Interfaces.Material (
k=0.12,
c=1210.0,
rho=540.0,
epsLw=0.88,
epsSw=0.55); record Air = IDEAS.Buildings.Data.Interfaces.Material (
k=0.025,
Expand Down Expand Up @@ -2228,7 +2228,7 @@ annotation (choicesAllMatching = true);
final azi={ 135, 0, 45, 90 },
redeclare package Medium = Medium,
final inc={ IDEAS.Types.Tilt.Wall, IDEAS.Types.Tilt.Wall, IDEAS.Types.Tilt.Wall, IDEAS.Types.Tilt.Wall }) annotation (
Placement(transformation(origin = { 48.79334870711515, 199.99999999999997 },
Placement(transformation(origin = { -96.2221558972595, 158.027120974634 },
extent = {{-10, -10}, {10, 10}}
)));
IDEAS.Buildings.Components.Window[1]
Expand All @@ -2239,15 +2239,15 @@ annotation (choicesAllMatching = true);
final azi={ 45 },
redeclare package Medium = Medium,
final inc={ IDEAS.Types.Tilt.Wall }) annotation (
Placement(transformation(origin = { 186.98737194749273, 66.86707378720476 },
Placement(transformation(origin = { 102.50430507628556, -175.22598795032337 },
extent = {{-10, -10}, {10, 10}}
)));
IDEAS.Buildings.Components.SlabOnGround floor_2(
redeclare parameter ideas_free_float_single_zone.Data.Constructions.
external_wall constructionType,
redeclare package Medium = Medium,
A=10) annotation (
Placement(transformation(origin = { 146.9385914359433, -119.82246608434738 },
Placement(transformation(origin = { 189.88184576946574, 5.503215674781191 },
extent = {{-10, -10}, {10, 10}}
)));
inner IDEAS.BoundaryConditions.SimInfoManager
Expand All @@ -2261,36 +2261,36 @@ annotation (Placement(transformation(extent={{-96,76},{-76,96}}))); annotati
ideas_free_float_single_zone.Common.Controls.ventilation.DataServer
data_bus (redeclare package
Medium = Medium) annotation (
Placement(transformation(origin = { -152.67907412032304, 130.8707688138268 },
Placement(transformation(origin = { -200.0, 1.8176377396680672 },
extent = {{-10, -10}, {10, 10}}
)));


equation connect(space_1.propsBus[1:4],merged_w1_1_w2_1_w3_1_w4_1[1:4].propsBus_a)
annotation (Line(
points={{ 0.0, 0.0 } ,{ 24.396674353557575, 0.0 } ,{ 24.396674353557575, 199.99999999999997 } ,{ 48.79334870711515, 199.99999999999997 } },
points={{ 0.0, 0.0 } ,{ -48.11107794862975, 0.0 } ,{ -48.11107794862975, 158.027120974634 } ,{ -96.2221558972595, 158.027120974634 } },
color={255,204,51},
thickness=0.5,
smooth=Smooth.None)); connect(space_1.propsBus[5],merged_win1_1[1].propsBus_a)
annotation (Line(
points={{ 0.0, 0.0 } ,{ 93.49368597374637, 0.0 } ,{ 93.49368597374637, 66.86707378720476 } ,{ 186.98737194749273, 66.86707378720476 } },
points={{ 0.0, 0.0 } ,{ 51.25215253814278, 0.0 } ,{ 51.25215253814278, -175.22598795032337 } ,{ 102.50430507628556, -175.22598795032337 } },
color={255,204,51},
thickness=0.5,
smooth=Smooth.None)); connect(space_1.propsBus[6],floor_2.propsBus_a)
annotation (Line(
points={{ 0.0, 0.0 } ,{ 73.46929571797165, 0.0 } ,{ 73.46929571797165, -119.82246608434738 } ,{ 146.9385914359433, -119.82246608434738 } },
points={{ 0.0, 0.0 } ,{ 94.94092288473287, 0.0 } ,{ 94.94092288473287, 5.503215674781191 } ,{ 189.88184576946574, 5.503215674781191 } },
color={191,0,0},
thickness=0.1,
smooth=Smooth.None)); connect(space_1.gainCon,data_bus.port[1])
annotation (Line(
points={{ 0.0, 0.0 } ,{ -76.33953706016152, 0.0 } ,{ -76.33953706016152, 130.8707688138268 } ,{ -152.67907412032304, 130.8707688138268 } },
points={{ 0.0, 0.0 } ,{ -100.0, 0.0 } ,{ -100.0, 1.8176377396680672 } ,{ -200.0, 1.8176377396680672 } },
thickness=0.05,
smooth=Smooth.None)); connect(space_1.ports[1],data_bus.port_a[1])
annotation (Line(
points={{ 0.0, 0.0 } ,{ -76.33953706016152, 0.0 } ,{ -76.33953706016152, 130.8707688138268 } ,{ -152.67907412032304, 130.8707688138268 } },
points={{ 0.0, 0.0 } ,{ -100.0, 0.0 } ,{ -100.0, 1.8176377396680672 } ,{ -200.0, 1.8176377396680672 } },
thickness=0.05,
smooth=Smooth.None));annotation (Diagram(coordinateSystem(extent={{-202.67907412032304,-169.82246608434738},{236.98737194749273,250.0}})), Icon(
coordinateSystem(extent={{-202.67907412032304,-169.82246608434738},{236.98737194749273,250.0}})));
smooth=Smooth.None));annotation (Diagram(coordinateSystem(extent={{-250.0,-225.22598795032337},{239.88184576946574,250.0}})), Icon(
coordinateSystem(extent={{-250.0,-225.22598795032337},{239.88184576946574,250.0}})));
annotation (
Documentation(info="<html><head><title>Spaces</title></head><body><h1>Spaces</h1><p><h2>Introduction</h2><p>Introduction</p></p><p><table border='1' align='center' bgcolor='#f0f0f0' style='border-collapse: collapse; margin-top: 20px; margin-bottom: 20px;'><tr><th>name</th><td>space_1</td></tr><tr><th>parameters</th><td><table border='1' align='center' bgcolor='#f0f0f0' style='border-collapse: collapse; margin-top: 20px; margin-bottom: 20px;'><tr><th>mSenFac</th><td>1.0</td></tr><tr><th>AFlo</th><td>20.0</td></tr><tr><th>hRoo</th><td>2.0</td></tr><tr><th>linearizeRadiation</th><td>true</td></tr><tr><th>m_flow_nominal</th><td>0.01</td></tr><tr><th>T_start</th><td>294.15</td></tr><tr><th>volume</th><td>40.0</td></tr></table></td></tr><tr><th>external_boundaries</th><td><table border='1' align='center' bgcolor='#f0f0f0' style='border-collapse: collapse; margin-top: 20px; margin-bottom: 20px;'><thead><tr><th>name</th><th>surface</th><th>azimuth</th><th>tilt</th><th>construction</th><th>type</th></tr></thead><tbody><tr><td>w1_1</td><td>10.0</td><td>135.0</td><td>wall</td><td><table border='1' align='center' bgcolor='#f0f0f0' style='border-collapse: collapse; margin-top: 20px; margin-bottom: 20px;'><tr><th>name</th><td>external_wall</td></tr></table></td><td>ExternalWall</td></tr><tr><td>w2_1</td><td>10.0</td><td>0.0</td><td>wall</td><td><table border='1' align='center' bgcolor='#f0f0f0' style='border-collapse: collapse; margin-top: 20px; margin-bottom: 20px;'><tr><th>name</th><td>external_wall</td></tr></table></td><td>ExternalWall</td></tr><tr><td>w3_1</td><td>10.0</td><td>45.0</td><td>wall</td><td><table border='1' align='center' bgcolor='#f0f0f0' style='border-collapse: collapse; margin-top: 20px; margin-bottom: 20px;'><tr><th>name</th><td>external_wall</td></tr></table></td><td>ExternalWall</td></tr><tr><td>w4_1</td><td>10.0</td><td>90.0</td><td>wall</td><td><table border='1' align='center' bgcolor='#f0f0f0' style='border-collapse: collapse; margin-top: 20px; margin-bottom: 20px;'><tr><th>name</th><td>external_wall</td></tr></table></td><td>ExternalWall</td></tr><tr><td>floor_2</td><td>10.0</td><td>90.0</td><td>floor</td><td><table border='1' align='center' bgcolor='#f0f0f0' style='border-collapse: collapse; margin-top: 20px; margin-bottom: 20px;'><tr><th>name</th><td>external_wall</td></tr></table></td><td>FloorOnGround</td></tr><tr><td>win1_1</td><td>1.0</td><td>45.0</td><td>wall</td><td><table border='1' align='center' bgcolor='#f0f0f0' style='border-collapse: collapse; margin-top: 20px; margin-bottom: 20px;'><tr><th>name</th><td>double_glazing</td></tr></table></td><td>Window</td></tr></tbody></table></td></tr></table></p><p><h2>Conclusions</h2><p>Conclusions</p></p></body><body><h1>Spaces</h1><p><h2>Introduction</h2><p>Introduction</p></p><p><table border='1' align='center' bgcolor='#f0f0f0' style='border-collapse: collapse; margin-top: 20px; margin-bottom: 20px;'><tr><th>name</th><td>external_wall</td></tr><tr><th>layers</th><td><table border='1' align='center' bgcolor='#f0f0f0' style='border-collapse: collapse; margin-top: 20px; margin-bottom: 20px;'><thead><tr><th>material</th><th>thickness</th></tr></thead><tbody><tr><td><table border='1' align='center' bgcolor='#f0f0f0' style='border-collapse: collapse; margin-top: 20px; margin-bottom: 20px;'><tr><th>name</th><td>concrete</td></tr><tr><th>k</th><td>1.4</td></tr><tr><th>c</th><td>840.0</td></tr><tr><th>rho</th><td>2240.0</td></tr><tr><th>epsLw</th><td>0.85</td></tr><tr><th>epsSw</th><td>0.65</td></tr></table></td><td>0.2</td></tr><tr><td><table border='1' align='center' bgcolor='#f0f0f0' style='border-collapse: collapse; margin-top: 20px; margin-bottom: 20px;'><tr><th>name</th><td>insulation_board</td></tr><tr><th>k</th><td>0.03</td></tr><tr><th>c</th><td>1200.0</td></tr><tr><th>rho</th><td>40.0</td></tr><tr><th>epsLw</th><td>0.85</td></tr><tr><th>epsSw</th><td>0.65</td></tr></table></td><td>0.02</td></tr><tr><td><table border='1' align='center' bgcolor='#f0f0f0' style='border-collapse: collapse; margin-top: 20px; margin-bottom: 20px;'><tr><th>name</th><td>plywood</td></tr><tr><th>k</th><td>0.12</td></tr><tr><th>c</th><td>1210.0</td></tr><tr><th>rho</th><td>540.0</td></tr><tr><th>epsLw</th><td>0.85</td></tr><tr><th>epsSw</th><td>0.65</td></tr></table></td><td>0.1</td></tr></tbody></table></td></tr></table></p><p><h2>Conclusions</h2><p>Conclusions</p></p></body><body><h1>Spaces</h1><p><h2>Introduction</h2><p>Introduction</p></p><p></p><p><h2>Conclusions</h2><p>Conclusions</p></p></body></html>"));
end building;
Expand Down
Loading

0 comments on commit cc4644d

Please sign in to comment.