dv-flow-mgr 0.0.2.14163613545a1__py3-none-any.whl → 0.0.2.14180123344a1__py3-none-any.whl

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.
dv_flow/mgr/__main__.py CHANGED
@@ -55,6 +55,9 @@ def get_parser():
55
55
  run_parser.add_argument("-j",
56
56
  help="Specifies degree of parallelism. Uses all cores by default",
57
57
  type=int, default=-1)
58
+ run_parser.add_argument("-c", "--clean",
59
+ action="store_true",
60
+ help="Cleans the rundir before running")
58
61
  run_parser.set_defaults(func=CmdRun())
59
62
 
60
63
  show_parser = subparsers.add_parser('show',
@@ -77,6 +77,12 @@ class CmdRun(object):
77
77
  # TODO: allow user to specify run root -- maybe relative to some fixed directory?
78
78
  rundir = os.path.join(pkg._basedir, "rundir")
79
79
 
80
+ if args.clean:
81
+ print("Note: Cleaning rundir %s" % rundir)
82
+ if os.path.exists(rundir):
83
+ os.rmdir(rundir)
84
+ os.makedirs(rundir)
85
+
80
86
  builder = TaskGraphBuilder(root_pkg=pkg, rundir=rundir)
81
87
  runner = TaskSetRunner(rundir)
82
88
 
dv_flow/mgr/task_def.py CHANGED
@@ -49,13 +49,31 @@ class PassthroughE(enum.Enum):
49
49
  All = "all"
50
50
  Unused = "unused"
51
51
 
52
-
53
52
  class StrategyDef(BaseModel):
54
53
  chain: Union[bool, None] = dc.Field(default=None)
55
54
  matrix : Union[Dict[str,List[Any]],None] = dc.Field(
56
55
  default=None,
57
56
  description="Matrix of parameter values to explore")
58
57
 
58
+ class TaskExecDef(BaseModel):
59
+ pytask : Union[str, None] = dc.Field(
60
+ default=None,
61
+ description="Python method to execute to implement this task")
62
+ pydep : Union[str, None] = dc.Field(
63
+ default=None,
64
+ description="Python method to check up-to-date status for this task")
65
+
66
+ class TasksBuilder(BaseModel):
67
+ # TODO: control how much data this task is provided?
68
+ pydef : Union[str, None] = dc.Field(
69
+ default=None,
70
+ description="Python method to build the subgraph")
71
+
72
+ class Tasks(BaseModel):
73
+ tasks: Union[List['TaskDef'], TasksBuilder] = dc.Field(
74
+ default_factory=list,
75
+ description="Sub-tasks")
76
+
59
77
  class TaskDef(BaseModel):
60
78
  """Holds definition information (ie the YAML view) for a task"""
61
79
  name : str = dc.Field(
@@ -73,7 +91,7 @@ class TaskDef(BaseModel):
73
91
  description="Python method to execute to implement this task")
74
92
  strategy : StrategyDef = dc.Field(
75
93
  default=None)
76
- tasks: List['TaskDef'] = dc.Field(
94
+ tasks: Union[List['TaskDef'], TasksBuilder] = dc.Field(
77
95
  default_factory=list,
78
96
  description="Sub-tasks")
79
97
  desc : str = dc.Field(
@@ -73,13 +73,23 @@ class TaskNodeCtorCompound(TaskNodeCtor):
73
73
  # Need to get the parent name
74
74
  needs = []
75
75
  for n in t.needs:
76
- need_name = "%s.%s" % (builder.package().name, n)
77
- task = builder.findTask(n)
78
- if task is None:
76
+ # 'n' is the dependency as specified by the user
77
+ # Need to perform a search
78
+ # - Look locally inside the compound task (pkg.compound.name)
79
+ # - Look for the fully-qualified task name
80
+ # - Look for the task name in the package
81
+
82
+ names = []
83
+ for pref in (builder.get_name_prefix((), "", builder.package().name)):
84
+ need_name = n if pref == "" else ("%s.%s" % (pref, n))
85
+ names.append(need_name)
79
86
  task = builder.findTask(need_name)
80
87
 
88
+ if task is not None:
89
+ break
90
+
81
91
  if task is None:
82
- raise Exception("Failed to find task %s (%s)" % (n, need_name))
92
+ raise Exception("Failed to find task %s (searched %s)" % (n, str(names)))
83
93
  self._log.debug("Add %s as dependency of %s" % (
84
94
  task.name, t.name
85
95
  ))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dv-flow-mgr
3
- Version: 0.0.2.14163613545a1
3
+ Version: 0.0.2.14180123344a1
4
4
  Summary: DV Flow Manager is a build system for silicon design
5
5
  Author-email: Matthew Ballance <matt.ballance@gmail.com>
6
6
  License: Apache License
@@ -1,5 +1,5 @@
1
1
  dv_flow/mgr/__init__.py,sha256=hzwGMkN3t6RkfZSCHi_6mvEkCzEOd91EZBv9F2ZCa-8,1193
2
- dv_flow/mgr/__main__.py,sha256=ExLZCOjDZtxqPk_SSF5SZKkbYUjMmVca4sT2OeePv10,3437
2
+ dv_flow/mgr/__main__.py,sha256=4_MJIH-FxIFXrk5pvic9bBereeZxQsrxnESA4SZ5q9U,3600
3
3
  dv_flow/mgr/eval_jq.py,sha256=bRsHtaN51qIOiZK1VJV52W0-vj5VH0nQ7XIFebZi5kI,1129
4
4
  dv_flow/mgr/expr_eval.py,sha256=N_8hRIgzJK9JVqhRt8F9rc4S7AAdKHMMltafqk6KhJs,3113
5
5
  dv_flow/mgr/expr_parser.py,sha256=P6u2FdSXeZbdamC3zpEnYKLcK2RULQJfSoev2Ol75fE,6543
@@ -16,14 +16,14 @@ dv_flow/mgr/param_ref_eval.py,sha256=5yH37oIX6f2qmk7GfRgNT5qZx0jm3CJFgB9lLDZZ1yQ
16
16
  dv_flow/mgr/parsetab.py,sha256=I-p3nC60t9jiNtPhKyl_sE92SiP96zJLnNdydcLy33g,3780
17
17
  dv_flow/mgr/pkg_rgy.py,sha256=d1nIjRm3ymMNJT-yiMDxCS6bFisTPvLMqh5VrfsHVKM,5404
18
18
  dv_flow/mgr/task_data.py,sha256=lN7Iq8YTitEMGG4rZqYQi6Ri2HuPgBQ5oGQbW-63T8c,12436
19
- dv_flow/mgr/task_def.py,sha256=TcTTIwre2aQg4OdCicqCOIDTkOeV3qIdITpXBP4yTTU,3872
19
+ dv_flow/mgr/task_def.py,sha256=ClCPFLlpT70Nxcr4xxBJBtdRxwFHq5YUtEDNVCiqFtE,4559
20
20
  dv_flow/mgr/task_graph_builder.py,sha256=ST8EseeO8JZUTUSU44txxaUVKlXEiTOPbvB_UVrlraU,15463
21
21
  dv_flow/mgr/task_graph_dot_writer.py,sha256=GxqiYwQJbFgUQdnPCS9vpIYmYFbSXwnXCSbGmjbxC3M,2418
22
22
  dv_flow/mgr/task_listener_log.py,sha256=hrJEjSRXXoovDTcD1Cmhi3Spzw7uEJ-WP6tv6JUaa6s,4060
23
23
  dv_flow/mgr/task_node.py,sha256=JXq2QimCZKxfhhkdhM-HKk4JbxpIlpW65xUJ0hVlQc0,4981
24
24
  dv_flow/mgr/task_node_compound.py,sha256=mNu4nf9hVqu2698ue5fpE3FeAOkvJH0Ke2W9V0G3-As,2975
25
25
  dv_flow/mgr/task_node_ctor.py,sha256=COFGvm5PR2B92H3uW1yhDIUCmppo9U4IfOcv_Jrsreo,3952
26
- dv_flow/mgr/task_node_ctor_compound.py,sha256=n2Ad1jtX147cb99HTlLrx_21XUn109bJ18zDXr0pn2Q,4259
26
+ dv_flow/mgr/task_node_ctor_compound.py,sha256=HI-KDmBoRlvwPQpl3WSZit8jqhJ7Zbv8NRvh45Kp6PA,4736
27
27
  dv_flow/mgr/task_node_ctor_compound_proxy.py,sha256=D8x54nD8Pd-2-_mr1syhqVeSFfIVf100ldi3bdzmSfI,2073
28
28
  dv_flow/mgr/task_node_ctor_def_base.py,sha256=_8QQHKDkONio_ve0Z409yxC0AMO8ocNBPDjRiNED1FI,1503
29
29
  dv_flow/mgr/task_node_ctor_proxy.py,sha256=ViOFJ64JM4-CGFZNl89BghFuKSQ66kZVqSj4v2PA6VA,1906
@@ -37,7 +37,7 @@ dv_flow/mgr/task_runner.py,sha256=-919VntXAe2XSuFW2dFpgvUre-NkILBnDBbAKBZYn5w,95
37
37
  dv_flow/mgr/type.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  dv_flow/mgr/type_def.py,sha256=NDeyplKrPnWwEv4yHkhXEMK9d9j39b5MOeLB-1Mchqo,1095
39
39
  dv_flow/mgr/cmds/cmd_graph.py,sha256=Ykw__EdwamDBZZKxQZVbtMtFl7koq5dJMShTBXSM2pk,2672
40
- dv_flow/mgr/cmds/cmd_run.py,sha256=f0zt2OxGZC50aaDR7wGDH8YBk3rMQoBl8YeRHWcJUD0,3211
40
+ dv_flow/mgr/cmds/cmd_run.py,sha256=ADFBetIVk_CwMQXO3oSNdtUgrxx8FyQj9LYQ2cA8nuo,3394
41
41
  dv_flow/mgr/cmds/cmd_show.py,sha256=CZlgwB3Hcu-6HS-diqnWjCcPPpO-kjIIXU3DgWXvsf4,3773
42
42
  dv_flow/mgr/share/flow.json,sha256=lNmZex9NXkYbyb2aZseQfUOkV9CMyfH0iLODEI7EPBw,5096
43
43
  dv_flow/mgr/std/create_file.py,sha256=TAUhpXlTmUDUYw4Dw0cI9FPuYI84yCVkoadnWZxi_8U,2888
@@ -51,9 +51,9 @@ dv_flow/mgr/util/__main__.py,sha256=F0LXpCDpYTPalSo0dc1h_qZkip5v1AZYYh-vcYbh5s0,
51
51
  dv_flow/mgr/util/util.py,sha256=yg9oTPRiO87mkCSOQpOtlG9vyKPQzY3qp4OJkEMbWyY,1443
52
52
  dv_flow/mgr/util/cmds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
53
  dv_flow/mgr/util/cmds/cmd_schema.py,sha256=lrEI-Jwb8j4I4yYOn9hq7_7NYbK8leVxLesrHyEWm-E,1879
54
- dv_flow_mgr-0.0.2.14163613545a1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
55
- dv_flow_mgr-0.0.2.14163613545a1.dist-info/METADATA,sha256=ZxnOXBZzPttzd2GvJB1091pyZ0wDrBxpbtWd6HnazYw,13336
56
- dv_flow_mgr-0.0.2.14163613545a1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
57
- dv_flow_mgr-0.0.2.14163613545a1.dist-info/entry_points.txt,sha256=1roy8wAFM48LabOvr6jiOw0MUs-qE8X3Vf8YykPazxk,50
58
- dv_flow_mgr-0.0.2.14163613545a1.dist-info/top_level.txt,sha256=amfVTkggzYPtWwLqNmRukfz1Buu0pGS2SrYBBLhXm04,8
59
- dv_flow_mgr-0.0.2.14163613545a1.dist-info/RECORD,,
54
+ dv_flow_mgr-0.0.2.14180123344a1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
55
+ dv_flow_mgr-0.0.2.14180123344a1.dist-info/METADATA,sha256=uCchOggxk9U54veU7UCjQOyn65EEfR22ABTcYJd8P-4,13336
56
+ dv_flow_mgr-0.0.2.14180123344a1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
57
+ dv_flow_mgr-0.0.2.14180123344a1.dist-info/entry_points.txt,sha256=1roy8wAFM48LabOvr6jiOw0MUs-qE8X3Vf8YykPazxk,50
58
+ dv_flow_mgr-0.0.2.14180123344a1.dist-info/top_level.txt,sha256=amfVTkggzYPtWwLqNmRukfz1Buu0pGS2SrYBBLhXm04,8
59
+ dv_flow_mgr-0.0.2.14180123344a1.dist-info/RECORD,,