mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-30 12:09:51 +00:00
bimtester: merge guibimtester into bimtester module
This commit is contained in:
committed by
Dion Moult
parent
15199152ac
commit
5ce334019c
@@ -5,6 +5,11 @@
|
|||||||
+ ifcopenshell
|
+ ifcopenshell
|
||||||
|
|
||||||
|
|
||||||
|
### Start bimtester Gui from a shell
|
||||||
|
```
|
||||||
|
python3 ./bimtester.py -g
|
||||||
|
```
|
||||||
|
|
||||||
### Create a binary out of the Python package
|
### Create a binary out of the Python package
|
||||||
+ The commands needs to be updated
|
+ The commands needs to be updated
|
||||||
+ Unix:
|
+ Unix:
|
||||||
|
|||||||
@@ -7,6 +7,24 @@ from bimtester import reports
|
|||||||
from bimtester import run
|
from bimtester import run
|
||||||
|
|
||||||
|
|
||||||
|
def show_widget():
|
||||||
|
|
||||||
|
import sys
|
||||||
|
from PySide2 import QtWidgets
|
||||||
|
|
||||||
|
from bimtester.guiwidget import GuiWidgetBimTester
|
||||||
|
|
||||||
|
# Create the Qt Application
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
|
||||||
|
# Create and show the form
|
||||||
|
form = GuiWidgetBimTester()
|
||||||
|
form.show()
|
||||||
|
|
||||||
|
# Run the main Qt loop
|
||||||
|
sys.exit(app.exec_())
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
@@ -44,12 +62,20 @@ if __name__ == "__main__":
|
|||||||
help="Specify your own arguments to Python's Behave",
|
help="Specify your own arguments to Python's Behave",
|
||||||
default=""
|
default=""
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-g",
|
||||||
|
"--gui",
|
||||||
|
action="store_true",
|
||||||
|
help="Start with gui",
|
||||||
|
)
|
||||||
args = vars(parser.parse_args())
|
args = vars(parser.parse_args())
|
||||||
|
|
||||||
if args["purge"]:
|
if args["purge"]:
|
||||||
clean.TestPurger().purge()
|
clean.TestPurger().purge()
|
||||||
elif args["report"]:
|
elif args["report"]:
|
||||||
reports.generate_report()
|
reports.generate_report()
|
||||||
|
elif args["gui"]:
|
||||||
|
show_widget()
|
||||||
else:
|
else:
|
||||||
run.run_tests(args)
|
run.run_tests(args)
|
||||||
print("# All tasks are complete :-)")
|
print("# All tasks are complete :-)")
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
# TODO merge into bimtester module
|
|
||||||
|
|
||||||
import sys
|
|
||||||
from PySide2 import QtWidgets
|
|
||||||
|
|
||||||
from bimtester.guiwidget import GuiWidgetBimTester
|
|
||||||
|
|
||||||
|
|
||||||
def show_widget():
|
|
||||||
|
|
||||||
# Create the Qt Application
|
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
|
||||||
|
|
||||||
# Create and show the form
|
|
||||||
form = GuiWidgetBimTester()
|
|
||||||
form.show()
|
|
||||||
|
|
||||||
# Run the main Qt loop
|
|
||||||
sys.exit(app.exec_())
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
show_widget()
|
|
||||||
Reference in New Issue
Block a user