Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pyproject.toml for everything and update test resources problem #732

Merged
merged 149 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
d879e7d
use BuildingSimSettings no as possible and update docs
DaJansenGit Oct 11, 2024
bbbfdc2
Merge remote-tracking branch 'refs/remotes/origin/templatePlugin_upda…
DaJansenGit Oct 11, 2024
11e2487
fix teaser install, adjust python version and ifcopenshell version, u…
DaJansenGit Oct 11, 2024
d4b45ce
cleanup some plugin comments
DaJansenGit Oct 11, 2024
242438c
bump to python 3.11
DaJansenGit Oct 11, 2024
3e1dca2
correct git dependency syntax and add python 3.11 to programming lang…
DaJansenGit Oct 11, 2024
f0f4bf0
prevent usage of sphinx 8.1 as this has errors with mermaid integrations
DaJansenGit Oct 11, 2024
4cfa609
try new docker image with micromamba for python 3.11
DaJansenGit Oct 11, 2024
ac1baeb
add git to docker image
DaJansenGit Oct 11, 2024
c9b2fd6
update entrypoint of image
DaJansenGit Oct 11, 2024
effece9
try to run tests with new image
DaJansenGit Oct 14, 2024
02be120
test to activate environment by default via micromamba
DaJansenGit Oct 14, 2024
c06dcdb
test with new image
DaJansenGit Oct 14, 2024
fdf0034
test activating environment by script
DaJansenGit Oct 14, 2024
a0f8fd6
try old miniconda with new python version and pyproject.toml
DaJansenGit Oct 14, 2024
d8f103f
update pipeline
DaJansenGit Oct 14, 2024
68e67ea
specify python version
DaJansenGit Oct 14, 2024
d4a979c
update miniconda to use python 3.11
DaJansenGit Oct 14, 2024
a18a5fc
update miniconda version
DaJansenGit Oct 18, 2024
c8743ab
update miniconda version
DaJansenGit Oct 18, 2024
61a9e5b
update miniconda
DaJansenGit Oct 18, 2024
863450f
try micromamba again
DaJansenGit Oct 18, 2024
6f8c29a
try micromamba again
DaJansenGit Oct 18, 2024
92100fc
try micromamba again
DaJansenGit Oct 18, 2024
8a1bb79
try micromamba again
DaJansenGit Oct 18, 2024
25faa62
test new image
DaJansenGit Oct 18, 2024
2d7c304
test new image
DaJansenGit Oct 18, 2024
54ba8d6
test new image
DaJansenGit Oct 18, 2024
37aa96e
test new image
DaJansenGit Oct 18, 2024
776bb25
test new image
DaJansenGit Oct 18, 2024
2dcb17c
make sure directory exists
DaJansenGit Oct 18, 2024
dd82d01
dont use root directory due to permissions issues
DaJansenGit Oct 18, 2024
bc10b07
try sudo
DaJansenGit Oct 18, 2024
fe3aa39
don't use -e for pip install
DaJansenGit Oct 18, 2024
3bcbbd5
don't use -e for pip install
DaJansenGit Oct 18, 2024
8e2da02
don't use -e for pip install
DaJansenGit Oct 18, 2024
4a48bfa
don't use -e for pip install
DaJansenGit Oct 18, 2024
6a43951
build
DaJansenGit Oct 18, 2024
1bb8b0e
build
DaJansenGit Oct 18, 2024
a5119b9
build
DaJansenGit Oct 18, 2024
52f5c1f
build of base for different python versions
DaJansenGit Oct 19, 2024
2a444fa
build of base for different python versions
DaJansenGit Oct 19, 2024
84199bd
add tests for python versions, branches and plugins
DaJansenGit Oct 19, 2024
0c52fd7
temp hard code image for testing purpose
DaJansenGit Oct 19, 2024
c1658b5
remove CI_PIPELINE_IID as image tagging
DaJansenGit Oct 19, 2024
9c4f269
try to generate seperate jobs for testing
DaJansenGit Oct 19, 2024
08cf805
try to generate seperate jobs for testing
DaJansenGit Oct 19, 2024
2a90131
try to generate seperate jobs for testing
DaJansenGit Oct 19, 2024
bac4b61
try to generate seperate jobs for testing
DaJansenGit Oct 19, 2024
80ca4ee
add seperate jobs for the plugins
DaJansenGit Oct 19, 2024
08f38f6
temp remove coverage report
DaJansenGit Oct 19, 2024
c8eb6e3
add more plugin tests and configure logging level to reduce output in…
DaJansenGit Oct 19, 2024
e045f1e
try to build dymola images with micromamba
DaJansenGit Oct 19, 2024
8756792
login to dymola registry
DaJansenGit Oct 19, 2024
f73bfee
install CA certificates
DaJansenGit Oct 19, 2024
c9766c2
install CA certificates
DaJansenGit Oct 19, 2024
4f09362
try to solve permission errors
DaJansenGit Oct 19, 2024
a261e19
try to solve permission errors
DaJansenGit Oct 19, 2024
891c0cd
try to solve permission errors
DaJansenGit Oct 19, 2024
5c7f35b
add regression tests for PluginTEASER
DaJansenGit Oct 19, 2024
74ca6f0
run regression tests only
DaJansenGit Oct 19, 2024
46b1d75
try other syntax for report feature of TEASER requirement
DaJansenGit Oct 19, 2024
378f1ef
try other syntax for report feature of TEASER requirement
DaJansenGit Oct 19, 2024
97ab9b6
try other syntax for report feature of TEASER requirement
DaJansenGit Oct 19, 2024
b3fc1c0
add with regression for download of files
DaJansenGit Oct 19, 2024
f33946a
add log files
DaJansenGit Oct 19, 2024
6804267
add log files
DaJansenGit Oct 19, 2024
8d95b9e
add log files
DaJansenGit Oct 19, 2024
5aeb75a
add log files
DaJansenGit Oct 19, 2024
2a942df
add log files
DaJansenGit Oct 19, 2024
ed7a739
add log files
DaJansenGit Oct 19, 2024
158993a
add log files
DaJansenGit Oct 19, 2024
c6cb82e
try to copy license to mambauser home directory as we are not using r…
DaJansenGit Oct 19, 2024
f5bc470
change dockerfile to solve dymola license problem
DaJansenGit Oct 19, 2024
d3dffb0
change dockerfile to solve dymola license problem
DaJansenGit Oct 19, 2024
c276c34
change dockerfile to solve dymola license problem
DaJansenGit Oct 19, 2024
06a2d73
unify skip task message
DaJansenGit Oct 19, 2024
9a11541
prepare regression job to work for other plugins
DaJansenGit Oct 19, 2024
ee7d284
try to build new energyplus image based on micromamba
DaJansenGit Oct 19, 2024
b973393
try to build new energyplus image based on micromamba
DaJansenGit Oct 19, 2024
cef0043
try to run regression tests for EP with new image
DaJansenGit Oct 19, 2024
e7603fd
really use different python versions
DaJansenGit Oct 19, 2024
caf54b0
try to run includes with PYTHON_VERSION variable
DaJansenGit Oct 19, 2024
f76f620
try to run includes with PYTHON_VERSION variable
DaJansenGit Oct 19, 2024
cba3d06
update rules in sphinxdoc
DaJansenGit Oct 19, 2024
08292b9
update rules in sphinxdoc
DaJansenGit Oct 19, 2024
a97cbf4
update rules in sphinxdoc
DaJansenGit Oct 19, 2024
be8eb97
update rules in sphinxdoc
DaJansenGit Oct 19, 2024
63c6f76
update rules in sphinxdoc
DaJansenGit Oct 19, 2024
3114911
update rules in sphinxdoc
DaJansenGit Oct 19, 2024
e75dce7
split run command for EP into multiple steps to identify error with p…
DaJansenGit Oct 19, 2024
725523d
check whats wrong with coverage
DaJansenGit Oct 20, 2024
cb2b5b6
try combined report
DaJansenGit Oct 20, 2024
79e43d7
try combined report
DaJansenGit Oct 20, 2024
e40f886
try combined report
DaJansenGit Oct 20, 2024
8af1c19
try combined report
DaJansenGit Oct 20, 2024
4b35e7c
try combined report
DaJansenGit Oct 20, 2024
c397fa1
try combined report
DaJansenGit Oct 20, 2024
79c88d0
try combined report
DaJansenGit Oct 20, 2024
0ba59bc
try combined report
DaJansenGit Oct 20, 2024
72c7254
try combined report
DaJansenGit Oct 20, 2024
49db9f8
try combined report
DaJansenGit Oct 20, 2024
615513e
try combined report
DaJansenGit Oct 20, 2024
1ef66f1
try combined report
DaJansenGit Oct 20, 2024
2daed2a
put pipeline together
DaJansenGit Oct 20, 2024
5ca12d7
put pipeline together
DaJansenGit Oct 20, 2024
d0f1470
cleanup pipeline
DaJansenGit Oct 20, 2024
977529e
fix image for EP and add favicon
DaJansenGit Oct 20, 2024
81d6291
not only perform integration tests for plugins but also unit tests
DaJansenGit Oct 20, 2024
2405d8c
update docs
DaJansenGit Oct 20, 2024
ffe31f4
update docs and weather unittest resource path
DaJansenGit Oct 20, 2024
79f7831
adjust syntax for plugin testing
DaJansenGit Oct 20, 2024
69101b7
update pyproject.toml and delete requirements.txt files
DaJansenGit Oct 20, 2024
f0d8632
remove CFD plugin as its not maintained anymore and OpenFoam plugin i…
DaJansenGit Oct 20, 2024
e35f0fe
update dockerignore
DaJansenGit Oct 20, 2024
fead974
update docs for docker image
DaJansenGit Oct 20, 2024
429fad3
update docs for docker image
DaJansenGit Oct 20, 2024
2980f71
update docs for docker images
DaJansenGit Oct 20, 2024
95acb7d
try to fix build of images
DaJansenGit Oct 20, 2024
b4f463a
try to fix build of images
DaJansenGit Oct 20, 2024
7d8b031
try to fix build of images
DaJansenGit Oct 20, 2024
ad814eb
try without env file usage
DaJansenGit Oct 20, 2024
5f3f659
reanrge docker build command because build-arg is ignored
DaJansenGit Oct 20, 2024
1b774e8
reanrge docker build command because build-arg is ignored
DaJansenGit Oct 20, 2024
8b1f901
fix dymola builds python version
DaJansenGit Oct 20, 2024
ab7bbb7
add -i server for pypi again because for some reason it fails/takes e…
DaJansenGit Oct 20, 2024
c43be90
make sure base image is build before ep image is build
DaJansenGit Oct 20, 2024
c721e42
try to make build compatible with python 3.9
DaJansenGit Oct 20, 2024
8cb563b
add tests for plugin comfort and move build job back to end of pipeli…
DaJansenGit Oct 20, 2024
e1269a2
add tests for plugin comfort and move build job back to end of pipeli…
DaJansenGit Oct 20, 2024
bbf5e9e
try to build image for PluginAixlib
DaJansenGit Oct 20, 2024
be5e8c3
fix syntax in pyproject.toml
DaJansenGit Oct 20, 2024
488aca4
adjust image tag
DaJansenGit Oct 20, 2024
ed653db
make sure to activate mamba in dockerfile
DaJansenGit Oct 20, 2024
7192c43
build plugin image for EP as well and add other dockerfiles already
DaJansenGit Oct 20, 2024
1b809f8
dont use existing ep build as this will increase building time
DaJansenGit Oct 20, 2024
bf0e08a
add builds for the other plugin dev images
DaJansenGit Oct 20, 2024
0366477
add jobs for main as well and move build job again to the end of pipe…
DaJansenGit Oct 20, 2024
36dfe65
correct PluginEnergyplus base image
DaJansenGit Oct 20, 2024
6cf453c
fix PluginComfort regression test setup
DaJansenGit Oct 20, 2024
33ea424
dont use existing ep build as this will increase building time
DaJansenGit Oct 21, 2024
26a2fbb
improve yml file
DaJansenGit Oct 21, 2024
dfd5404
Add submodule
DaJansenGit Oct 28, 2024
f1dfe98
move test resources from sciebo download folder to seperate GH reposi…
DaJansenGit Oct 28, 2024
fec01ec
remove outdated test resources folder
DaJansenGit Oct 28, 2024
1a0d73b
add tutorial how to update test resources
DaJansenGit Oct 28, 2024
60fe4b0
update test reources
DaJansenGit Oct 28, 2024
ab53d7a
udpate tutorial to update test resources
DaJansenGit Oct 29, 2024
fffc345
correct doc string[skip-ci]
DaJansenGit Oct 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions bim2sim/examples/e1_template_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


def run_simple_project():
"""Run the building simulation with teaser as backend in interactive mode.
"""Run a bim2sim project with the TemplatePlugin.

This example will show how to set up a project based on an IFC file,
how to create bim2sim elements based on the existing IFC data with all
Expand All @@ -30,7 +30,7 @@ def run_simple_project():

# Download additional test resources for arch domain, you might want to set
# force_new to True to update your test resources
download_test_resources(IFCDomain.arch, force_new=True)
# download_test_resources(IFCDomain.arch, force_new=True)

# Set the ifc path to use and define which domain the IFC belongs to.
# This is done via a dictionary, where the key is the domain and the value
Expand Down Expand Up @@ -77,19 +77,6 @@ def run_simple_project():
Path(bim2sim.__file__).parent.parent /
'test/resources/weather_files/DEU_NW_Aachen.105010_TMYx.mos')

# Assign relevant elements
# TODO this is currently not true, as we need to use TEASERTemplate,
# we need to solve #511 and #583 first
# The template plugin uses the BaseSimSettings which don't have any
# relevant elements defined. This means without overwriting the
# `relevant_elements` setting, no bim2sim elements will be created.
# Let's assign all `bps_elements` and the `Material` element. This way
# the IFC will be searched for all IFC entities that should be mapped into
# the classes defined in `bps_elements` and in the class `Material`.
# For further information about the elements structure and the mapping
# procedure please read the `elements` documentation
project.sim_settings.relevant_elements = {*bps_elements.items, Material}

# Assign the enrichment for use conditions of thermal zones.

# bim2sim allows to enrich the use conditions, e.g. how many persons are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def run_example_1():
'test/resources/weather_files/DEU_NW_Aachen.105010_TMYx.epw')

# specified settings for workflows can be changed later as well
project.sim_settings.ep_install_path = 'C://EnergyPlusV9-4-0/'
# project.sim_settings.ep_install_path = 'C://EnergyPlusV9-4-0/'
project.sim_settings.layers_and_materials = LOD.low
project.sim_settings.construction_class_walls = 'heavy'
project.sim_settings.construction_class_windows = \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
from pathlib import Path

import bim2sim
from bim2sim import Project, ConsoleDecisionHandler
from bim2sim import Project
from bim2sim.kernel.decision.decisionhandler import DebugDecisionHandler
from bim2sim.kernel.log import default_logging_setup
from bim2sim.utilities.types import IFCDomain, LOD, ZoningCriteria
from bim2sim.utilities.common_functions import download_test_resources, \
download_library
from bim2sim.utilities.types import IFCDomain, LOD
from bim2sim.utilities.common_functions import download_test_resources


def run_example_complex_building_teaser():
Expand Down Expand Up @@ -43,7 +42,7 @@ def run_example_complex_building_teaser():

# Set the install path to your EnergyPlus installation according to your
# system requirements
project.sim_settings.ep_install_path = 'C://EnergyPlusV9-4-0/'
# project.sim_settings.ep_install_path = 'C://EnergyPlusV9-4-0/'

# combine spaces to thermal zones based on their usage
# use cooling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pathlib import Path

import bim2sim
from bim2sim import Project, ConsoleDecisionHandler
from bim2sim import Project
from bim2sim.kernel.decision.decisionhandler import DebugDecisionHandler
from bim2sim.kernel.log import default_logging_setup
from bim2sim.utilities.types import IFCDomain, LOD, ZoningCriteria
Expand Down Expand Up @@ -97,22 +97,16 @@ def run_example_complex_building_teaser():
# create plots based on the results after simulation
project.sim_settings.create_plots = True

# Run the project with pre configured answers for decisions
# Run the project with pre-configured answers for decisions
space_boundary_genenerator = 'Other'
handle_proxies = (*(None,) * 12,)
construction_year = 2015
answers = (space_boundary_genenerator,
*handle_proxies,
construction_year)
# handler = ConsoleDecisionHandler()
handler = DebugDecisionHandler(answers)
handler.handle(project.run())

# Have a look at the elements/elements that were created
elements = project.playground.state['elements']
# filter the elements only for outer walls
df_finals = project.playground.state['df_finals']


if __name__ == '__main__':
run_example_complex_building_teaser()
7 changes: 2 additions & 5 deletions bim2sim/plugins/PluginTemplate/bim2sim_template/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
"""
from bim2sim.plugins import Plugin
from bim2sim.tasks import common, bps
from bim2sim.plugins.PluginTEASER.bim2sim_teaser.sim_settings import \
TEASERSimSettings
from bim2sim.sim_settings import BuildingSimSettings


class PluginTemplate(Plugin):
name = 'Template'
# TODO BuildingSimSetting don't work due to issues with #511 and #583
sim_settings = TEASERSimSettings
# sim_settings = BuildingSimSettings
sim_settings = BuildingSimSettings
default_tasks = [
common.LoadIFC,
common.CheckIfc,
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sphinx
sphinx<=8.0.2
sphinx-rtd-theme
livereload
myst-parser
Expand Down
9 changes: 4 additions & 5 deletions docs/source/user-guide/PluginTemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,14 @@ micromamba activate bim2sim

# clone bim2sim repository (you can also use SSH if you prefer)
# the option "--recurse-submodules" is needed to load submodules
git clone --recurse-submodules https://github.com/BIM2SIM/bim2sim.git
# change into bim2sim folder
cd bim2sim
# use of development branch is recommended, as main branch is currently not updated regulary
git checkout development
git clone -b development https://github.com/BIM2SIM/bim2sim.git

# install conda-forge packages (OCC not available via PyPi)
micromamba install -c conda-forge pythonocc-core=7.7.0

# change into bim2sim folder
cd bim2sim

# install pip requirements
pip install -e '.'

Expand Down
16 changes: 10 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@ authors = [
]
description = "bim2sim is a framework to create simulation models for different purposes based on BIM models in IFC format."
readme = "README.md"
requires-python = ">=3.10, <=3.10.14"
requires-python = ">=3.10, <=3.11.10"
classifiers = [
"Development Status :: XXX", # see https://en.wikipedia.org/wiki/Software_release_life_cycle
"License :: XXX",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"ifcopenshell>=0.7.0",
"ifcopenshell==0.7.0.240627",
"docopt==0.6.2",
"numpy==1.26.0",
"pandas==2.1.3",
Expand All @@ -47,6 +48,9 @@ dependencies = [
"rwthcolors==0.2.4",
"SciencePlots==2.1.0",
"pillow==10.1.0",
"gitpython==3.1.40",
"svglib==1.5.1",
"reportlab==4.2.2",
"scipy==1.11.3", # is a dependency from networkx, should installed automatically
]

Expand All @@ -63,24 +67,24 @@ PluginTEASER = [
"RWTHColors",
"scienceplots",
"ebcpy",
"TEASER@git+https://github.com/RWTH-EBC/TEASER#egg=development",
"TEASER@git+https://github.com/RWTH-EBC/TEASER@development#egg=TEASER[report]",
"BuildingsPy@git+https://github.com/DaJansenGit/BuildingsPy.git",
]
PluginEnergyPlus = [
"shapely",
"numpy-stl",
"energyplus-regressions",
"eppy@git+https://github.com/BIM2SIM/eppy",
"geomeppy@git+https://github.com/BIM2SIM/geomeppy#egg=fix_dependencies",
"geomeppy@git+https://github.com/BIM2SIM/geomeppy@fix_dependencies#egg=geomeppy",
"OCCUtils@git+https://github.com/tpaviot/pythonocc-utils", # from base requiremts.txt
]
PluginAixLib = [
"pyvis@git+https://github.com/squidKid-deluxe/pyvis.git#egg=fix-show",
"pyvis@git+https://github.com/squidKid-deluxe/pyvis@fix-show#egg=pyvis",
]
PluginCFD = [ # prepared to add dependencies, same installtion routine like other plugins
]
PluginHKESim = [
"pyvis@git+https://github.com/squidKid-deluxe/pyvis.git#egg=fix-show",
"pyvis@git+https://github.com/squidKid-deluxe/pyvis@fix-show#egg=pyvis",
]
PluginLCA = [ # prepared to add dependencies, same installtion routine like other plugins
]
Expand Down