Skip to main content

manage a workflow written in csv

Project description

Workflow module

Description

The Workflow module manages a sequence, ie a list of steps which are linked together in a sequential way.
To define such a sequence, create a table in excel or csv file with columns named:

  • stepId
  • title
  • nexts

stepId is the unique step identifier,
title is an arbitrary name of the step,
nexts is a list of stepIds that follows the step. The list is given by stepIds separated with '-' .

Here is an example:

stepId title nexts
1 my first step 2-3
2 my second step 4
3 step 3! 12
4 step4
9 step9 12-4
12 step12

In this example, steps 1 and 9 are the first steps in the workflow because the don't have any previous step.
Steps 4 and 12 are the last steps because they don't have any next step.

  • Step 1 points to 2 next steps: steps 2 and 3,
  • Step 2 points to step 4, ...

As we can see, there is no need to define a continuous suite fo stepIds and the identifiers don't need to be sorted.

Basic call example

import pandas as pd
from pycroaktools.workflow.workflow import Workflow
workflow = Workflow(pd.read_csv('workflow.csv'), 'myWorkflow') #read_csv may be replaced by read_excel
paths = workflow.getAllPaths()
for path in paths:
    for step in path:
        print(step.stepId)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pySimpleWorkflow-0.4.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pySimpleWorkflow-0.4-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file pySimpleWorkflow-0.4.tar.gz.

File metadata

  • Download URL: pySimpleWorkflow-0.4.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.8

File hashes

Hashes for pySimpleWorkflow-0.4.tar.gz
Algorithm Hash digest
SHA256 8084f016650c7b0529269b29f7a9fe0fa055c00bfae617b9603b7a62057f3619
MD5 4d37e48b2dd4639af54bf5d3654d87f2
BLAKE2b-256 6d8ee6606430801209251b9e23eb1ef39888c0438772021b01a1fed9c0f25058

See more details on using hashes here.

File details

Details for the file pySimpleWorkflow-0.4-py3-none-any.whl.

File metadata

  • Download URL: pySimpleWorkflow-0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.8

File hashes

Hashes for pySimpleWorkflow-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4e13767b9ffa994a0d00200d160d715a15507bee6bdf89b7f088fc3e94491220
MD5 4c323a677d9422fda2c84c81edd53a4a
BLAKE2b-256 51540169fc9ea3cd8c2ca93f5e42a8bfdf477afeb2f1a8664695a3ac6e11de4a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page