B
by bernd on 23 Nov 2020, edited 9 Dec 2021
#
+3 votes
something to show has been finished ...
bimtester FreeCAD module :
-
https://github.com/berndhahnebach/bimtester
-
ATM bimtester code is copied here for sake of simplicity, long term aim would be to install bimtester like ifcopenshell by make install
-
I reoganised the bimtester.py module (see later on)
-
A Taskpanel was added which runs stand alone too.
-
I am still changeing and reorganizing my added code in environment module and step files. Do not look to much on this code. Expect still a lot of changes to come here.
bimtester improvements:
cheers bernd
M
by Moult on 23 Nov 2020
#
Fantastic! I think this code will break the current BlenderBIM Add-on connection, but it should be trivial to fix. I haven't tested any of it yet but at a glance it looks like its helping BIMTester mature which is good.
M
by Moult on 24 Nov 2020
#
+1 votes
@bernd I think you're right. The option I'd choose is for all other code to go one level down into src/ifcbimtester/bimtester
, and to keep the CLI at src/ifcbimtester/
. Perhaps the same with the Qt GUI?
B
by bernd on 25 Nov 2020, edited 25 Nov 2020
#
@Moult said:
I think you're right. The option I'd choose is for all other code to go one level down into src/ifcbimtester/bimtester
, and to keep the CLI at src/ifcbimtester/
. ...
Totally agree with this one. How about your time range? Do you go for the move or should I?
@Moult said:
I think you're right. ... Perhaps the same with the Qt GUI?
Do you mean the calls to start the stand alone bimtester gui? I already did this in the FreeCAD bimtester. See https://github.com/berndhahnebach/bimtester/blob/d76bbba0fed982fca2be65362bc7d253660df3fc/guistartbimtester.py This code should be in CLI bimtester.py
M
by Moult on 25 Nov 2020
#
@bernd go for it :) I'm happy to merge PRs as soon as I see them for any bimtester code. You're doing great work! No need to ask for permission, bimtester is very simple after all.
As for the Qt GUI, shouldn't https://github.com/berndhahnebach/bimtester/blob/d76bbba0fed982fca2be65362bc7d253660df3fc/code_bimtester/guiwidget.py be moved up too? Since it's just an interface, not necessarily part of the core Python module?
B
by bernd on 25 Nov 2020, edited 25 Nov 2020
#
@Moult said:
@bernd go for it :) I'm happy to merge PRs as soon as I see them for any bimtester code. You're doing great work! No need to ask for permission, bimtester is very simple after all.
:-) I will go for it.
@Moult said:
As for the Qt GUI, shouldn't https://github.com/berndhahnebach/bimtester/blob/d76bbba0fed982fca2be65362bc7d253660df3fc/code_bimtester/guiwidget.py be moved up too? Since it's just an interface, not necessarily part of the core Python module?
Ahh ok splitting core code and gui code is a good idea. But I would move the gui in a directory too.
directory src/ifcbimtester:
-
bimtester (directory, inside will be all bimtester core code)
-
guibimtester (directory, inside will be the guiwidget module)
-
bimtester.py (CLI to run bimtester in console mode or with gui)
How does that sounds?
bernd
B
by bernd on 25 Nov 2020, edited 25 Nov 2020
#
https://github.com/IfcOpenShell/IfcOpenShell/pull/1130
The Gui is not yet in a separate directory. If a separate directory is used again import problems arise on relative imports. But since the code is copied ATM to BlenderBIM and FreeCAD and may be some where I would like to keep the relative ones.
B
by bernd on 28 Nov 2020, edited 28 Nov 2020
#
We have two ways (two run methods) of run the tests, but in the arguments and help of the startscript this is not mentioned at all. We should may be rework the startscript args. But first it may makes sense to decide if we keep both and which one is the standard one, if we keep both? Should the Gui be able to run with both if we keep both? ...
At the moment the Gui uses new run method and console the standard run method. This will end up in confusion.
May be we wait with this until you have fixed BlenderBIM Bimtester?
Bernd
M
by Moult on 28 Nov 2020
#
@bernd honestly I haven't actually looked at the code in detail, I'm trusting that the PRs are a step in the right direction. I do need to review it and see how it integrates into Blender and ensure it doesn't break any useful workflows.
Just go ahead with what you think is right :) I'll catch up when I get the time!
B
by bernd on 28 Nov 2020, edited 28 Nov 2020
#
OK.
BTW: Neither old code has been removed nor big changes have been made. Mostly new code added and code moved as discussed here. Thus just calls have to be adapted on BlenderBIMs side.
M
by Moult on 2 Feb 2021, edited 2 Feb 2021
#
+7 votes
I've found the time to return to BIMTester and I've done a bunch of breaking changes (sorry!). BIMTester to me is a very simple, but very delicate utility that needs a lot of consideration before we go too far down a particular path. I've tried to outline the logic I've followed whilst making these breaking changes, and hopefully we can agree that these are good principles to follow.
-
BIMTester should be simple. The whole point of BIMTester is that exchange requirement checking should take cues from the BDD testing procedures that the software world have used, without reinventing a lot of the wheel, or adding a lot of new stuff on top. As much as possible, I want it to be a lightweight wrapper around Behave, with zero magic. People should read the code and see exactly how it works without needing time to understand it. A lot of magic was introduced, which I have aggressively deleted (but hopefully without damaging functionality). For example, the two runners (run vs run_all), and the copyintemprun
were things that I find are complications that should not exist.
-
BIMTester should answer the question "does this IFC file comply with these requirements?", and it should be obvious in its usage that that is what it is answering. For this reason, I've changed the CLI functions to reflect the usage - the user now specifies an IFC, as well as a single feature file (not a feature directory) by default. Later on, we can introduce supplementary functionality like feature dirs, multiple IFC files, or even zero IFC files. But it should be supplementary, not the default.
-
BIMTester should work here, there, everywhere. The previous BIMTester relied a lot upon absolute or relative paths in terms of where features were located or where IFCs were located. This is bad. People should just be able to run bimtester and it should Just Work (TM). I think your solution of running in a temp dir is great. Let's keep this strategy!
-
Tests should read as contractual requirements. A test that reads "There are no {ifc_class} elements" is not good. We should rename it to something like "The {ifc_class} IFC class must not be used for any elements". Similarly, filenames should reflect logical contractual requirement groupings. E.g. "project_setup" is good, but "attributes_eleclasses" is bad.
-
Groups of tests should be carefully considered before we publish them as part of BIMTester. We should consider the usecase, document the 3-line BDD purpose statement. If we want people to take BIMTester seriously, the tests should seem carefully audited, instead of being the kitchen sink.
-
It should be easy for users to add their own requirements. In the past, this required patching the steps dir and doing some voodoo. Not good. It should be super, super easy.
-
BIMTester should be decoupled. BIMTester should simply be a library first and foremost. Interfaces, like a CLI, GUI, or other modules, such as smart view generation, should be decoupled. I've made a start on this.
Will continue to hack on it... but I realise these changes do break things and do affect people. Hopefully though things are breaking, it is a step in the right direction.
M
by Moult on 4 Feb 2021
#
+4 votes
As part of these goals - a large part of BIMTester is not so much the technical voodoo, but more about the way we can better communicate BIM requirements to non-technical people. To demonstrate what this means, I've created a mockup web-application for people to help generate BIMTester requirements.
You can access it here: https://blenderbim.org/bimtester/ - it is WIP, so don't mind missing content, buttons that don't work, etc. Just a small example to give an idea.
Would love to hear feedback!
B
by bernd on 4 Feb 2021, edited 5 Feb 2021
#
Wow, I need to get my hands on this. I have not done any dev on bimtester for the past three weeks and I will be off the office for the next week too. But after this I will get back ...
Just one point in the regard of all the "magic that was introduced". When I started hacking on BIMTester it only did really run with BlenderBIM. The base for all my "magic" was:
-
make it possible to run BIMTester standalone
-
BIMTester should not change ifcopenshell source code
-
make it as easy as posible to run BIMTester
-
make it possible to run multiple feature files
The first three are a must have IMHO. But it seams we all do agree on this.
In the regard of the fourth I am still not 100 % sure myself what is best, one huge feature file or a lot of small feature files. When I started hacking on BIMTester multiple feature files seam to fit better for me. ATM the version before Dions changes runs for me in a real environment on daily usage with multiple feature files. Changes on multiple feature files have been a bit cumbersome ... I will give the monster feature file a try (I have to when starting to use latest code :-) )
cheers bernd
M
by Moult on 4 Feb 2021
#
@bernd I think it is best if we had a voice call when you have time to review the changes. Right now there are three of us hacking on it (rbertucat, you, and me) so we should make sure we are fully aligned. The changes I made were aggressive, but hopefully in the right direction. About 800 lines of code were deleted overall, so I'm pretty sure I messed up somewhere and some of that magic was actually really needed, but I guess we need to discuss too :)
B
by bernd on 17 Nov 2021, edited 17 Nov 2021
#
+1 votes
came back to this. The time beeing I extended the tests in the regard of our needs in the company. BIMTester still rund on a daily basis on all ifc created be the company draftsmen. I am still based on the latest version before all the magic changes. I started to merge together my bimtester code back into all the changes made on official bimtester. My aim is to be on top on official bimtester with as less changes as possible.
A question on startup ... In the example directory is a steps directory with some step files inside. Why are they in the examples directory? They will not be used there or will they? Is it just some wrecking yard for step files? Or is it some library of step files to not flood official BIMTester step files?
https://github.com/IfcOpenShell/IfcOpenShell/tree/5c224150ece5cd24b4074f2c68364d1867d7b611/src/ifcbimtester/examples/steps
cheers bernd
P
by paullee on 17 Nov 2021
#
Any wiki / forum discussion how to use this BimTester in FreeCAD ? Thanks.
B
by bernd on 17 Nov 2021, edited 17 Nov 2021
#
+1 votes
ATM the latest BIMTester code from ifcopenshell repo does not run with the FreeCAD AddOn. All the changes broke the FreeCAD AddOn. If my old BIMTester code is used it still works.
Best is to have some patience. As soon as i have transfered my code on top of official BIMTester the FreeCAD AddOn will work with the latest BIMTester code.
D
by duncan on 28 Nov 2021
#
Hey @bernd how far are we from an online BIMTester with customizable rules?
B
by bernd on 28 Nov 2021
#
Depends ... I am not a web developer, thus far away. On the contrary a web developer would say everything is there just some web ui is needed thus he might say we are really close ...
check the GSOC. A web front end POC has been done already.
B
by bernd on 30 Nov 2021, edited 30 Nov 2021
#
+1 votes
@paullee said:
Any wiki / forum discussion how to use this BimTester in FreeCAD ? Thanks.
use FreeCAD AddOn manager to update the AddOn. read the readme https://github.com/bimtester/bimtesterfc#readme run it and report back if it worked out. For me it did worked with the simple example provided with BIMTester.
bernd
P
by paullee on 1 Dec 2021, edited 1 Dec 2021
#
@bernd said:
use FreeCAD AddOn manager to update the AddOn. read the readme https://github.com/bimtester/bimtesterfc#readme run it and report back if it worked out. For me it did worked with the simple example provided with BIMTester.
Thanks for the pointer ! Add-on Installation is intuitive.
However, it needs pystache to run (as mentioned in the readme), no idea what it is as python beginner, would search over web. Could add-on installation includes this so more peoples are not intimidated by the complexity? :D


P
by paullee on 1 Dec 2021, edited 1 Dec 2021
#
import behave.formatter.pretty # Needed for pyinstaller to package it
No module named 'behave'
Then after installing (I only try 'pip install behave', seem only install for current user not system-wide), it works ! Thanks !
BTW, the 'Screen shot' in the Add-on Manager for BIMTester is not working in my case.