hpcflow-new2 0.2.0a71__tar.gz → 0.2.0a73__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/PKG-INFO +1 -1
  2. hpcflow_new2-0.2.0a73/hpcflow/_version.py +1 -0
  3. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/cli.py +27 -8
  4. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/object_list.py +1 -1
  5. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/parameters.py +10 -0
  6. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/task_schema.py +32 -8
  7. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/pyproject.toml +2 -2
  8. hpcflow_new2-0.2.0a71/hpcflow/_version.py +0 -1
  9. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/README.md +0 -0
  10. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/__init__.py +0 -0
  11. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/__pyinstaller/__init__.py +0 -0
  12. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/__pyinstaller/hook-hpcflow.py +0 -0
  13. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/app.py +0 -0
  14. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/cli.py +0 -0
  15. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/examples.ipynb +0 -0
  16. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/__init__.py +0 -0
  17. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/api.py +0 -0
  18. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/app.py +0 -0
  19. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/config/__init__.py +0 -0
  20. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/config/callbacks.py +0 -0
  21. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/config/cli.py +0 -0
  22. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/config/config.py +0 -0
  23. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/config/config_file.py +0 -0
  24. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/config/errors.py +0 -0
  25. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/__init__.py +0 -0
  26. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/actions.py +0 -0
  27. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/command_files.py +0 -0
  28. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/commands.py +0 -0
  29. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/element.py +0 -0
  30. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/environment.py +0 -0
  31. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/errors.py +0 -0
  32. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/json_like.py +0 -0
  33. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/loop.py +0 -0
  34. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/task.py +0 -0
  35. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/test_utils.py +0 -0
  36. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/utils.py +0 -0
  37. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/validation.py +0 -0
  38. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/workflow.py +0 -0
  39. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/core/zarr_io.py +0 -0
  40. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/data/__init__.py +0 -0
  41. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/data/config_file_schema.yaml +0 -0
  42. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/data/config_schema.yaml +0 -0
  43. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/data/environments_spec_schema.yaml +0 -0
  44. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/data/files_spec_schema.yaml +0 -0
  45. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/data/parameters_spec_schema.yaml +0 -0
  46. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/data/task_schema_spec_schema.yaml +0 -0
  47. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/data/template_components/__init__.py +0 -0
  48. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/data/template_components/command_files.yaml +0 -0
  49. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/data/template_components/environments.yaml +0 -0
  50. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/data/template_components/parameters.yaml +0 -0
  51. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/data/template_components/task_schemas.yaml +0 -0
  52. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/data/workflow_spec_schema.yaml +0 -0
  53. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/demo/__init__.py +0 -0
  54. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/demo/cli.py +0 -0
  55. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/demo/scripts/__init__.py +0 -0
  56. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/demo/scripts/demo_task_1_generate_t1_infile_1.py +0 -0
  57. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/demo/scripts/demo_task_1_generate_t1_infile_2.py +0 -0
  58. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/demo/scripts/demo_task_1_parse_p3.py +0 -0
  59. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/demo/scripts/generate_t1_file_01.py +0 -0
  60. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/demo/scripts/parse_t1_file_01.py +0 -0
  61. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/demo/scripts/test_main_script.py +0 -0
  62. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/helper/__init__.py +0 -0
  63. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/helper/cli.py +0 -0
  64. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/helper/helper.py +0 -0
  65. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/helper/watcher.py +0 -0
  66. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/log.py +0 -0
  67. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/persistence/__init__.py +0 -0
  68. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/persistence/base.py +0 -0
  69. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/persistence/json.py +0 -0
  70. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/persistence/pending.py +0 -0
  71. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/persistence/store_resource.py +0 -0
  72. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/persistence/utils.py +0 -0
  73. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/persistence/zarr.py +0 -0
  74. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/runtime.py +0 -0
  75. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/scripting/__init__.py +0 -0
  76. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/submission/__init__.py +0 -0
  77. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/submission/jobscript.py +0 -0
  78. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/submission/jobscript_info.py +0 -0
  79. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/submission/schedulers/__init__.py +0 -0
  80. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/submission/schedulers/direct.py +0 -0
  81. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/submission/schedulers/sge.py +0 -0
  82. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/submission/schedulers/slurm.py +0 -0
  83. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/submission/schedulers/utils.py +0 -0
  84. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/submission/shells/__init__.py +0 -0
  85. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/submission/shells/base.py +0 -0
  86. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/submission/shells/bash.py +0 -0
  87. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/submission/shells/os_version.py +0 -0
  88. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/submission/shells/powershell.py +0 -0
  89. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/submission/submission.py +0 -0
  90. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/sdk/typing.py +0 -0
  91. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_action.py +0 -0
  92. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_app.py +0 -0
  93. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_cli.py +0 -0
  94. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_element.py +0 -0
  95. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_element_set.py +0 -0
  96. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_input_source.py +0 -0
  97. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_input_value.py +0 -0
  98. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_json_like.py +0 -0
  99. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_loop.py +0 -0
  100. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_object_list.py +0 -0
  101. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_persistence.py +0 -0
  102. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_schema_input.py +0 -0
  103. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_submission.py +0 -0
  104. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_task.py +0 -0
  105. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_task_schema.py +0 -0
  106. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_utils.py +0 -0
  107. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_value_sequence.py +0 -0
  108. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/tests/unit/test_workflow.py +0 -0
  109. {hpcflow_new2-0.2.0a71 → hpcflow_new2-0.2.0a73}/hpcflow/viz_demo.ipynb +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hpcflow-new2
3
- Version: 0.2.0a71
3
+ Version: 0.2.0a73
4
4
  Summary: Computational workflow management
5
5
  License: MIT
6
6
  Author: aplowman
@@ -0,0 +1 @@
1
+ __version__ = "0.2.0a73"
@@ -2,6 +2,7 @@ from typing import Dict, List
2
2
  import click
3
3
  from colorama import init as colorama_init
4
4
  from termcolor import colored
5
+ from rich.pretty import pprint
5
6
 
6
7
  from hpcflow import __version__, _app_name
7
8
  from hpcflow.sdk.config.cli import get_config_CLI
@@ -205,7 +206,7 @@ def _make_API_CLI(app):
205
206
  @click.argument("py_test_args", nargs=-1, type=click.UNPROCESSED)
206
207
  @click.pass_context
207
208
  def test_hpcflow(ctx, py_test_args):
208
- """Run hpcflow test suite.".
209
+ """Run hpcFlow test suite.
209
210
 
210
211
  PY_TEST_ARGS are arguments passed on to Pytest.
211
212
 
@@ -401,7 +402,7 @@ def _make_submission_CLI(app):
401
402
  def OS_info_callback(ctx, param, value):
402
403
  if not value or ctx.resilient_parsing:
403
404
  return
404
- click.echo(app.get_OS_info())
405
+ pprint(app.get_OS_info())
405
406
  ctx.exit()
406
407
 
407
408
  @click.group()
@@ -422,7 +423,8 @@ def _make_submission_CLI(app):
422
423
  @click.option("--exclude-os", is_flag=True, default=False)
423
424
  @click.pass_context
424
425
  def shell_info(ctx, shell_name, exclude_os):
425
- click.echo(app.get_shell_info(shell_name, exclude_os))
426
+ """Show information about the specified shell, such as the version."""
427
+ pprint(app.get_shell_info(shell_name, exclude_os))
426
428
  ctx.exit()
427
429
 
428
430
  return submission
@@ -549,7 +551,7 @@ def _make_template_components_CLI(app):
549
551
  @click.command()
550
552
  def tc(help=True):
551
553
  """For showing template component data."""
552
- click.echo(app.template_components)
554
+ pprint(app.template_components)
553
555
 
554
556
  return tc
555
557
 
@@ -563,9 +565,10 @@ def _make_show_CLI(app):
563
565
 
564
566
  @click.command()
565
567
  @click.option(
568
+ "-r",
566
569
  "--max-recent",
567
570
  default=3,
568
- help="If True, show only recently finished workflows",
571
+ help="The maximum number of inactive submissions to show.",
569
572
  )
570
573
  @click.option(
571
574
  "--no-update",
@@ -592,7 +595,7 @@ def _make_show_CLI(app):
592
595
  callback=show_legend_callback,
593
596
  )
594
597
  def show(max_recent, full, no_update):
595
- """Show information about recent workflows."""
598
+ """Show information about running and recently active workflows."""
596
599
  app.show(max_recent=max_recent, full=full, no_update=no_update)
597
600
 
598
601
  return show
@@ -604,6 +607,11 @@ def _make_zip_CLI(app):
604
607
  @click.option("--log")
605
608
  @workflow_ref_type_opt
606
609
  def zip_workflow(workflow_ref, ref_type, log=None):
610
+ """Generate a copy of the specified workflow in the zip file format.
611
+
612
+ WORKFLOW_REF is the local ID (that provided by the `show` command}) or the
613
+ workflow path.
614
+ """
607
615
  workflow_path = app._resolve_workflow_reference(workflow_ref, ref_type)
608
616
  wk = app.Workflow(workflow_path)
609
617
  wk.to_zip(log=log)
@@ -616,6 +624,12 @@ def _make_cancel_CLI(app):
616
624
  @click.argument("workflow_ref")
617
625
  @workflow_ref_type_opt
618
626
  def cancel(workflow_ref, ref_type):
627
+ """Stop all running jobscripts of the specified workflow.
628
+
629
+ WORKFLOW_REF is the local ID (that provided by the `show` command}) or the
630
+ workflow path.
631
+
632
+ """
619
633
  app.cancel(workflow_ref, ref_type)
620
634
 
621
635
  return cancel
@@ -624,7 +638,8 @@ def _make_cancel_CLI(app):
624
638
  def _make_open_CLI(app):
625
639
  @click.group(name="open")
626
640
  def open_file():
627
- """Open a file (e.g. {app_name}'s log file) using the default application."""
641
+ """Open a file (for example {app_name}'s log file) using the default
642
+ application."""
628
643
 
629
644
  @open_file.command()
630
645
  @click.option("--path", is_flag=True, default=False)
@@ -689,7 +704,7 @@ def _make_open_CLI(app):
689
704
  @click.option("--path", is_flag=True, default=False)
690
705
  @workflow_ref_type_opt
691
706
  def workflow(workflow_ref, ref_type, path=False):
692
- """Open a workflow directory in e.g. File Explorer in Windows."""
707
+ """Open a workflow directory using, for example, File Explorer on Windows."""
693
708
  workflow_path = app._resolve_workflow_reference(workflow_ref, ref_type)
694
709
  if path:
695
710
  click.echo(workflow_path)
@@ -705,6 +720,10 @@ def _make_open_CLI(app):
705
720
  else:
706
721
  utils.open_file(dir_path)
707
722
 
723
+ open_file.help = open_file.help.format(app_name=app.name)
724
+ log.help = log.help.format(app_name=app.name)
725
+ config.help = config.help.format(app_name=app.name)
726
+
708
727
  return open_file
709
728
 
710
729
 
@@ -47,7 +47,7 @@ class ObjectList(JSONLike):
47
47
  return len(self._objects)
48
48
 
49
49
  def __repr__(self):
50
- return f"{self.__class__.__name__}({[self._get_item(i) for i in self._objects]})"
50
+ return repr(self._objects)
51
51
 
52
52
  def __str__(self):
53
53
  return str([self._get_item(i) for i in self._objects])
@@ -340,6 +340,11 @@ class SchemaInput(SchemaParameter):
340
340
  obj._task_schema = self._task_schema
341
341
  return obj
342
342
 
343
+ @property
344
+ def default_value(self):
345
+ if not self.multiple and "default" in self.single_labelled_data:
346
+ return self.single_labelled_data["default"]
347
+
343
348
  @property
344
349
  def task_schema(self):
345
350
  return self._task_schema
@@ -358,6 +363,11 @@ class SchemaInput(SchemaParameter):
358
363
  if not self.multiple:
359
364
  return next(iter(self.labelled_info()))["labelled_type"]
360
365
 
366
+ @property
367
+ def single_labelled_data(self):
368
+ if not self.multiple:
369
+ return self.labels[self.single_label]
370
+
361
371
  def labelled_info(self):
362
372
  for k, v in self.labels.items():
363
373
  label = f"[{k}]" if k else ""
@@ -3,10 +3,13 @@ import copy
3
3
  from dataclasses import dataclass, field
4
4
  from typing import Dict, List, Optional, Tuple, Union
5
5
 
6
+ from rich import print as rich_print
7
+ from rich.table import Table
8
+
6
9
  from hpcflow.sdk import app
7
10
  from hpcflow.sdk.core.parameters import Parameter
8
11
  from .json_like import ChildObjectSpec, JSONLike
9
- from .parameters import ParameterPropagationMode, SchemaInput
12
+ from .parameters import NullDefault, ParameterPropagationMode, SchemaInput
10
13
  from .utils import check_valid_py_identifier
11
14
 
12
15
 
@@ -82,13 +85,34 @@ class TaskSchema(JSONLike):
82
85
  # )
83
86
 
84
87
  def __repr__(self):
85
- return (
86
- f"{self.__class__.__name__}("
87
- f"objective={self.objective.name!r}, "
88
- f"input_types={self.input_types!r}, "
89
- f"output_types={self.output_types!r}"
90
- f")"
91
- )
88
+ return f"{self.__class__.__name__}({self.objective.name!r})"
89
+
90
+ @property
91
+ def info(self):
92
+ """Show attributes of the task schema."""
93
+ tab = Table(show_header=False)
94
+ tab.add_column()
95
+ tab.add_column()
96
+ tab.add_row("Objective", self.objective.name)
97
+ tab.add_row("Actions", str(self.actions))
98
+
99
+ tab_ins = Table(show_header=False, box=None)
100
+ tab_ins.add_column()
101
+ for inp in self.inputs:
102
+ def_str = ""
103
+ if not inp.multiple:
104
+ if inp.default_value is not NullDefault.NULL:
105
+ def_str = f" [i]default[/i]={inp.default_value}"
106
+ tab_ins.add_row(inp.parameter.typ + def_str)
107
+
108
+ tab_outs = Table(show_header=False, box=None)
109
+ tab_outs.add_column()
110
+ for out in self.outputs:
111
+ tab_outs.add_row(out.parameter.typ)
112
+
113
+ tab.add_row("Inputs", tab_ins)
114
+ tab.add_row("Outputs", tab_outs)
115
+ rich_print(tab)
92
116
 
93
117
  def __eq__(self, other):
94
118
  if type(other) is not self.__class__:
@@ -1,7 +1,7 @@
1
1
 
2
2
  [tool.poetry]
3
3
  name = "hpcflow-new2"
4
- version = "0.2.0a71"
4
+ version = "0.2.0a73"
5
5
 
6
6
  description = "Computational workflow management"
7
7
  authors = ["aplowman <adam.plowman@manchester.ac.uk>"]
@@ -65,7 +65,7 @@ hook-dirs = "hpcflow.__pyinstaller:get_hook_dirs"
65
65
 
66
66
  [tool.commitizen]
67
67
  name = "cz_conventional_commits"
68
- version = "0.2.0a71"
68
+ version = "0.2.0a73"
69
69
  tag_format = "v$version"
70
70
  version_files = [
71
71
  "pyproject.toml:version",
@@ -1 +0,0 @@
1
- __version__ = "0.2.0a71"