This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.1.1 instead.
python_workflow_submitter
Python alternative to creating and running argo workflows in the Data Analysis Platform
This allows for the submission of Hera workflow objects to Diamond's GraphQL API.
| What | Where |
|---|---|
| Source | https://github.com/Matt-Carre/python-workflow-submitter |
| Docker | docker run ghcr.io/Matt-Carre/python-workflow-submitter:latest |
| Releases | https://github.com/Matt-Carre/python-workflow-submitter/releases |
To submit your workflow notebook: Notably, this requires a .env file in your source folder with the following parameters: HOST=https://workflows.diamond.ac.uk/graphql VISIT= EXPIRY= AUTH= TOKEN=
from python_workflow_submitter.submit_workflow import submit_workflow
await submit_workflow(w)
To submit a workflow script:
import asyncio
from python_workflow_submitter.submit_workflow import submit_workflow
asyncio.run(submit_workflow(w))
To submit a generic workflow via a graphql mutation in a notebook:
import os
from python_workflow_submitter.submit_workflow import submit_stock_workflow
await submit_stock_workflow(
"example-template",
{"png": "True", "jpg": "False", "jpeg": "True", "tif": "True", "tiff": "False"},
host= str(os.environ.get("HOST")),
visit= str(os.environ.get("VISIT")),
)
Alternatively:
import asyncio
from python_workflow_submitter.submit_workflow import submit_workflow
asyncio.run(submit_stock_workflow(
"example-template",
{"png": "True", "jpg": "False", "jpeg": "True", "tif": "True", "tiff": "False"},
host= str(os.environ.get("HOST")),
visit= str(os.environ.get("VISIT")),
))
To list workflows:
```python
import asyncio
from python_workflow_submitter.list_workflows import list_workflows
asyncio.run(list_workflows(limit=5,filter={"scienceGroup":"EXAMPLES"}))
To list workflows in specific visit with optional filtering:
import asyncio
from python_workflow_submitter.list_workflows import list_workflows_in_visit
asyncio.run(list_workflows(limit=5,filter=filter: {
"creator": "gmg29649",
"template": "example-template",
"workflowStatusFilter": {"succeeded": True}
}))
To list information about a workflow in a visit with a specific name:
import asyncio
from python_workflow_submitter.list_workflows import list_workflows_in_visit
asyncio.run(info_about_workflow(name="conditional-steps-tswxm",visit=ks10000-3))
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file python_workflow_submitter-0.2.1.tar.gz.
File metadata
- Download URL: python_workflow_submitter-0.2.1.tar.gz
- Upload date:
- Size: 184.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f1923bf861bfa34a788dd5ce55ac6a62eb3a5ebe1295b73f0e001930490dbfe
|
|
| MD5 |
199a3ce57862791498ad23951c73ad67
|
|
| BLAKE2b-256 |
48d146eb00ac3bb92ed8c09b8d36363b6b475a100b457d9f6108f85e3cc52b67
|