Skip to content

Commit

Permalink
Fix CLI for synthesis-workflow and MorphVal
Browse files Browse the repository at this point in the history
Change-Id: I50004c77706aaa45dc6afc850e3709a9201e0469
  • Loading branch information
adrien-berchet committed Nov 12, 2020
1 parent 20bd3a4 commit a86eab5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"diameter_synthesis>=0.1.7",
"gitpython",
"h5py<3",
"jinja2",
"joblib",
"luigi",
"matplotlib",
Expand All @@ -30,6 +31,7 @@
"neurom!=2.0.1.dev4",
"pandas",
"placement_algorithm>=2.1.1",
"PyYAML",
"region_grower>=0.1.10",
"scipy",
"seaborn",
Expand Down Expand Up @@ -85,7 +87,10 @@
"Topic :: Scientific/Engineering :: Bio-Informatics",
],
entry_points={
"console_scripts": ["synthesis_workflow=synthesis_workflow.tasks.cli:main"]
"console_scripts": [
"synthesis_workflow=synthesis_workflow.tasks.cli:main",
"morph_validation=morphval.cli:main",
]
},
include_package_data=True,
)
9 changes: 4 additions & 5 deletions src/synthesis_workflow/tasks/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,15 @@ def _get_workflow_parsers(parser=None):
parsers = {"root": parser}

workflow_parser = parser.add_subparsers(
help="Possible workflows", dest="workflow", required=True
help="Possible workflows", dest="workflow"
)

for workflow_name, task in WORKFLOW_TASKS.items():
try:
cls = task()
task_name = cls.__class__.__name__
doc = cls.__class__.__doc__
task_name = task.__name__
doc = task.__doc__
subparser = workflow_parser.add_parser(workflow_name, help=doc)
for param, param_obj in cls.get_params():
for param, param_obj in task.get_params():
param_name = "--" + param.replace("_", "-")
subparser.add_argument(
param_name,
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
""" Package version. """
VERSION = "0.0.3"
VERSION = "0.0.4.dev0"

0 comments on commit a86eab5

Please sign in to comment.