dv-flow-mgr 0.0.1.13954441689a1__tar.gz → 0.0.1.13959047687a1__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 (102) hide show
  1. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/.github/workflows/ci.yml +1 -1
  2. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/PKG-INFO +3 -2
  3. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/docs/conf.py +2 -1
  4. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/docs/index.rst +1 -0
  5. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/docs/intro.rst +6 -0
  6. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/docs/quickstart.rst +1 -1
  7. dv_flow_mgr-0.0.1.13959047687a1/docs/stdlib.rst +6 -0
  8. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/ivpm.yaml +4 -1
  9. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/pyproject.toml +1 -1
  10. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/__init__.py +0 -1
  11. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/cmds/cmd_run.py +0 -2
  12. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/package_def.py +18 -4
  13. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/param_def.py +1 -0
  14. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/std/exec.py +2 -2
  15. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/std/flow.dv +31 -1
  16. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/task.py +0 -1
  17. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/task_ctor.py +1 -1
  18. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/task_data.py +29 -1
  19. dv_flow_mgr-0.0.1.13959047687a1/src/dv_flow/mgr/task_def.py +102 -0
  20. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/task_listener_log.py +8 -1
  21. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/task_node.py +2 -2
  22. dv_flow_mgr-0.0.1.13959047687a1/src/dv_flow/mgr/task_node_compound.py +37 -0
  23. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/task_runner.py +8 -4
  24. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow_mgr.egg-info/PKG-INFO +3 -2
  25. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow_mgr.egg-info/SOURCES.txt +3 -0
  26. dv_flow_mgr-0.0.1.13959047687a1/tests/unit/test_compound_task.py +44 -0
  27. dv_flow_mgr-0.0.1.13954441689a1/src/dv_flow/mgr/task_def.py +0 -61
  28. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/.gitignore +0 -0
  29. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/.vscode/settings.json +0 -0
  30. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/LICENSE +0 -0
  31. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/README.md +0 -0
  32. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/docs/KeyArchitecture.md +0 -0
  33. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/docs/Makefile +0 -0
  34. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/docs/Notes.md +0 -0
  35. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/docs/Roadmap.md +0 -0
  36. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/docs/RundirLayout.md +0 -0
  37. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/docs/Stages.md +0 -0
  38. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/docs/Steps.md +0 -0
  39. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/docs/Tasks.md +0 -0
  40. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/docs/TypesAndDefs.md +0 -0
  41. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/docs/Usecases.md +0 -0
  42. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/docs/reference.rst +0 -0
  43. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/fwperiph_dma.pss +0 -0
  44. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/setup.cfg +0 -0
  45. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/__main__.py +0 -0
  46. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/eval_jq.py +0 -0
  47. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/expr_eval.py +0 -0
  48. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/expr_parser.py +0 -0
  49. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/fileset.py +0 -0
  50. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/fragment_def.py +0 -0
  51. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/out +0 -0
  52. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/package.py +0 -0
  53. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/package_import_spec.py +0 -0
  54. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/param.py +0 -0
  55. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/param_ref_eval.py +0 -0
  56. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/parsetab.py +0 -0
  57. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/pkg_rgy.py +0 -0
  58. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/share/flow.json +0 -0
  59. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/std/create_file.py +0 -0
  60. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/std/fileset.py +0 -0
  61. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/std/message.py +0 -0
  62. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/std/task_null.py +0 -0
  63. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/task_graph_builder.py +0 -0
  64. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/task_output.py +0 -0
  65. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/task_params_ctor.py +0 -0
  66. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/type.py +0 -0
  67. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/type_def.py +0 -0
  68. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow/mgr/util.py +0 -0
  69. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow_mgr.egg-info/dependency_links.txt +0 -0
  70. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow_mgr.egg-info/entry_points.txt +0 -0
  71. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow_mgr.egg-info/requires.txt +0 -0
  72. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/src/dv_flow_mgr.egg-info/top_level.txt +0 -0
  73. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/examples/example1/example1.flow +0 -0
  74. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/system/test_depends.py +0 -0
  75. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/system/test_pkg_discovery.py +0 -0
  76. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/system/test_stdlib.py +0 -0
  77. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/__init__.py +0 -0
  78. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/data/fileset/test1/files1/file1_1.sv +0 -0
  79. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/data/fileset/test1/files1/file1_2.sv +0 -0
  80. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/data/fileset/test1/files2/file2_1.sv +0 -0
  81. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/data/fileset/test1/files2/file2_2.sv +0 -0
  82. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/data/fileset/test1/flow.dv +0 -0
  83. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/data/fileset/test1 copy/files1/file1_1.sv +0 -0
  84. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/data/fileset/test1 copy/files1/file1_2.sv +0 -0
  85. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/data/fileset/test1 copy/files2/file2_1.sv +0 -0
  86. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/data/fileset/test1 copy/files2/file2_2.sv +0 -0
  87. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/data/fileset/test1 copy/test1.dfs +0 -0
  88. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/data/proj1/proj1.dfs +0 -0
  89. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/data/proj2/proj2.dfs +0 -0
  90. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/data/proj3/proj3.dfs +0 -0
  91. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/test_data_merge.py +0 -0
  92. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/test_expr_eval.py +0 -0
  93. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/test_expr_parser.py +0 -0
  94. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/test_fileset.py +0 -0
  95. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/test_imports.py +0 -0
  96. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/test_markers.py +0 -0
  97. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/test_parse.py +0 -0
  98. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/test_pyclass.py +0 -0
  99. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/test_pytask_smoke.py +0 -0
  100. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/test_smoke copy.sav +0 -0
  101. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/test_smoke.py +0 -0
  102. {dv_flow_mgr-0.0.1.13954441689a1 → dv_flow_mgr-0.0.1.13959047687a1}/tests/unit/test_stdlib.py +0 -0
@@ -28,7 +28,7 @@ jobs:
28
28
  - name: Build Docs
29
29
  run: |
30
30
  cd docs
31
- make html
31
+ PYTHONPATH=$(pwd)/../src make html
32
32
  cp ../src/dv_flow/mgr/share/flow.json _build/html/
33
33
  touch _build/html/.nojekyll
34
34
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: dv-flow-mgr
3
- Version: 0.0.1.13954441689a1
3
+ Version: 0.0.1.13959047687a1
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
@@ -212,3 +212,4 @@ Requires-Dist: pyyaml
212
212
  Requires-Dist: rich
213
213
  Requires-Dist: toposort
214
214
  Requires-Dist: svdep
215
+ Dynamic: license-file
@@ -15,7 +15,8 @@ author = 'Matthew Ballance'
15
15
 
16
16
  extensions = [
17
17
  'sphinx-jsonschema',
18
- 'sphinxcontrib.mermaid'
18
+ 'sphinxcontrib.mermaid',
19
+ 'sphinxcontrib-dv-flow'
19
20
  ]
20
21
 
21
22
  templates_path = ['_templates']
@@ -29,4 +29,5 @@ enables concurrent execution and efficient avoidance of redundant work.
29
29
 
30
30
  quickstart
31
31
  intro
32
+ stdlib
32
33
  reference
@@ -3,6 +3,7 @@ Introduction
3
3
  ############
4
4
 
5
5
 
6
+ .. dv-flow.task:: std.Fileset
6
7
 
7
8
 
8
9
  Many software languages have co-evolved with a build system. For example, C/C++
@@ -10,6 +11,10 @@ has Make and CMake. Java has ANT, Maven, and Gradle. All of these build systems
10
11
  provide features that cater to specific ways that a given language is processed,
11
12
  and provide built-in notions to make setting up simple cases as easy as possible.
12
13
 
14
+
15
+ .. dv-flow.task:: std.Fileset
16
+
17
+
13
18
  One simple example is Make and a single-file C program. Take the code below:
14
19
 
15
20
  .. code-block:: C
@@ -67,6 +72,7 @@ Key Concepts
67
72
  ============
68
73
 
69
74
  DV Flow Manager has three key concepts:
75
+
70
76
  * **Package** - A packages is parameterizd namespace that contain tasks.
71
77
  * **Task** - A task is a processing step in a flow. Tasks represent a data-processing step, which
72
78
  might be as simple as building a list of files, or might be a complex as creating a hardened macro
@@ -113,7 +113,7 @@ This will allow us to easily swap in a different simulator without changing
113
113
  anything else within our package definition.
114
114
 
115
115
  .. code-block:: yaml
116
- :highlight: 8,12
116
+ :emphasize-lines: 8,12
117
117
 
118
118
  package:
119
119
  name: my_design
@@ -0,0 +1,6 @@
1
+ ################
2
+ Standard Library
3
+ ################
4
+
5
+ .. dv-flow.task:: std.Fileset
6
+
@@ -22,9 +22,12 @@ package:
22
22
  - name: Sphinx
23
23
  src: pypi
24
24
  - name: sphinx-jsonschema
25
- src: pypi
25
+ # src: pypi
26
+ url: https://github.com/lnoor/sphinx-jsonschema.git
26
27
  - name: sphinxcontrib-mermaid
27
28
  src: pypi
29
+ - name: sphinxcontrib-dv-flow
30
+ url: https://github.com/dv-flow/sphinxcontrib-dv-flow.git
28
31
  - name: jq
29
32
  src: pypi
30
33
  - name: ply
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "dv-flow-mgr"
8
- version = "0.0.1.13954441689a1"
8
+ version = "0.0.1.13959047687a1"
9
9
  dependencies = [
10
10
  'jq',
11
11
  'pydantic',
@@ -21,7 +21,6 @@
21
21
  #****************************************************************************
22
22
  from .package_def import *
23
23
  from .pkg_rgy import PkgRgy
24
- from .task_graph_runner import *
25
24
  from .task import *
26
25
  from .task_data import *
27
26
  from .task_graph_builder import TaskGraphBuilder
@@ -23,10 +23,8 @@ import asyncio
23
23
  import os
24
24
  import logging
25
25
  from typing import ClassVar
26
- from ..task_graph_runner import TaskGraphRunner
27
26
  from ..util import loadProjPkgDef
28
27
  from ..task_graph_builder import TaskGraphBuilder
29
- from ..task_graph_runner_local import TaskGraphRunnerLocal
30
28
  from ..task_runner import TaskSetRunner
31
29
  from ..task_listener_log import TaskListenerLog
32
30
  from ..pkg_rgy import PkgRgy
@@ -33,6 +33,7 @@ from typing import Any, Dict, List, Callable, Tuple, ClassVar, Union
33
33
  from .fragment_def import FragmentDef
34
34
  from .package import Package
35
35
  from .package_import_spec import PackageImportSpec, PackageSpec
36
+ from .param_def import ParamDef
36
37
  from .task_node import TaskNodeCtor, TaskNodeCtorProxy, TaskNodeCtorTask
37
38
  from .task_ctor import TaskCtor
38
39
  from .task_def import TaskDef, TaskSpec
@@ -41,13 +42,26 @@ from .type_def import TypeDef
41
42
 
42
43
 
43
44
  class PackageDef(BaseModel):
44
- name : str
45
+ name : str = dc.Field(
46
+ description="Name of the package")
45
47
  params : Dict[str,Any] = dc.Field(default_factory=dict)
46
48
  type : List[PackageSpec] = dc.Field(default_factory=list)
47
- tasks : List[TaskDef] = dc.Field(default_factory=list)
48
- imports : List[Union[str,PackageImportSpec]] = dc.Field(default_factory=list)
49
- fragments: List[str] = dc.Field(default_factory=list)
49
+ tasks : List[TaskDef] = dc.Field(
50
+ default_factory=list,
51
+ description="List of tasks defined in the package")
52
+ imports : List[Union[str,PackageImportSpec]] = dc.Field(
53
+ default_factory=list,
54
+ description="List of packages to import")
55
+ fragments: List[str] = dc.Field(
56
+ default_factory=list,
57
+ description="List of fragments to include")
50
58
  types : List[TypeDef] = dc.Field(default_factory=list)
59
+ uses : str = dc.Field(
60
+ default=None,
61
+ description="Name of the package to use as a base")
62
+ params : List[ParamDef] = dc.Field(
63
+ default_factory=list, alias="with",
64
+ description="List of package parameters to set")
51
65
 
52
66
  fragment_l : List['FragmentDef'] = dc.Field(default_factory=list, exclude=True)
53
67
  subpkg_m : Dict[str,'PackageDef'] = dc.Field(default_factory=dict, exclude=True)
@@ -36,6 +36,7 @@ class ComplexType(BaseModel):
36
36
  class ParamDef(BaseModel):
37
37
  doc : str = None
38
38
  type : Union[str, 'ComplexType'] = None
39
+ derived : bool = Field(default=False)
39
40
  value : Union[Any, None] = None
40
41
  append : Union[Any, None] = None
41
42
  prepend : Union[Any, None] = None
@@ -50,7 +50,7 @@ async def Exec(runner, input) -> TaskDataResult:
50
50
 
51
51
  result = await proc.wait()
52
52
 
53
- status = result.returncode
53
+ status = proc.returncode
54
54
 
55
55
  if status != 0:
56
56
  markers.append(TaskMarker(
@@ -97,7 +97,7 @@ async def Exec(runner, input) -> TaskDataResult:
97
97
  if input.params.when == "changed":
98
98
  changed = input.changed
99
99
 
100
- if input.params.timestamp is not None and input.params.timestamp_file != "":
100
+ if input.params.timestamp is not None and input.params.timestamp != "":
101
101
  # Check the timestamp file
102
102
  try:
103
103
  with open(input.params.timestamp_file, "r") as f:
@@ -1,5 +1,27 @@
1
1
 
2
- # yaml-language-server: $schema=https://dv-flow.github.io/dv-flow.schema.json
2
+ # yaml-language-server: $schema=https://dv-flow.github.io/flow.dv.schema.json
3
+
4
+ #****************************************************************************
5
+ #* flow.dv
6
+ #*
7
+ #* Copyright 2023-2025 Matthew Ballance and Contributors
8
+ #*
9
+ #* Licensed under the Apache License, Version 2.0 (the "License"); you may
10
+ #* not use this file except in compliance with the License.
11
+ #* You may obtain a copy of the License at:
12
+ #*
13
+ #* http://www.apache.org/licenses/LICENSE-2.0
14
+ #*
15
+ #* Unless required by applicable law or agreed to in writing, software
16
+ #* distributed under the License is distributed on an "AS IS" BASIS,
17
+ #* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ #* See the License for the specific language governing permissions and
19
+ #* limitations under the License.
20
+ #*
21
+ #* Created on:
22
+ #* Author:
23
+ #*
24
+ #****************************************************************************
3
25
 
4
26
  package:
5
27
  name: std
@@ -12,18 +34,26 @@ package:
12
34
  type: str
13
35
  value: ""
14
36
  - name: FileSet
37
+ doc: |
38
+ Creates a fileset from a list of files or glob patterns
15
39
  pytask: dv_flow.mgr.std.fileset.FileSet
16
40
  passthrough: true
17
41
  with:
18
42
  base:
43
+ doc: |
44
+ Specifies the base directory for the fileset.
19
45
  type: str
20
46
  value: ""
21
47
  type:
48
+ doc: |
49
+ Specifies the file type (eg verilogSource) for the fileset.
22
50
  type: str
23
51
  value: ""
24
52
  incdirs:
25
53
  type: list
26
54
  include:
55
+ doc: |
56
+ Specifies a list of files or a glob pattern for the files to include
27
57
  type: str
28
58
  value: ""
29
59
  exclude:
@@ -26,7 +26,6 @@ import logging
26
26
  from pydantic import BaseModel
27
27
  from typing import Any, Callable, ClassVar, Dict, List, Tuple
28
28
  from .task_data import TaskData, TaskDataInput, TaskDataOutput, TaskDataResult
29
- from .task_memento import TaskMemento
30
29
  from .task_ctor import TaskParamsCtor
31
30
  from .task_params_ctor import TaskParamsCtor
32
31
  from .task_runner import TaskRunner
@@ -38,7 +38,7 @@ class TaskCtor(object):
38
38
 
39
39
  _log : ClassVar = logging.getLogger("TaskCtor")
40
40
 
41
- def mkTask(self, name : str, srcdir=None) -> 'Task':
41
+ def mkTask(self, name : str, srcdir=None) -> 'TaskNode':
42
42
  """Creates a task object"""
43
43
  if srcdir is None:
44
44
  srcdir = self.srcdir
@@ -27,14 +27,25 @@ from typing import Any, ClassVar, Dict, Set, List, Tuple
27
27
  from .fileset import FileSet
28
28
  from toposort import toposort
29
29
 
30
+ class SeverityE(enum.Enum):
31
+ Info = "info"
32
+ Warning = "warning"
33
+ Error = "error"
34
+
30
35
  class TaskMarkerLoc(BaseModel):
36
+ """
37
+ Captures the source location of a marker
38
+ """
31
39
  path : str
32
40
  line : int = dc.Field(default=-1)
33
41
  pos : int = dc.Field(default=-1)
34
42
 
35
43
  class TaskMarker(BaseModel):
44
+ """
45
+ Captures marker data produced by a task.
46
+ """
36
47
  msg : str
37
- severity : str
48
+ severity : SeverityE
38
49
  loc : TaskMarkerLoc = dc.Field(default=None)
39
50
 
40
51
  class TaskParameterSet(BaseModel):
@@ -43,6 +54,15 @@ class TaskParameterSet(BaseModel):
43
54
  seq : int = -1 # Order in which the param-set must appear
44
55
 
45
56
  class TaskDataInput(BaseModel):
57
+ """
58
+ Input data to a task
59
+ - name - name of the task
60
+ - changed - indicates whether any of this task's dependencies have changed
61
+ - rundir - directory in which the task is to be run
62
+ - params - parameters to the task
63
+ - inputs - list of parameter sets 'consumed' by this task
64
+ - memento - memento data previously returned by this task. None if no memento is available
65
+ """
46
66
  name : str
47
67
  changed : bool
48
68
  srcdir : str
@@ -52,6 +72,14 @@ class TaskDataInput(BaseModel):
52
72
  memento : Any
53
73
 
54
74
  class TaskDataResult(BaseModel):
75
+ """
76
+ Result data from a task
77
+ - changed - indicates whether the task modified its result data
78
+ - output - list of output parameter sets
79
+ - memento - memento data to be passed to the next invocation of the task
80
+ - markers - list of markers produced by the task
81
+ - status - status code (0=success, non-zero=failure)
82
+ """
55
83
  changed : bool = dc.Field(default=True)
56
84
  output : List[Any] = dc.Field(default_factory=list)
57
85
  memento : Any = dc.Field(default=None)
@@ -0,0 +1,102 @@
1
+ #****************************************************************************
2
+ #* task_def.py
3
+ #*
4
+ #* Copyright 2023-2025 Matthew Ballance and Contributors
5
+ #*
6
+ #* Licensed under the Apache License, Version 2.0 (the "License"); you may
7
+ #* not use this file except in compliance with the License.
8
+ #* You may obtain a copy of the License at:
9
+ #*
10
+ #* http://www.apache.org/licenses/LICENSE-2.0
11
+ #*
12
+ #* Unless required by applicable law or agreed to in writing, software
13
+ #* distributed under the License is distributed on an "AS IS" BASIS,
14
+ #* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ #* See the License for the specific language governing permissions and
16
+ #* limitations under the License.
17
+ #*
18
+ #* Created on:
19
+ #* Author:
20
+ #*
21
+ #****************************************************************************
22
+ import pydantic.dataclasses as dc
23
+ import enum
24
+ from pydantic import BaseModel
25
+ from typing import Any, Dict, List, Union, Tuple
26
+ from .param_def import ParamDef
27
+ from .task import Task
28
+ from .task_output import TaskOutput
29
+
30
+ @dc.dataclass
31
+ class TaskSpec(object):
32
+ name : str
33
+
34
+ @dc.dataclass
35
+ class NeedSpec(object):
36
+ name : str
37
+ block : bool = False
38
+
39
+ class RundirE(enum.Enum):
40
+ Unique = "unique"
41
+ Inherit = "inherit"
42
+
43
+ class StrategyDef(BaseModel):
44
+ matrix : Dict[str,List[Any]] = dc.Field(
45
+ default_factory=dict,
46
+ description="Matrix of parameter values to explore")
47
+
48
+ class TaskDef(BaseModel):
49
+ """Holds definition information (ie the YAML view) for a task"""
50
+ name : str = dc.Field(
51
+ title="Task Name",
52
+ description="The name of the task")
53
+ fullname : str = dc.Field(default=None)
54
+ # type : Union[str,TaskSpec] = dc.Field(default_factory=list)
55
+ uses : str = dc.Field(
56
+ default=None,
57
+ title="Base type",
58
+ description="Task from which this task is derived")
59
+ pytask : str = dc.Field(
60
+ default=None,
61
+ title="Python method name",
62
+ description="Python method to execute to implement this task")
63
+ strategy : StrategyDef = dc.Field(
64
+ default=None)
65
+ tasks: List['TaskDef'] = dc.Field(
66
+ default_factory=list,
67
+ description="Sub-tasks")
68
+ desc : str = dc.Field(
69
+ default="",
70
+ title="Task description",
71
+ description="Short description of the task's purpose")
72
+ doc : str = dc.Field(
73
+ default="",
74
+ title="Task documentation",
75
+ description="Full documentation of the task")
76
+ # needs : List[Union[str,NeedSpec,TaskSpec]] = dc.Field(
77
+ needs : List[Union[str]] = dc.Field(
78
+ default_factory=list,
79
+ description="List of tasks that this task depends on")
80
+ params: Dict[str,Union[str,list,ParamDef]] = dc.Field(
81
+ default_factory=dict,
82
+ alias="with",
83
+ description="Parameters for the task")
84
+ rundir : RundirE = dc.Field(
85
+ default=RundirE.Unique,
86
+ description="Specifies handling of this tasks's run directory")
87
+ passthrough: bool = dc.Field(
88
+ default=False,
89
+ description="Specifies whether this task should pass its inputs to its output")
90
+ consumes : List[Any] = dc.Field(
91
+ default_factory=list,
92
+ description="Specifies matching patterns for parameter sets that this task consumes")
93
+
94
+ # out: List[TaskOutput] = dc.Field(default_factory=list)
95
+
96
+ def copy(self) -> 'TaskDef':
97
+ ret = TaskDef(
98
+ name=self.name,
99
+ type=self.type,
100
+ depends=self.depends.copy())
101
+ return ret
102
+
@@ -56,8 +56,15 @@ class TaskListenerLog(object):
56
56
  "error": "[red]E[/red]",
57
57
  }
58
58
  for m in task.result.markers:
59
+ severity_s = str(m.severity)
60
+
61
+ if severity_s in sev_pref_m.keys():
62
+ sev_pref = sev_pref_m[severity_s]
63
+ else:
64
+ sev_pref = ""
65
+
59
66
  msg = " %s %s: %s" % (
60
- sev_pref_m[m.severity],
67
+ sev_pref,
61
68
  task.name,
62
69
  m.msg)
63
70
 
@@ -128,8 +128,8 @@ class TaskNode(object):
128
128
 
129
129
  # Set variables from the inputs
130
130
  for need in self.needs:
131
- for name,value in {"rundir" : need.rundir}.items():
132
- eval.setVar("%s.%s" % (need.name, name), value)
131
+ for name,value in {"rundir" : need[0].rundir}.items():
132
+ eval.setVar("%s.%s" % (need[0].name, name), value)
133
133
 
134
134
  # Default inputs is the list of parameter sets that match 'consumes'
135
135
  inputs = []
@@ -0,0 +1,37 @@
1
+ #****************************************************************************
2
+ #* task_node_compound.py
3
+ #*
4
+ #* Copyright 2023-2025 Matthew Ballance and Contributors
5
+ #*
6
+ #* Licensed under the Apache License, Version 2.0 (the "License"); you may
7
+ #* not use this file except in compliance with the License.
8
+ #* You may obtain a copy of the License at:
9
+ #*
10
+ #* http://www.apache.org/licenses/LICENSE-2.0
11
+ #*
12
+ #* Unless required by applicable law or agreed to in writing, software
13
+ #* distributed under the License is distributed on an "AS IS" BASIS,
14
+ #* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ #* See the License for the specific language governing permissions and
16
+ #* limitations under the License.
17
+ #*
18
+ #* Created on:
19
+ #* Author:
20
+ #*
21
+ #****************************************************************************
22
+ import dataclasses as dc
23
+ from .task_node import TaskNode
24
+ from .task_data import TaskDataResult, TaskDataInput, TaskDataOutput
25
+ from .task_runner import TaskRunner
26
+ from typing import Any, List
27
+
28
+ @dc.dataclass
29
+ class TaskNodeCompound(TaskNode):
30
+ tasks : List[TaskNode] = dc.field(default_factory=list)
31
+
32
+ async def do_run(self,
33
+ runner : TaskRunner,
34
+ rundir,
35
+ memento : Any=None) -> TaskDataResult:
36
+ pass
37
+ pass
@@ -29,7 +29,7 @@ from datetime import datetime
29
29
  from toposort import toposort
30
30
  from typing import Any, Callable, ClassVar, List, Tuple, Union
31
31
  from .task_data import TaskDataInput, TaskDataOutput, TaskDataResult
32
- from .task_node import TaskNode
32
+ from .task_node import TaskNode, RundirE
33
33
 
34
34
  @dc.dataclass
35
35
  class TaskRunner(object):
@@ -140,10 +140,14 @@ class TaskSetRunner(TaskRunner):
140
140
  memento = src_memento.get(t.name, None)
141
141
  dirname = t.name
142
142
  invalid_chars_pattern = r'[\/:*?"<>|#%&{}\$\\!\'`;=@+]'
143
- # Replace invalid characters with the replacement string.
144
- dirname = re.sub(invalid_chars_pattern, '_', dirname)
145
143
 
146
- rundir = os.path.join(self.rundir, dirname)
144
+ if t.rundir_t == RundirE.Unique:
145
+ # Replace invalid characters with the replacement string.
146
+ dirname = re.sub(invalid_chars_pattern, '_', dirname)
147
+
148
+ rundir = os.path.join(self.rundir, dirname)
149
+ else:
150
+ rundir = self.rundir
147
151
 
148
152
  if not os.path.isdir(rundir):
149
153
  os.makedirs(rundir, exist_ok=True)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: dv-flow-mgr
3
- Version: 0.0.1.13954441689a1
3
+ Version: 0.0.1.13959047687a1
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
@@ -212,3 +212,4 @@ Requires-Dist: pyyaml
212
212
  Requires-Dist: rich
213
213
  Requires-Dist: toposort
214
214
  Requires-Dist: svdep
215
+ Dynamic: license-file
@@ -21,6 +21,7 @@ docs/index.rst
21
21
  docs/intro.rst
22
22
  docs/quickstart.rst
23
23
  docs/reference.rst
24
+ docs/stdlib.rst
24
25
  src/dv_flow/mgr/__init__.py
25
26
  src/dv_flow/mgr/__main__.py
26
27
  src/dv_flow/mgr/eval_jq.py
@@ -44,6 +45,7 @@ src/dv_flow/mgr/task_def.py
44
45
  src/dv_flow/mgr/task_graph_builder.py
45
46
  src/dv_flow/mgr/task_listener_log.py
46
47
  src/dv_flow/mgr/task_node.py
48
+ src/dv_flow/mgr/task_node_compound.py
47
49
  src/dv_flow/mgr/task_output.py
48
50
  src/dv_flow/mgr/task_params_ctor.py
49
51
  src/dv_flow/mgr/task_runner.py
@@ -69,6 +71,7 @@ tests/system/test_depends.py
69
71
  tests/system/test_pkg_discovery.py
70
72
  tests/system/test_stdlib.py
71
73
  tests/unit/__init__.py
74
+ tests/unit/test_compound_task.py
72
75
  tests/unit/test_data_merge.py
73
76
  tests/unit/test_expr_eval.py
74
77
  tests/unit/test_expr_parser.py
@@ -0,0 +1,44 @@
1
+ import asyncio
2
+ import os
3
+ from dv_flow.mgr import TaskGraphBuilder, TaskRunner, PackageDef
4
+
5
+ def test_smoke(tmpdir):
6
+ flow_dv = """
7
+ package:
8
+ name: foo
9
+
10
+ tasks:
11
+ - name: entry
12
+ tasks:
13
+ - name: create_file
14
+ rundir: inherit
15
+ uses: std.CreateFile
16
+ with:
17
+ filename: hello.txt
18
+ content: |
19
+ Hello World
20
+ - name: glob_txt
21
+ rundir: inherit
22
+ uses: std.FileSet
23
+ needs: [create_file]
24
+ with:
25
+ base: ${{ rundir }}
26
+ include: "*.txt"
27
+ type: textFile
28
+ """
29
+
30
+ rundir = os.path.join(tmpdir)
31
+ with open(os.path.join(rundir, "flow.dv"), "w") as fp:
32
+ fp.write(flow_dv)
33
+
34
+ pkg_def = PackageDef.load(os.path.join(rundir, "flow.dv"))
35
+ builder = TaskGraphBuilder(
36
+ root_pkg=pkg_def,
37
+ rundir=os.path.join(rundir, "rundir"))
38
+ runner = TaskRunner(rundir=os.path.join(rundir, "rundir"))
39
+
40
+ task = builder.mkTaskNode("foo.entry")
41
+
42
+ output = asyncio.run(runner.run(task))
43
+
44
+ pass
@@ -1,61 +0,0 @@
1
- #****************************************************************************
2
- #* task_def.py
3
- #*
4
- #* Copyright 2023-2025 Matthew Ballance and Contributors
5
- #*
6
- #* Licensed under the Apache License, Version 2.0 (the "License"); you may
7
- #* not use this file except in compliance with the License.
8
- #* You may obtain a copy of the License at:
9
- #*
10
- #* http://www.apache.org/licenses/LICENSE-2.0
11
- #*
12
- #* Unless required by applicable law or agreed to in writing, software
13
- #* distributed under the License is distributed on an "AS IS" BASIS,
14
- #* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- #* See the License for the specific language governing permissions and
16
- #* limitations under the License.
17
- #*
18
- #* Created on:
19
- #* Author:
20
- #*
21
- #****************************************************************************
22
- import pydantic.dataclasses as dc
23
- from pydantic import BaseModel
24
- from typing import Any, Dict, List, Union, Tuple
25
- from .param_def import ParamDef
26
- from .task import Task
27
- from .task_output import TaskOutput
28
-
29
- @dc.dataclass
30
- class TaskSpec(object):
31
- name : str
32
-
33
- @dc.dataclass
34
- class NeedSpec(object):
35
- name : str
36
- block : bool = False
37
-
38
- class TaskDef(BaseModel):
39
- """Holds definition information (ie the YAML view) for a task"""
40
- name : str
41
- fullname : str = dc.Field(default=None)
42
- # type : Union[str,TaskSpec] = dc.Field(default_factory=list)
43
- uses : str = dc.Field(default=None)
44
- pytask : str = dc.Field(default=None)
45
- desc : str = dc.Field(default="")
46
- doc : str = dc.Field(default="")
47
- needs : List[Union[str,NeedSpec,TaskSpec]] = dc.Field(default_factory=list, alias="needs")
48
- params: Dict[str,Union[str,list,ParamDef]] = dc.Field(default_factory=dict, alias="with")
49
- passthrough: bool = dc.Field(default=False)
50
- consumes : List[Any] = dc.Field(default_factory=list)
51
- tasks: List['TaskDef'] = dc.Field(default_factory=list)
52
-
53
- # out: List[TaskOutput] = dc.Field(default_factory=list)
54
-
55
- def copy(self) -> 'TaskDef':
56
- ret = TaskDef(
57
- name=self.name,
58
- type=self.type,
59
- depends=self.depends.copy())
60
- return ret
61
-