mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 10:51:13 +00:00
bimtester: sort command line args by abc
This commit is contained in:
@@ -28,15 +28,76 @@ def show_widget(features="", ifcfile="", get_featurepath_from_ifcpath=False):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
|
# TODO make similar to bash commands
|
||||||
|
# use - not _ in named args
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Runs unit tests for BIM data"
|
description="Runs unit tests for BIM data"
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-a",
|
||||||
|
"--advanced-arguments",
|
||||||
|
type=str,
|
||||||
|
help="Specify your own arguments to Python's Behave",
|
||||||
|
default=""
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-c",
|
||||||
|
"--console",
|
||||||
|
action="store_true",
|
||||||
|
help="Show results in the console"
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-d",
|
||||||
|
"--featuresdir",
|
||||||
|
type=str,
|
||||||
|
help=(
|
||||||
|
"Specify a features directory. This should contain "
|
||||||
|
"a directory named 'features' which contains all the "
|
||||||
|
"feature files."
|
||||||
|
),
|
||||||
|
default=""
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-g",
|
||||||
|
"--gui",
|
||||||
|
action="store_true",
|
||||||
|
help=(
|
||||||
|
"Start the gui. The option t (copyintemprun) "
|
||||||
|
"is triggered automaticly."
|
||||||
|
)
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-f",
|
||||||
|
"--feature",
|
||||||
|
type=str,
|
||||||
|
help="Specify a feature file to test",
|
||||||
|
default=""
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-i",
|
||||||
|
"--ifcfile",
|
||||||
|
type=str,
|
||||||
|
help=(
|
||||||
|
"Specify a ifc file."
|
||||||
|
),
|
||||||
|
default=""
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-p",
|
"-p",
|
||||||
"--purge",
|
"--purge",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="Purge tests of deleted elements"
|
help="Purge tests of deleted elements"
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-path",
|
||||||
|
"--path",
|
||||||
|
type=str,
|
||||||
|
help=(
|
||||||
|
"Specify a path to prepend to feature and ifc file"
|
||||||
|
),
|
||||||
|
default=""
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-r",
|
"-r",
|
||||||
"--report",
|
"--report",
|
||||||
@@ -49,44 +110,6 @@ if __name__ == "__main__":
|
|||||||
action="store_true",
|
action="store_true",
|
||||||
help="Generate a HTML report after running the tests"
|
help="Generate a HTML report after running the tests"
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
|
||||||
"-path",
|
|
||||||
"--path",
|
|
||||||
type=str,
|
|
||||||
help=(
|
|
||||||
"Specify a path to prepend to feature and ifc file"
|
|
||||||
),
|
|
||||||
default=""
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"-c",
|
|
||||||
"--console",
|
|
||||||
action="store_true",
|
|
||||||
help="Show results in the console"
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"-f",
|
|
||||||
"--feature",
|
|
||||||
type=str,
|
|
||||||
help="Specify a feature file to test",
|
|
||||||
default=""
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"-a",
|
|
||||||
"--advanced-arguments",
|
|
||||||
type=str,
|
|
||||||
help="Specify your own arguments to Python's Behave",
|
|
||||||
default=""
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"-g",
|
|
||||||
"--gui",
|
|
||||||
action="store_true",
|
|
||||||
help=(
|
|
||||||
"Start the gui. The option t (copyintemprun) "
|
|
||||||
"is triggered automaticly."
|
|
||||||
)
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-t",
|
"-t",
|
||||||
"--copyintemprun",
|
"--copyintemprun",
|
||||||
@@ -96,26 +119,6 @@ if __name__ == "__main__":
|
|||||||
"and run bimtester with them."
|
"and run bimtester with them."
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
|
||||||
"-d",
|
|
||||||
"--featuresdir",
|
|
||||||
type=str,
|
|
||||||
help=(
|
|
||||||
"Specify a features directory. This should contain "
|
|
||||||
"a directory named 'features' which contains all the "
|
|
||||||
"feature files."
|
|
||||||
),
|
|
||||||
default=""
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"-i",
|
|
||||||
"--ifcfile",
|
|
||||||
type=str,
|
|
||||||
help=(
|
|
||||||
"Specify a ifc file."
|
|
||||||
),
|
|
||||||
default=""
|
|
||||||
)
|
|
||||||
|
|
||||||
args = vars(parser.parse_args())
|
args = vars(parser.parse_args())
|
||||||
from json import dumps
|
from json import dumps
|
||||||
|
|||||||
Reference in New Issue
Block a user