mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 06:21:40 +00:00
bimtester: startscript, add argument to start gui with some start directories
This commit is contained in:
committed by
Dion Moult
parent
fae899823b
commit
864dcffef8
@@ -7,7 +7,7 @@ from bimtester import reports
|
|||||||
from bimtester import run
|
from bimtester import run
|
||||||
|
|
||||||
|
|
||||||
def show_widget():
|
def show_widget(features="", ifcfile=""):
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from PySide2 import QtWidgets
|
from PySide2 import QtWidgets
|
||||||
@@ -18,7 +18,7 @@ def show_widget():
|
|||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
|
||||||
# Create and show the form
|
# Create and show the form
|
||||||
form = GuiWidgetBimTester()
|
form = GuiWidgetBimTester(features, ifcfile)
|
||||||
form.show()
|
form.show()
|
||||||
|
|
||||||
# Run the main Qt loop
|
# Run the main Qt loop
|
||||||
@@ -66,16 +66,41 @@ if __name__ == "__main__":
|
|||||||
"-g",
|
"-g",
|
||||||
"--gui",
|
"--gui",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="Start with gui",
|
help=(
|
||||||
|
"Start the gui. The option t (run in temp directory) "
|
||||||
|
"is triggered automaticly."
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"featuresdir",
|
||||||
|
type=str,
|
||||||
|
nargs="?",
|
||||||
|
help=(
|
||||||
|
"Specify a features directory. This should contain "
|
||||||
|
" a directory named features which contains all the "
|
||||||
|
"feature files."
|
||||||
|
),
|
||||||
|
default=""
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"ifcfile",
|
||||||
|
type=str,
|
||||||
|
nargs="?",
|
||||||
|
help=(
|
||||||
|
"Specify a ifc file."
|
||||||
|
),
|
||||||
|
default=""
|
||||||
|
)
|
||||||
|
|
||||||
args = vars(parser.parse_args())
|
args = vars(parser.parse_args())
|
||||||
|
print(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"]:
|
elif args["gui"]:
|
||||||
show_widget()
|
show_widget(args["featuresdir"], args["ifcfile"])
|
||||||
else:
|
else:
|
||||||
run.run_tests(args)
|
run.run_tests(args)
|
||||||
print("# All tasks are complete :-)")
|
print("# All tasks are complete :-)")
|
||||||
|
|||||||
Reference in New Issue
Block a user