mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
You can now load the active IFC file into a BIMTester audit. Rapid auditing go go go!
This commit is contained in:
@@ -18,56 +18,37 @@ def before_all(context):
|
||||
if context.config.lang:
|
||||
switch_locale(userdata.get("localedir"), context.config.lang)
|
||||
|
||||
context.ifc_path = userdata["ifc"]
|
||||
context.ifc_basename = os.path.basename(
|
||||
os.path.splitext(context.ifc_path)[0]
|
||||
)
|
||||
|
||||
continue_after_failed = userdata.getbool(
|
||||
"runner.continue_after_failed_step", True
|
||||
)
|
||||
continue_after_failed = userdata.getbool("runner.continue_after_failed_step", True)
|
||||
Scenario.continue_after_failed_step = continue_after_failed
|
||||
|
||||
# keep out path
|
||||
context.outpath = os.path.join(this_path, "..")
|
||||
# TODO: refactor smart view support into a decoupled module
|
||||
# context.ifc_path = userdata.get("ifc", "")
|
||||
# context.ifc_basename = os.path.basename(
|
||||
# os.path.splitext(context.ifc_path)[0]
|
||||
# )
|
||||
|
||||
# since bimtesterfc directory in tmp is removed on every run
|
||||
# neither log file nor sm file does need to be explicit removed first
|
||||
# context.outpath = os.path.join(this_path, "..")
|
||||
|
||||
# set up log file
|
||||
context.thelogfile = os.path.join(
|
||||
context.outpath,
|
||||
context.ifc_basename + ".log"
|
||||
)
|
||||
create_logfile(
|
||||
context.thelogfile,
|
||||
context.ifc_basename,
|
||||
)
|
||||
# context.thelogfile = os.path.join(context.outpath, context.ifc_basename + ".log")
|
||||
# create_logfile(
|
||||
# context.thelogfile,
|
||||
# context.ifc_basename,
|
||||
# )
|
||||
|
||||
# set up smart view file
|
||||
context.smview_file = os.path.join(
|
||||
context.outpath,
|
||||
context.ifc_basename + ".bcsv"
|
||||
)
|
||||
create_zoom_smartview(
|
||||
context.smview_file,
|
||||
context.ifc_basename,
|
||||
)
|
||||
# # set up smart view file
|
||||
# context.smview_file = os.path.join(context.outpath, context.ifc_basename + ".bcsv")
|
||||
# create_zoom_smartview(
|
||||
# context.smview_file,
|
||||
# context.ifc_basename,
|
||||
# )
|
||||
|
||||
|
||||
def after_step(context, step):
|
||||
|
||||
if step.status == "failed":
|
||||
|
||||
# append log file
|
||||
append_logfile(context, step)
|
||||
|
||||
# extend smart view
|
||||
if hasattr(context, "falseguids"):
|
||||
# print(context.falseguids)
|
||||
|
||||
append_zoom_smartview(
|
||||
context.smview_file,
|
||||
step.name,
|
||||
context.falseguids
|
||||
)
|
||||
pass
|
||||
# TODO: refactor smart view support into a decoupled module
|
||||
#if step.status == "failed":
|
||||
# # append log file
|
||||
# append_logfile(context, step)
|
||||
# # extend smart view
|
||||
# if hasattr(context, "falseguids"):
|
||||
# append_zoom_smartview(context.smview_file, step.name, context.falseguids)
|
||||
|
||||
Reference in New Issue
Block a user