Skip to main content
Yanked

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.

CI Coverage

License Copier

python_workflow_submitter

Python alternative to creating and running argo workflows in the Data Analysis Platform

This allows for the submission of yaml files to Diamond's GraphQL API. This automatically lints yaml files before submission.

Notably, this requires a .env file in your src/ folder.

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 create a helm template in your helm chart folder:

import asyncio
from python_workflow_submitter.create_helm_yaml import create_helm_yaml

create_helm_yaml("notebook.yaml", "/workspaces/your_path/helm", "values/values.yaml")

To lint a yaml file (automatically called upon submitting workflows):

import asyncio
from python_workflow_submitter.lintyaml import lint_yaml

lint_yaml("notebook.yaml")

To submit your workflow written in a notebook:

from python_workflow_submitter.submit_workflow import submit_workflow_yaml

await submit_workflow_yaml("example.yaml")

To submit a workflow script:

import asyncio
from python_workflow_submitter.submit_workflow import submit_workflow_yaml

asyncio.run(submit_workflow_yaml("example.yaml", visit="ks10000-3"))

To submit a generic workflow via a GraphQL mutation:

import asyncio
from python_workflow_submitter.submit_workflow import submit_workflow

asyncio.run(
    submit_workflow(
        "example-template",
        {"png": True, "jpg": False, "jpeg": True, "tif": True, "tiff": False},
        visit=str(os.environ.get("VISIT")),
    )
)

To list workflow templates available to run:

import asyncio
from python_workflow_submitter.list_workflows import list_workflows

asyncio.run(list_workflows(limit=5, filter="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_in_visit(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 info_about_workflow

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

python_workflow_submitter-1.0.0.tar.gz (181.2 kB view details)

Uploaded Source

File details

Details for the file python_workflow_submitter-1.0.0.tar.gz.

File metadata

File hashes

Hashes for python_workflow_submitter-1.0.0.tar.gz
Algorithm Hash digest
SHA256 48014f72531338dd2ff75c2287baea8d367f92b190aad5305b23aec5f0f221e9
MD5 f4e13819f2aa74f429c932128bba2a80
BLAKE2b-256 b8234e0053b2b60f15121362c7a0ce6de3900814b69ccc9cfdc512575de30ec1

See more details on using hashes here.

Release history Release notifications | RSS feed

1.1.1

1 file

1.0.1

1 file

This release

1.0.0 This release

1 file

0.4.5

1 file

0.4.4

1 file

0.4.3

1 file

0.4.2

1 file

0.4.1

1 file

0.4.0

1 file

0.3.0

1 file

0.2.1

1 file

0.2.0

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page