orchestrator-core 3.1.2rc1__py3-none-any.whl → 3.1.2rc4__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.
Files changed (47) hide show
  1. orchestrator/__init__.py +2 -2
  2. orchestrator/api/api_v1/api.py +1 -1
  3. orchestrator/api/api_v1/endpoints/processes.py +24 -1
  4. orchestrator/api/api_v1/endpoints/settings.py +1 -1
  5. orchestrator/api/api_v1/endpoints/subscriptions.py +1 -1
  6. orchestrator/app.py +1 -1
  7. orchestrator/cli/database.py +1 -1
  8. orchestrator/cli/generator/generator/migration.py +2 -5
  9. orchestrator/cli/migrate_tasks.py +13 -0
  10. orchestrator/config/assignee.py +1 -1
  11. orchestrator/db/models.py +1 -1
  12. orchestrator/devtools/populator.py +1 -1
  13. orchestrator/domain/__init__.py +2 -3
  14. orchestrator/domain/base.py +74 -5
  15. orchestrator/domain/lifecycle.py +1 -1
  16. orchestrator/graphql/schema.py +1 -1
  17. orchestrator/graphql/types.py +1 -1
  18. orchestrator/graphql/utils/get_subscription_product_blocks.py +13 -0
  19. orchestrator/migrations/env.py +1 -1
  20. orchestrator/migrations/helpers.py +6 -6
  21. orchestrator/schemas/engine_settings.py +1 -1
  22. orchestrator/schemas/subscription.py +1 -1
  23. orchestrator/security.py +1 -1
  24. orchestrator/services/celery.py +1 -1
  25. orchestrator/services/processes.py +72 -10
  26. orchestrator/services/products.py +1 -1
  27. orchestrator/services/subscriptions.py +1 -1
  28. orchestrator/services/tasks.py +1 -1
  29. orchestrator/settings.py +2 -23
  30. orchestrator/targets.py +1 -1
  31. orchestrator/types.py +1 -1
  32. orchestrator/utils/errors.py +1 -1
  33. orchestrator/utils/state.py +1 -1
  34. orchestrator/websocket/websocket_manager.py +1 -1
  35. orchestrator/workflow.py +2 -1
  36. orchestrator/workflows/modify_note.py +1 -1
  37. orchestrator/workflows/steps.py +1 -1
  38. orchestrator/workflows/tasks/cleanup_tasks_log.py +1 -1
  39. orchestrator/workflows/tasks/resume_workflows.py +1 -1
  40. orchestrator/workflows/tasks/validate_product_type.py +1 -1
  41. orchestrator/workflows/tasks/validate_products.py +1 -1
  42. orchestrator/workflows/utils.py +1 -1
  43. orchestrator_core-3.1.2rc4.dist-info/METADATA +116 -0
  44. {orchestrator_core-3.1.2rc1.dist-info → orchestrator_core-3.1.2rc4.dist-info}/RECORD +46 -46
  45. {orchestrator_core-3.1.2rc1.dist-info → orchestrator_core-3.1.2rc4.dist-info}/WHEEL +1 -1
  46. orchestrator_core-3.1.2rc1.dist-info/METADATA +0 -321
  47. {orchestrator_core-3.1.2rc1.dist-info → orchestrator_core-3.1.2rc4.dist-info}/licenses/LICENSE +0 -0
@@ -1,321 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: orchestrator-core
3
- Version: 3.1.2rc1
4
- Summary: This is the orchestrator workflow engine.
5
- Author-email: SURF <automation-beheer@surf.nl>
6
- Requires-Python: >=3.11,<3.14
7
- Description-Content-Type: text/markdown
8
- License-Expression: Apache-2.0
9
- Classifier: Intended Audience :: Information Technology
10
- Classifier: Intended Audience :: System Administrators
11
- Classifier: Operating System :: OS Independent
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python
14
- Classifier: Topic :: Internet
15
- Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
16
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
- Classifier: Topic :: Software Development :: Libraries
18
- Classifier: Topic :: Software Development
19
- Classifier: Typing :: Typed
20
- Classifier: Development Status :: 5 - Production/Stable
21
- Classifier: Environment :: Web Environment
22
- Classifier: Framework :: AsyncIO
23
- Classifier: Framework :: FastAPI
24
- Classifier: Intended Audience :: Developers
25
- Classifier: Intended Audience :: Telecommunications Industry
26
- Classifier: Programming Language :: Python :: 3 :: Only
27
- Classifier: Programming Language :: Python :: 3.13
28
- Classifier: Programming Language :: Python :: 3.12
29
- Classifier: Programming Language :: Python :: 3.11
30
- Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
31
- Classifier: Topic :: Internet :: WWW/HTTP
32
- License-File: LICENSE
33
- Requires-Dist: alembic==1.15.1
34
- Requires-Dist: anyio>=3.7.0
35
- Requires-Dist: click==8.*
36
- Requires-Dist: deprecated
37
- Requires-Dist: deepmerge==2.0
38
- Requires-Dist: fastapi~=0.115.2
39
- Requires-Dist: fastapi-etag==0.4.0
40
- Requires-Dist: more-itertools~=10.6.0
41
- Requires-Dist: itsdangerous
42
- Requires-Dist: Jinja2==3.1.6
43
- Requires-Dist: orjson==3.10.15
44
- Requires-Dist: psycopg[binary]==3.2.6
45
- Requires-Dist: pydantic[email]~=2.10.6
46
- Requires-Dist: pydantic-settings~=2.8.0
47
- Requires-Dist: python-dateutil==2.8.2
48
- Requires-Dist: python-rapidjson>=1.18,<1.21
49
- Requires-Dist: pytz==2025.1
50
- Requires-Dist: redis==5.1.1
51
- Requires-Dist: schedule==1.1.0
52
- Requires-Dist: sentry-sdk[fastapi]~=2.22.0
53
- Requires-Dist: SQLAlchemy==2.0.39
54
- Requires-Dist: SQLAlchemy-Utils==0.41.2
55
- Requires-Dist: structlog
56
- Requires-Dist: typer==0.15.2
57
- Requires-Dist: uvicorn[standard]~=0.34.0
58
- Requires-Dist: nwa-stdlib~=1.9.0
59
- Requires-Dist: oauth2-lib~=2.4.0
60
- Requires-Dist: tabulate==0.9.0
61
- Requires-Dist: strawberry-graphql>=0.246.2
62
- Requires-Dist: pydantic-forms~=1.4.0
63
- Requires-Dist: celery~=5.4.0 ; extra == "celery"
64
- Requires-Dist: toml ; extra == "dev"
65
- Requires-Dist: bumpversion ; extra == "dev"
66
- Requires-Dist: mypy_extensions ; extra == "dev"
67
- Requires-Dist: pre-commit ; extra == "dev"
68
- Requires-Dist: pydocstyle ; extra == "dev"
69
- Requires-Dist: python-dotenv ; extra == "dev"
70
- Requires-Dist: watchdog ; extra == "dev"
71
- Requires-Dist: mkdocs ; extra == "doc"
72
- Requires-Dist: mkdocs-material[imaging] ; extra == "doc"
73
- Requires-Dist: mkdocs-render-swagger-plugin ; extra == "doc"
74
- Requires-Dist: mkdocs-include-markdown-plugin ; extra == "doc"
75
- Requires-Dist: mkdocstrings[python] ; extra == "doc"
76
- Requires-Dist: mkdocs-open-in-new-tab ; extra == "doc"
77
- Requires-Dist: mkdocs-macros-plugin ; extra == "doc"
78
- Requires-Dist: mkdocs-embed-external-markdown ; extra == "doc"
79
- Requires-Dist: apache-license-check ; extra == "test"
80
- Requires-Dist: black ; extra == "test"
81
- Requires-Dist: blinker ; extra == "test"
82
- Requires-Dist: deepdiff ; extra == "test"
83
- Requires-Dist: dirty-equals ; extra == "test"
84
- Requires-Dist: jsonref ; extra == "test"
85
- Requires-Dist: mypy==1.9 ; extra == "test"
86
- Requires-Dist: pyinstrument ; extra == "test"
87
- Requires-Dist: pytest==8.3.5 ; extra == "test"
88
- Requires-Dist: pytest-asyncio==0.21.2 ; extra == "test"
89
- Requires-Dist: pytest-codspeed ; extra == "test"
90
- Requires-Dist: pytest-cov ; extra == "test"
91
- Requires-Dist: pytest-httpx ; extra == "test"
92
- Requires-Dist: pytest-xdist ; extra == "test"
93
- Requires-Dist: requests-mock ; extra == "test"
94
- Requires-Dist: ruff ; extra == "test"
95
- Requires-Dist: sqlalchemy[mypy] ; extra == "test"
96
- Requires-Dist: urllib3-mock ; extra == "test"
97
- Requires-Dist: types-Deprecated ; extra == "test"
98
- Requires-Dist: types-Jinja2 ; extra == "test"
99
- Requires-Dist: types-aiofiles ; extra == "test"
100
- Requires-Dist: types-certifi ; extra == "test"
101
- Requires-Dist: types-click ; extra == "test"
102
- Requires-Dist: types-itsdangerous ; extra == "test"
103
- Requires-Dist: types-orjson ; extra == "test"
104
- Requires-Dist: types-python-dateutil ; extra == "test"
105
- Requires-Dist: types-pytz ; extra == "test"
106
- Requires-Dist: types-redis ; extra == "test"
107
- Requires-Dist: types-requests ; extra == "test"
108
- Requires-Dist: types-setuptools ; extra == "test"
109
- Requires-Dist: types-tabulate ; extra == "test"
110
- Requires-Dist: types-toml ; extra == "test"
111
- Requires-Dist: types-ujson ; extra == "test"
112
- Requires-Dist: types-PyYAML ; extra == "test"
113
- Project-URL: documentation, https://workfloworchestrator.org/orchestrator-core/
114
- Project-URL: releasenotes, https://github.com/workfloworchestrator/orchestrator-core/releases
115
- Project-URL: source, https://github.com/workfloworchestrator/orchestrator-core
116
- Provides-Extra: celery
117
- Provides-Extra: dev
118
- Provides-Extra: doc
119
- Provides-Extra: test
120
-
121
- # Orchestrator-Core
122
- [![Downloads](https://pepy.tech/badge/orchestrator-core/month)](https://pepy.tech/project/orchestrator-core)
123
- [![codecov](https://codecov.io/gh/workfloworchestrator/orchestrator-core/branch/main/graph/badge.svg?token=5ANQFI2DHS)](https://codecov.io/gh/workfloworchestrator/orchestrator-core)
124
- [![pypi_version](https://img.shields.io/pypi/v/orchestrator-core?color=%2334D058&label=pypi%20package)](https://pypi.org/project/orchestrator-core)
125
- [![Supported python versions](https://img.shields.io/pypi/pyversions/orchestrator-core.svg?color=%2334D058)](https://pypi.org/project/orchestrator-core)
126
- ![Discord](https://img.shields.io/discord/1295834294270558280?style=flat&logo=discord&label=discord&link=https%3A%2F%2Fdiscord.gg%2FKNgF6gE8)
127
-
128
- <p style="text-align: center"><em>Production ready Orchestration Framework to manage product lifecycle and workflows. Easy to use, Built on top of FastAPI</em></p>
129
-
130
-
131
- ## Documentation
132
- Can be found [here](https://workfloworchestrator.org/orchestrator-core/)
133
-
134
- ## Usage
135
- This project can be installed as follows:
136
-
137
- #### Step 1:
138
- Install the core.
139
- ```shell
140
- pip install orchestrator-core
141
- ```
142
-
143
- #### Step 2:
144
- Create a postgres database:
145
- ```shell
146
- createuser -sP nwa
147
- createdb orchestrator-core -O nwa
148
- ```
149
-
150
- #### Step 3 (optional):
151
- When using multiple workers, you will need a redis server for live updates with websockets.
152
-
153
- By default it will use memory which works with only one worker.
154
- ```shell
155
- export WEBSOCKET_BROADCASTER_URL="memory://"
156
- ```
157
-
158
- For the redis connection you need to set the env variable with the connection url.
159
- ```shell
160
- export WEBSOCKET_BROADCASTER_URL="redis://localhost:6379"
161
- ```
162
-
163
-
164
- Websockets can also be turned off with:
165
- ```shell
166
- export ENABLE_WEBSOCKETS=False
167
- ```
168
-
169
- If you want to use pickle for CACHE serialization you will need to set the `CACHE_HMAC_SECRET`:
170
- ```shell
171
- export CACHE_HMAC_SECRET="SOMESECRET"
172
- ```
173
- **NOTE**: The key can be any length. However, the recommended size is 1024 bits.
174
-
175
- #### Step 4:
176
- Create a `main.py` file.
177
-
178
- ```python
179
- from orchestrator import OrchestratorCore
180
- from orchestrator.cli.main import app as core_cli
181
- from orchestrator.settings import AppSettings
182
-
183
- app = OrchestratorCore(base_settings=AppSettings())
184
-
185
- if __name__ == "__main__":
186
- core_cli()
187
- ```
188
-
189
- #### Step 5 (Optional):
190
- OrchestratorCore comes with a graphql interface that can to be registered after you create your OrchestratorApp.
191
- If you add it after registering your `SUBSCRIPTION_MODEL_REGISTRY` it will automatically create graphql types for them.
192
- More info can be found in `docs/architecture/application/graphql.md`
193
-
194
- example:
195
- ```python
196
- from orchestrator import OrchestratorCore
197
- from orchestrator.settings import AppSettings
198
-
199
- app = OrchestratorCore(base_settings=AppSettings())
200
- # register SUBSCRIPTION_MODEL_REGISTRY
201
- app.register_graphql()
202
- ```
203
-
204
- #### Step 6:
205
- Initialize the migration environment.
206
- ```shell
207
- PYTHONPATH=. python main.py db init
208
- PYTHONPATH=. python main.py db upgrade heads
209
- ```
210
-
211
- ### Step 7:
212
- Profit :)
213
-
214
- Authentication and authorization are default enabled, to disable set `OAUTH2_ACTIVE` and `OAUTH2_AUTHORIZATION_ACTIVE` to `False`.
215
-
216
- ```shell
217
- uvicorn --reload --host 127.0.0.1 --port 8080 main:app
218
- ```
219
-
220
- Visit [http://127.0.0.1:8080/api/redoc](http://127.0.0.1:8080/api/redoc) to view the api documentation.
221
-
222
-
223
- ## Setting up a development environment
224
-
225
- To add features to the repository follow the following procedure to setup a working development environment.
226
-
227
- ### Installation (Development standalone)
228
- Install the project and its dependencies to develop on the code.
229
-
230
- #### Step 1 - install flit:
231
-
232
- ```shell
233
- python3 -m venv venv
234
- source venv/bin/activate
235
- pip install flit
236
- ```
237
-
238
- #### Step 2 - install the development code:
239
-
240
- !!! danger
241
- Make sure to use the flit binary that is installed in your environment. You can check the correct
242
- path by running
243
- ```shell
244
- which flit
245
- ```
246
-
247
- To be sure that the packages will be installed against the correct venv you can also prepend the python interpreter
248
- that you want to use:
249
-
250
- ```shell
251
- flit install --deps develop --symlink --python venv/bin/python
252
- ```
253
-
254
-
255
- ### Running tests
256
- Run the unit-test suite to verify a correct setup.
257
-
258
- #### Step 1 - Create a database
259
-
260
- ```shell
261
- createuser -sP nwa
262
- createdb orchestrator-core-test -O nwa
263
- ```
264
-
265
- #### Step 2 - Run tests
266
- ```shell
267
- pytest test/unit_tests
268
- ```
269
- or with xdist:
270
-
271
- ```shell
272
- pytest -n auto test/unit_tests
273
- ```
274
-
275
- If you do not encounter any failures in the test, you should be able to develop features in the orchestrator-core.
276
-
277
- ### Installation (Development symlinked into orchestrator SURF)
278
-
279
- If you are working on a project that already uses the `orchestrator-core` and you want to test your new core features
280
- against it, you can use some `flit` magic to symlink the dev version of the core to your project. It will
281
- automatically replace the pypi dep with a symlink to the development version
282
- of the core and update/downgrade all required packages in your own orchestrator project.
283
-
284
- #### Step 1 - install flit:
285
-
286
- ```shell
287
- python - m venv venv
288
- source venv/bin/activate
289
- pip install flit
290
- ```
291
-
292
- ### Step 2 - symlink the core to your own project
293
-
294
- ```shell
295
- flit install --deps develop --symlink --python /path/to/a/orchestrator-project/venv/bin/python
296
- ```
297
-
298
- So if you have the core and your own orchestrator project repo in the same folder and the main project folder is
299
- `orchestrator` and you want to use relative links, this will be last step:
300
-
301
- ```shell
302
- flit install --deps develop --symlink --python ../orchestrator/venv/bin/python
303
- ```
304
-
305
- # Increasing the version number for a (pre) release.
306
-
307
- When your PR is accepted you will get a version number.
308
-
309
- You can do the necessary change with a clean, e.g. every change committed, branch:
310
-
311
- ```shell
312
- bumpversion patch --new-version 0.4.1-rc3
313
- ```
314
-
315
- ### Changing the Core database schema
316
- When you would like to change the core database schema, execute the following steps.
317
-
318
- - Create the new model `orchestrator/database/models.py`
319
- - `cd orchestrator/migrations`
320
- - `alembic revision --autogenerate -m "Name of the migratioin"`
321
-