wpipe 2.1.0__tar.gz → 2.1.2__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 (152) hide show
  1. wpipe-2.1.2/.gitignore +178 -0
  2. {wpipe-2.1.0 → wpipe-2.1.2}/PKG-INFO +32 -39
  3. {wpipe-2.1.0 → wpipe-2.1.2}/README.md +2 -2
  4. wpipe-2.1.2/examples/01_basic_pipeline/01_simple_function/README.md +76 -0
  5. wpipe-2.1.2/examples/01_basic_pipeline/01_simple_function/example.py +84 -0
  6. wpipe-2.1.2/examples/01_basic_pipeline/02_class_steps/README.md +75 -0
  7. wpipe-2.1.2/examples/01_basic_pipeline/02_class_steps/example.py +93 -0
  8. wpipe-2.1.2/examples/01_basic_pipeline/03_mixed_steps/README.md +75 -0
  9. wpipe-2.1.2/examples/01_basic_pipeline/03_mixed_steps/example.py +87 -0
  10. wpipe-2.1.2/examples/01_basic_pipeline/04_default_values/README.md +70 -0
  11. wpipe-2.1.2/examples/01_basic_pipeline/04_default_values/example.py +72 -0
  12. wpipe-2.1.2/examples/01_basic_pipeline/05_args_kwargs/README.md +70 -0
  13. wpipe-2.1.2/examples/01_basic_pipeline/05_args_kwargs/example.py +78 -0
  14. wpipe-2.1.2/examples/01_basic_pipeline/06_dict_processing/README.md +75 -0
  15. wpipe-2.1.2/examples/01_basic_pipeline/06_dict_processing/example.py +100 -0
  16. wpipe-2.1.2/examples/01_basic_pipeline/07_multiple_runs/README.md +71 -0
  17. wpipe-2.1.2/examples/01_basic_pipeline/07_multiple_runs/example.py +95 -0
  18. wpipe-2.1.2/examples/01_basic_pipeline/08_data_aggregation/README.md +81 -0
  19. wpipe-2.1.2/examples/01_basic_pipeline/08_data_aggregation/example.py +106 -0
  20. wpipe-2.1.2/examples/01_basic_pipeline/09_empty_data/README.md +71 -0
  21. wpipe-2.1.2/examples/01_basic_pipeline/09_empty_data/example.py +76 -0
  22. wpipe-2.1.2/examples/01_basic_pipeline/10_lambda_steps/README.md +77 -0
  23. wpipe-2.1.2/examples/01_basic_pipeline/10_lambda_steps/example.py +34 -0
  24. wpipe-2.1.2/examples/01_basic_pipeline/11_decorator_steps/README.md +74 -0
  25. wpipe-2.1.2/examples/01_basic_pipeline/11_decorator_steps/example.py +91 -0
  26. wpipe-2.1.2/examples/01_basic_pipeline/12_context_manager/README.md +72 -0
  27. wpipe-2.1.2/examples/01_basic_pipeline/12_context_manager/example.py +73 -0
  28. wpipe-2.1.2/examples/01_basic_pipeline/13_async_pipeline/README.md +76 -0
  29. wpipe-2.1.2/examples/01_basic_pipeline/13_async_pipeline/example.py +80 -0
  30. wpipe-2.1.2/examples/01_basic_pipeline/14_pipeline_chaining/README.md +70 -0
  31. wpipe-2.1.2/examples/01_basic_pipeline/14_pipeline_chaining/example.py +53 -0
  32. wpipe-2.1.2/examples/01_basic_pipeline/15_pipeline_clone/README.md +70 -0
  33. wpipe-2.1.2/examples/01_basic_pipeline/15_pipeline_clone/example.py +53 -0
  34. wpipe-2.1.2/examples/01_basic_pipeline/16_LogGestor/example.py +19 -0
  35. wpipe-2.1.2/examples/01_basic_pipeline/README.md +166 -0
  36. wpipe-2.1.2/examples/15_export/01_json/export_json.py +77 -0
  37. wpipe-2.1.2/examples/15_export/README.md +110 -0
  38. {wpipe-2.1.0 → wpipe-2.1.2}/pyproject.toml +1 -1
  39. wpipe-2.1.2/test/test_api_pipeline.py +317 -0
  40. wpipe-2.1.2/test/test_async.py +82 -0
  41. wpipe-2.1.2/test/test_basic_pipeline.py +584 -0
  42. wpipe-2.1.2/test/test_checkpoint.py +92 -0
  43. wpipe-2.1.2/test/test_core.py +198 -0
  44. wpipe-2.1.2/wpipe/README.md +241 -0
  45. wpipe-2.1.2/wpipe/__init__.py +128 -0
  46. wpipe-2.1.2/wpipe/api_client/api_client.py +168 -0
  47. wpipe-2.1.2/wpipe/checkpoint/README.md +67 -0
  48. wpipe-2.1.2/wpipe/composition/README.md +163 -0
  49. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/composition/pipeline_step.py +33 -11
  50. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/dashboard/main.py +77 -32
  51. wpipe-2.1.2/wpipe/dashboard/static/dashboard.js +1384 -0
  52. wpipe-2.1.2/wpipe/dashboard/static/styles.css +1969 -0
  53. wpipe-2.1.2/wpipe/dashboard/templates/base.html +268 -0
  54. wpipe-2.1.2/wpipe/dashboard/templates/tabs/alerts.html +20 -0
  55. wpipe-2.1.2/wpipe/dashboard/templates/tabs/analytics.html +36 -0
  56. wpipe-2.1.2/wpipe/dashboard/templates/tabs/data.html +42 -0
  57. wpipe-2.1.2/wpipe/dashboard/templates/tabs/events.html +15 -0
  58. wpipe-2.1.2/wpipe/dashboard/templates/tabs/graph.html +110 -0
  59. wpipe-2.1.2/wpipe/dashboard/templates/tabs/pipelines.html +29 -0
  60. wpipe-2.1.2/wpipe/dashboard/templates/tabs/states.html +29 -0
  61. wpipe-2.1.2/wpipe/dashboard/templates/tabs/timeline.html +22 -0
  62. wpipe-2.1.2/wpipe/decorators/README.md +245 -0
  63. wpipe-2.1.2/wpipe/decorators/__init__.py +31 -0
  64. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/decorators/step.py +153 -63
  65. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/exception/api_error.py +37 -11
  66. wpipe-2.1.2/wpipe/export/README.md +102 -0
  67. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/export/exporter.py +99 -30
  68. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/log/log.py +2 -2
  69. wpipe-2.1.2/wpipe/parallel/README.md +106 -0
  70. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/parallel/executor.py +27 -4
  71. wpipe-2.1.2/wpipe/pipe/components/logic_blocks.py +236 -0
  72. wpipe-2.1.2/wpipe/pipe/components/logic_blocks_async.py +112 -0
  73. wpipe-2.1.2/wpipe/pipe/components/metrics.py +91 -0
  74. wpipe-2.1.2/wpipe/pipe/components/progress.py +56 -0
  75. wpipe-2.1.2/wpipe/pipe/pipe.py +1246 -0
  76. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/pipe/pipe_async.py +280 -152
  77. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/ram/ram.py +28 -8
  78. wpipe-2.1.2/wpipe/resource_monitor/README.md +104 -0
  79. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/resource_monitor/monitor.py +113 -36
  80. wpipe-2.1.2/wpipe/sqlite/Sqlite.py +317 -0
  81. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/sqlite/tables_dto/log_gestor_model.py +15 -1
  82. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/sqlite/tables_dto/records.py +14 -1
  83. wpipe-2.1.2/wpipe/sqlite/tables_dto/tracker_models.py +368 -0
  84. wpipe-2.1.2/wpipe/timeout/README.md +81 -0
  85. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/tracking/alerts.py +73 -12
  86. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/tracking/analysis.py +105 -27
  87. wpipe-2.1.2/wpipe/tracking/queries.py +212 -0
  88. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/tracking/tracker.py +202 -89
  89. wpipe-2.1.2/wpipe/type_hinting/README.md +94 -0
  90. wpipe-2.1.2/wpipe/type_hinting/validators.py +239 -0
  91. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/util/__init__.py +3 -1
  92. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/util/transform.py +49 -26
  93. wpipe-2.1.2/wpipe/util/utils.py +77 -0
  94. wpipe-2.1.0/setup.cfg +0 -4
  95. wpipe-2.1.0/setup.py +0 -33
  96. wpipe-2.1.0/test/test_api_pipeline.py +0 -206
  97. wpipe-2.1.0/test/test_async.py +0 -57
  98. wpipe-2.1.0/test/test_basic_pipeline.py +0 -396
  99. wpipe-2.1.0/test/test_checkpoint.py +0 -53
  100. wpipe-2.1.0/test/test_core.py +0 -133
  101. wpipe-2.1.0/wpipe/__init__.py +0 -164
  102. wpipe-2.1.0/wpipe/api_client/api_client.py +0 -99
  103. wpipe-2.1.0/wpipe/decorators/__init__.py +0 -25
  104. wpipe-2.1.0/wpipe/pipe/components/logic_blocks.py +0 -57
  105. wpipe-2.1.0/wpipe/pipe/components/logic_blocks_async.py +0 -53
  106. wpipe-2.1.0/wpipe/pipe/pipe.py +0 -1562
  107. wpipe-2.1.0/wpipe/sqlite/Sqlite.py +0 -226
  108. wpipe-2.1.0/wpipe/sqlite/tables_dto/tracker_models.py +0 -200
  109. wpipe-2.1.0/wpipe/tracking/queries.py +0 -128
  110. wpipe-2.1.0/wpipe/type_hinting/validators.py +0 -181
  111. wpipe-2.1.0/wpipe/util/utils.py +0 -76
  112. wpipe-2.1.0/wpipe.egg-info/PKG-INFO +0 -590
  113. wpipe-2.1.0/wpipe.egg-info/SOURCES.txt +0 -77
  114. wpipe-2.1.0/wpipe.egg-info/dependency_links.txt +0 -1
  115. wpipe-2.1.0/wpipe.egg-info/requires.txt +0 -25
  116. wpipe-2.1.0/wpipe.egg-info/top_level.txt +0 -2
  117. {wpipe-2.1.0 → wpipe-2.1.2}/LICENSE +0 -0
  118. {wpipe-2.1.0 → wpipe-2.1.2}/test/__init__.py +0 -0
  119. {wpipe-2.1.0 → wpipe-2.1.2}/test/test_dashboard_and_monitor.py +0 -0
  120. {wpipe-2.1.0 → wpipe-2.1.2}/test/test_export.py +0 -0
  121. {wpipe-2.1.0 → wpipe-2.1.2}/test/test_misc.py +0 -0
  122. {wpipe-2.1.0 → wpipe-2.1.2}/test/test_nested_pipelines.py +0 -0
  123. {wpipe-2.1.0 → wpipe-2.1.2}/test/test_pipe.py +0 -0
  124. {wpipe-2.1.0 → wpipe-2.1.2}/test/test_pipe_async.py +0 -0
  125. {wpipe-2.1.0 → wpipe-2.1.2}/test/test_pipeline_config.py +0 -0
  126. {wpipe-2.1.0 → wpipe-2.1.2}/test/test_sqlite.py +0 -0
  127. {wpipe-2.1.0 → wpipe-2.1.2}/test/test_tracking.py +0 -0
  128. {wpipe-2.1.0 → wpipe-2.1.2}/test/test_util.py +0 -0
  129. {wpipe-2.1.0 → wpipe-2.1.2}/test/test_yaml_config.py +0 -0
  130. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/api_client/__init__.py +0 -0
  131. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/checkpoint/__init__.py +0 -0
  132. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/checkpoint/checkpoint.py +0 -0
  133. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/composition/__init__.py +0 -0
  134. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/dashboard/__init__.py +0 -0
  135. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/dashboard/__main__.py +0 -0
  136. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/exception/__init__.py +0 -0
  137. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/export/__init__.py +0 -0
  138. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/log/__init__.py +0 -0
  139. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/parallel/__init__.py +0 -0
  140. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/pipe/__init__.py +0 -0
  141. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/pipe/components/__init__.py +0 -0
  142. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/pipe/components/constants.py +0 -0
  143. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/pipe/components/reporting.py +0 -0
  144. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/pipe/pipe_async_minimal.py +0 -0
  145. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/ram/__init__.py +0 -0
  146. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/resource_monitor/__init__.py +0 -0
  147. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/sqlite/__init__.py +0 -0
  148. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/sqlite/tables_dto/__init__.py +0 -0
  149. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/timeout/__init__.py +0 -0
  150. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/timeout/timeout.py +0 -0
  151. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/tracking/__init__.py +0 -0
  152. {wpipe-2.1.0 → wpipe-2.1.2}/wpipe/type_hinting/__init__.py +0 -0
wpipe-2.1.2/.gitignore ADDED
@@ -0,0 +1,178 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110
+ .pdm.toml
111
+ .pdm-python
112
+ .pdm-build/
113
+
114
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115
+ __pypackages__/
116
+
117
+ # Celery stuff
118
+ celerybeat-schedule
119
+ celerybeat.pid
120
+
121
+ # SageMath parsed files
122
+ *.sage.py
123
+
124
+ # Environments
125
+ .env
126
+ .venv
127
+ env/
128
+ venv/
129
+ ENV/
130
+ env.bak/
131
+ venv.bak/
132
+
133
+ # Spyder project settings
134
+ .spyderproject
135
+ .spyproject
136
+
137
+ # Rope project settings
138
+ .ropeproject
139
+
140
+ # mkdocs documentation
141
+ /site
142
+
143
+ # mypy
144
+ .mypy_cache/
145
+ .dmypy.json
146
+ dmypy.json
147
+
148
+ # Pyre type checker
149
+ .pyre/
150
+
151
+ # pytype static type analyzer
152
+ .pytype/
153
+
154
+ # Cython debug symbols
155
+ cython_debug/
156
+
157
+ # PyCharm
158
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
161
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
162
+ #.idea/
163
+
164
+ # LaTeX build files
165
+ *.aux
166
+ *.lof
167
+ *.lol
168
+ *.lot
169
+ *.out
170
+ *.toc
171
+ *.log
172
+
173
+ # WPipe execution files
174
+ *.db
175
+ configs/*.yaml
176
+ exports/
177
+ *.zip
178
+ *.db
@@ -1,9 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wpipe
3
- Version: 2.1.0
3
+ Version: 2.1.2
4
4
  Summary: Pipeline library with API integration for task orchestration and execution tracking
5
- Home-page: https://github.com/wisrovi/wpipe
6
- Author: William Steve Rodriguez Villamizar
5
+ Project-URL: Homepage, https://github.com/wisrovi/wpipe
6
+ Project-URL: Documentation, https://wpipe.readthedocs.io/en/latest/
7
+ Project-URL: Repository, https://github.com/wisrovi/wpipe
8
+ Project-URL: Issues, https://github.com/wisrovi/wpipe/issues
9
+ Project-URL: Changelog, https://github.com/wisrovi/wpipe/blob/main/CHANGELOG.md
7
10
  Author-email: William Steve Rodriguez Villamizar <wisrovi.rodriguez@gmail.com>
8
11
  License: MIT License
9
12
 
@@ -39,56 +42,46 @@ License: MIT License
39
42
  🌐 Website: https://wisrovi.github.io/wpipe/
40
43
 
41
44
  ¡Gracias por usar WPipe!
42
-
43
- Project-URL: Homepage, https://github.com/wisrovi/wpipe
44
- Project-URL: Documentation, https://wpipe.readthedocs.io/en/latest/
45
- Project-URL: Repository, https://github.com/wisrovi/wpipe
46
- Project-URL: Issues, https://github.com/wisrovi/wpipe/issues
47
- Project-URL: Changelog, https://github.com/wisrovi/wpipe/blob/main/CHANGELOG.md
48
- Keywords: pipeline,workflow,tasks,orchestration,api,worker
45
+ License-File: LICENSE
46
+ Keywords: api,orchestration,pipeline,tasks,worker,workflow
47
+ Classifier: Development Status :: 5 - Production/Stable
48
+ Classifier: Intended Audience :: Developers
49
+ Classifier: License :: OSI Approved :: MIT License
50
+ Classifier: Operating System :: OS Independent
49
51
  Classifier: Programming Language :: Python :: 3
50
52
  Classifier: Programming Language :: Python :: 3.9
51
53
  Classifier: Programming Language :: Python :: 3.10
52
54
  Classifier: Programming Language :: Python :: 3.11
53
55
  Classifier: Programming Language :: Python :: 3.12
54
56
  Classifier: Programming Language :: Python :: 3.13
55
- Classifier: License :: OSI Approved :: MIT License
56
- Classifier: Operating System :: OS Independent
57
57
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
58
- Classifier: Intended Audience :: Developers
59
- Classifier: Development Status :: 5 - Production/Stable
60
- Requires-Python: >=3.6
61
- Description-Content-Type: text/markdown
62
- License-File: LICENSE
63
- Requires-Dist: requests>=2.31.0
58
+ Requires-Python: >=3.9
59
+ Requires-Dist: fastapi>=0.100.0
64
60
  Requires-Dist: loguru>=0.7.0
65
61
  Requires-Dist: pandas>=2.0.0
62
+ Requires-Dist: pydantic>=2.0.0
66
63
  Requires-Dist: pyyaml>=6.0.1
67
- Requires-Dist: tqdm>=4.66.0
64
+ Requires-Dist: requests>=2.31.0
68
65
  Requires-Dist: rich>=13.7.0
69
- Requires-Dist: pydantic>=2.0.0
70
- Requires-Dist: fastapi>=0.100.0
66
+ Requires-Dist: tqdm>=4.66.0
71
67
  Requires-Dist: uvicorn>=0.23.0
72
68
  Requires-Dist: wsqlite>=0.1.0
73
69
  Provides-Extra: dev
74
- Requires-Dist: pytest>=7.4.0; extra == "dev"
75
- Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
76
- Requires-Dist: black>=23.0.0; extra == "dev"
77
- Requires-Dist: ruff>=0.1.0; extra == "dev"
78
- Requires-Dist: mypy>=1.7.0; extra == "dev"
70
+ Requires-Dist: black>=23.0.0; extra == 'dev'
71
+ Requires-Dist: mypy>=1.7.0; extra == 'dev'
72
+ Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
73
+ Requires-Dist: pytest>=7.4.0; extra == 'dev'
74
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
79
75
  Provides-Extra: docs
80
- Requires-Dist: sphinx>=7.2.0; extra == "docs"
81
- Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "docs"
82
- Requires-Dist: sphinx-copybutton>=0.5.0; extra == "docs"
83
- Requires-Dist: myst-parser>=2.0.0; extra == "docs"
84
- Requires-Dist: sphinx-sitemap>=2.5.0; extra == "docs"
85
- Requires-Dist: sphinx-design>=0.5.0; extra == "docs"
86
- Dynamic: author
87
- Dynamic: home-page
88
- Dynamic: license-file
89
- Dynamic: requires-python
90
-
91
- # 🚀 WPipe v2.1.0
76
+ Requires-Dist: myst-parser>=2.0.0; extra == 'docs'
77
+ Requires-Dist: sphinx-copybutton>=0.5.0; extra == 'docs'
78
+ Requires-Dist: sphinx-design>=0.5.0; extra == 'docs'
79
+ Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == 'docs'
80
+ Requires-Dist: sphinx-sitemap>=2.5.0; extra == 'docs'
81
+ Requires-Dist: sphinx>=7.2.0; extra == 'docs'
82
+ Description-Content-Type: text/markdown
83
+
84
+ # 🚀 WPipe v2.1.1
92
85
 
93
86
  **El motor de orquestación de pipelines más rápido, resiliente y puro para Python.**
94
87
 
@@ -511,7 +504,7 @@ exporter.export_pipeline_logs(format="json", output_path="reporte.json")
511
504
 
512
505
  | Aspecto | Detalle |
513
506
  |--------|---------|
514
- | **LTS** | WPipe v1.6+ cuenta con soporte a largo plazo |
507
+ | **LTS** | WPipe v2.1+ cuenta con soporte a largo plazo |
515
508
  | **Test Coverage** | 95%+ pruebas en entornos síncronos y asíncronos |
516
509
  | **Arquitectura** | Unificación bajo `wsqlite`, sin SQL crudo en el núcleo |
517
510
  | **Python** | Compatible con Python 3.9+ |
@@ -1,4 +1,4 @@
1
- # 🚀 WPipe v2.1.0
1
+ # 🚀 WPipe v2.1.1
2
2
 
3
3
  **El motor de orquestación de pipelines más rápido, resiliente y puro para Python.**
4
4
 
@@ -421,7 +421,7 @@ exporter.export_pipeline_logs(format="json", output_path="reporte.json")
421
421
 
422
422
  | Aspecto | Detalle |
423
423
  |--------|---------|
424
- | **LTS** | WPipe v1.6+ cuenta con soporte a largo plazo |
424
+ | **LTS** | WPipe v2.1+ cuenta con soporte a largo plazo |
425
425
  | **Test Coverage** | 95%+ pruebas en entornos síncronos y asíncronos |
426
426
  | **Arquitectura** | Unificación bajo `wsqlite`, sin SQL crudo en el núcleo |
427
427
  | **Python** | Compatible con Python 3.9+ |
@@ -0,0 +1,76 @@
1
+ # 01 Simple Function
2
+
3
+ Sequential function execution in a pipeline.
4
+
5
+ ## What It Does
6
+
7
+ - Creates a Pipeline instance
8
+ - Adds three functions as sequential steps
9
+ - Runs pipeline with input data
10
+ - Transforms data through each step
11
+
12
+ ## Flow
13
+
14
+ ```mermaid
15
+ graph LR
16
+ A[Input] --> B[Pipeline]
17
+ B --> C[Register Worker]
18
+ C --> D{Check API}
19
+ D -->|Yes| E[Run with API]
20
+ D -->|No| F[Run Local]
21
+ E --> G[Result]
22
+ F --> G
23
+ ```
24
+
25
+ ```mermaid
26
+ sequenceDiagram
27
+ participant P as Pipeline
28
+ participant S1 as multiply_by_two
29
+ participant S2 as add_ten
30
+ participant S3 as square
31
+
32
+ P->>S1: run({input: 5})
33
+ S1-->>P: {value: 10}
34
+ P->>S2: run({value: 10})
35
+ S2-->>P: {value: 20}
36
+ P->>S3: run({value: 20})
37
+ S3-->>P: {result: 400}
38
+ ```
39
+
40
+ ```mermaid
41
+ graph TB
42
+ subgraph Setup
43
+ A[Input]
44
+ B[Pipeline]
45
+ end
46
+
47
+ subgraph Execution
48
+ C[multiply_by_two]
49
+ D[add_ten]
50
+ E[square]
51
+ end
52
+
53
+ subgraph Result
54
+ F[Output]
55
+ end
56
+
57
+ A --> B
58
+ B --> C
59
+ C --> D
60
+ D --> E
61
+ E --> F
62
+ ```
63
+
64
+ ```mermaid
65
+ stateDiagram-v2
66
+ [*] --> Ready
67
+ Ready --> Running
68
+ Running --> Complete
69
+ Complete --> [*]
70
+ ```
71
+
72
+ ```mermaid
73
+ flowchart LR
74
+ I([Input]) --> P([Process])
75
+ P --> O([Output])
76
+ ```
@@ -0,0 +1,84 @@
1
+ """
2
+ Basic Pipeline - Simple Function Pipeline
3
+
4
+ The simplest pipeline example. Shows basic pipeline creation with sequential functions.
5
+ """
6
+
7
+ from wpipe import Pipeline
8
+
9
+
10
+ def multiply_by_two(data: dict) -> dict:
11
+ """Multiply input value by 2.
12
+
13
+ Args:
14
+ data: Dictionary containing 'input' key with numeric value.
15
+
16
+ Returns:
17
+ Dictionary with 'value' key containing doubled input.
18
+
19
+ Example:
20
+ >>> multiply_by_two({"input": 5})
21
+ {"value": 10}
22
+ """
23
+ return {"value": data["input"] * 2}
24
+
25
+
26
+ def add_ten(data: dict) -> dict:
27
+ """Add 10 to the value in data.
28
+
29
+ Args:
30
+ data: Dictionary containing 'value' key.
31
+
32
+ Returns:
33
+ Dictionary with updated 'value' key.
34
+
35
+ Example:
36
+ >>> add_ten({"value": 10})
37
+ {"value": 20}
38
+ """
39
+ return {"value": data["value"] + 10}
40
+
41
+
42
+ def square(data: dict) -> dict:
43
+ """Square the value in data.
44
+
45
+ Args:
46
+ data: Dictionary containing 'value' key.
47
+
48
+ Returns:
49
+ Dictionary with 'result' key containing squared value.
50
+
51
+ Example:
52
+ >>> square({"value": 20})
53
+ {"result": 400}
54
+ """
55
+ return {"result": data["value"] ** 2}
56
+
57
+
58
+ def main() -> None:
59
+ """Run the simple function pipeline example.
60
+
61
+ Demonstrates:
62
+ - Creating Pipeline instance
63
+ - Adding function steps
64
+ - Running pipeline with input data
65
+ - Sequential data transformation
66
+ """
67
+ pipeline = Pipeline(verbose=True)
68
+
69
+ pipeline.set_steps(
70
+ [
71
+ (multiply_by_two, "Multiply by 2", "v1.0"),
72
+ (add_ten, "Add 10", "v1.0"),
73
+ (square, "Square", "v1.0"),
74
+ ]
75
+ )
76
+
77
+ result = pipeline.run({"input": 5})
78
+
79
+ print(f"Input: 5 -> Output: {result}")
80
+ assert result["result"] == 400
81
+
82
+
83
+ if __name__ == "__main__":
84
+ main()
@@ -0,0 +1,75 @@
1
+ # 02 Class-Based Steps
2
+
3
+ Using classes as pipeline steps with state.
4
+
5
+ ## What It Does
6
+
7
+ - Creates pipeline with class instances
8
+ - Classes maintain state via __call__
9
+ - Chains class instances as steps
10
+
11
+ ## Flow
12
+
13
+ ```mermaid
14
+ graph LR
15
+ A[Input] --> B[Pipeline]
16
+ B --> C[Register Worker]
17
+ C --> D{Check API}
18
+ D -->|Yes| E[Run with API]
19
+ D -->|No| F[Run Local]
20
+ E --> G[Result]
21
+ F --> G
22
+ ```
23
+
24
+ ```mermaid
25
+ sequenceDiagram
26
+ participant P as Pipeline
27
+ participant C1 as DoubleValue
28
+ participant C2 as AddFive
29
+ participant C3 as FormatOutput
30
+
31
+ P->>C1: run({value: 10})
32
+ C1-->>P: {doubled: 20}
33
+ P->>C2: run({doubled: 20})
34
+ C2-->>P: {added: 25}
35
+ P->>C3: run({added: 25})
36
+ C3-->>P: {output: "Result: 25"}
37
+ ```
38
+
39
+ ```mermaid
40
+ graph TB
41
+ subgraph Setup
42
+ A[Input]
43
+ B[Pipeline]
44
+ end
45
+
46
+ subgraph Execution
47
+ C[DoubleValue]
48
+ D[AddFive]
49
+ E[FormatOutput]
50
+ end
51
+
52
+ subgraph Result
53
+ F[Output]
54
+ end
55
+
56
+ A --> B
57
+ B --> C
58
+ C --> D
59
+ D --> E
60
+ E --> F
61
+ ```
62
+
63
+ ```mermaid
64
+ stateDiagram-v2
65
+ [*] --> Ready
66
+ Ready --> Running
67
+ Running --> Complete
68
+ Complete --> [*]
69
+ ```
70
+
71
+ ```mermaid
72
+ flowchart LR
73
+ I([Input]) --> P([Process])
74
+ P --> O([Output])
75
+ ```
@@ -0,0 +1,93 @@
1
+ """
2
+ Basic Pipeline - Class-Based Steps
3
+
4
+ Pipeline steps using classes with __call__ method.
5
+ Classes can maintain state between executions.
6
+ """
7
+
8
+ from wpipe import Pipeline
9
+
10
+
11
+ class DoubleValue:
12
+ """Double the input value."""
13
+
14
+ def __call__(self, data: dict) -> dict:
15
+ """Double the value from input data.
16
+
17
+ Args:
18
+ data: Dictionary containing 'value' key.
19
+
20
+ Returns:
21
+ Dictionary with 'doubled' key containing doubled value.
22
+
23
+ Example:
24
+ >>> DoubleValue()({"value": 10})
25
+ {"doubled": 20}
26
+ """
27
+ return {"doubled": data["value"] * 2}
28
+
29
+
30
+ class AddFive:
31
+ """Add 5 to the doubled value."""
32
+
33
+ def __call__(self, data: dict) -> dict:
34
+ """Add 5 to the doubled value from input data.
35
+
36
+ Args:
37
+ data: Dictionary containing 'doubled' key.
38
+
39
+ Returns:
40
+ Dictionary with 'added' key containing result.
41
+
42
+ Example:
43
+ >>> AddFive()({"doubled": 20})
44
+ {"added": 25}
45
+ """
46
+ return {"added": data["doubled"] + 5}
47
+
48
+
49
+ class FormatOutput:
50
+ """Format the final output as a string."""
51
+
52
+ def __call__(self, data: dict) -> dict:
53
+ """Format the added value as output string.
54
+
55
+ Args:
56
+ data: Dictionary containing 'added' key.
57
+
58
+ Returns:
59
+ Dictionary with 'output' key containing formatted string.
60
+
61
+ Example:
62
+ >>> FormatOutput()({"added": 25})
63
+ {"output": "Result: 25"}
64
+ """
65
+ return {"output": f"Result: {data['added']}"}
66
+
67
+
68
+ def main() -> None:
69
+ """Run the class-based steps example.
70
+
71
+ Demonstrates:
72
+ - Using classes as pipeline steps
73
+ - Maintaining state via __call__ method
74
+ - Chaining class instances as steps
75
+ """
76
+ pipeline = Pipeline(verbose=True)
77
+
78
+ pipeline.set_steps(
79
+ [
80
+ (DoubleValue(), "Double Value", "v1.0"),
81
+ (AddFive(), "Add Five", "v1.0"),
82
+ (FormatOutput(), "Format Output", "v1.0"),
83
+ ]
84
+ )
85
+
86
+ result = pipeline.run({"value": 10})
87
+
88
+ print(f"Result: {result}")
89
+ assert result["output"] == "Result: 25"
90
+
91
+
92
+ if __name__ == "__main__":
93
+ main()
@@ -0,0 +1,75 @@
1
+ # 03 Mixed Steps
2
+
3
+ Functions and classes working together.
4
+
5
+ ## What It Does
6
+
7
+ - Combines functions and classes
8
+ - Processes list data
9
+ - Calculates aggregate values
10
+
11
+ ## Flow
12
+
13
+ ```mermaid
14
+ graph LR
15
+ A[Input] --> B[Pipeline]
16
+ B --> C[Register Worker]
17
+ C --> D{Check API}
18
+ D -->|Yes| E[Run with API]
19
+ D -->|No| F[Run Local]
20
+ E --> G[Result]
21
+ F --> G
22
+ ```
23
+
24
+ ```mermaid
25
+ sequenceDiagram
26
+ participant P as Pipeline
27
+ participant F1 as extract_numbers
28
+ participant C1 as SumNumbers
29
+ participant F2 as calculate_average
30
+
31
+ P->>F1: run({})
32
+ F1-->>P: {numbers: [1,2,3,4,5]}
33
+ P->>C1: run({numbers: [1,2,3,4,5]})
34
+ C1-->>P: {sum: 15}
35
+ P->>F2: run({sum: 15})
36
+ F2-->>P: {average: 3.0}
37
+ ```
38
+
39
+ ```mermaid
40
+ graph TB
41
+ subgraph Setup
42
+ A[Input]
43
+ B[Pipeline]
44
+ end
45
+
46
+ subgraph Execution
47
+ C[extract_numbers]
48
+ D[SumNumbers]
49
+ E[calculate_average]
50
+ end
51
+
52
+ subgraph Result
53
+ F[Output]
54
+ end
55
+
56
+ A --> B
57
+ B --> C
58
+ C --> D
59
+ D --> E
60
+ E --> F
61
+ ```
62
+
63
+ ```mermaid
64
+ stateDiagram-v2
65
+ [*] --> Ready
66
+ Ready --> Running
67
+ Running --> Complete
68
+ Complete --> [*]
69
+ ```
70
+
71
+ ```mermaid
72
+ flowchart LR
73
+ I([Input]) --> P([Process])
74
+ P --> O([Output])
75
+ ```