bimtester, improvements as well as standalone GUI and FreeCAD module
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:
- https://github.com/IfcOpenShell/IfcOpenShell/pull/1122
- behave runs in tmp directory. Thus feature files are no longer copied into source directory
- a gui for chooseing ifc und feature directory (see https://github.com/berndhahnebach/bimtester/blob/3c80d6af15305a901411f0aa4e6c8e0a841d8c1b/guistartbimtester.py#L28)
- splitt bimtester module into separate modules
cheers bernd
Tagged:
Comments
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.
To be discussed ... See comment https://github.com/IfcOpenShell/IfcOpenShell/blob/c057cb9aab5d/src/ifcbimtester/bimtester.py#L25
@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 atsrc/ifcbimtester/
. Perhaps the same with the Qt GUI?Totally agree with this one. How about your time range? Do you go for the move or should I?
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
@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?
:-) I will go for it.
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:
How does that sounds?
bernd
@bernd go for it :)
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.
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
@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!
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.
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.
copyintemprun
were things that I find are complications that should not exist.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.
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!
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:
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
@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 :)
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
Any wiki / forum discussion how to use this BimTester in FreeCAD ? Thanks.
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.
related: https://github.com/IfcOpenShell/IfcOpenShell/issues/1568#issuecomment-977146731
Hey @bernd how far are we from an online BIMTester with customizable rules?
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.
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
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
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.
@bernd Any reason the
*.feature
files are not stored inbimtester/features
folder ? Would it be not good to have common test directly available to user rather than having to copy/paste from wiki ?Are ther any on the wiki?
ATM some basic example feature files as well as some ifc are stored in examples ... https://github.com/IfcOpenShell/IfcOpenShell/tree/ebe5460a9f69ed8a39bfbe8937884ec99202000b/src/ifcbimtester/examples/01_ifcschema_translated
May be we could add more. Test to the example ones but the examples itself should be suitable for the feature files than. It is on my TODO for bimtester.
Saving the feature files in bimtester/examples seams fine for me. Any special reason why you wuold like to have them in a directory called features? This directory name is no longer needed to run BIMTester.
Yes all the MicroMVDs.
To follow behave advices/conventions so it is easier to find and understand the project structure ?
Thanks for the links.
The feature files from the wiki are templates, not ready to use feature files. If we put them into the repository we should put them in a template directory.
Putting the featrure files inside the code would make things more difficault for the user. The interface for the user is the feature file. If we put the feature file inside the code a standard user might be confused. IMHO we should keep the feature fils splitt from the code.
But the behave standard says it different ...
We need @Moult here ... Dion what is your opinion in this regard?