• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SwissDataScienceCenter / renku-python / 4182482698

pending completion
4182482698

Pull #3320

github-actions

GitHub
Merge 26747a6e8 into 0e5906373
Pull Request #3320: chore: fix coveralls comments

20751 of 28900 relevant lines covered (71.8%)

2.47 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

61.54
/renku/command/workflow.py
1
# -*- coding: utf-8 -*-
2
#
3
# Copyright 2017-2022 - Swiss Data Science Center (SDSC)
4
# A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
5
# Eidgenössische Technische Hochschule Zürich (ETHZ).
6
#
7
# Licensed under the Apache License, Version 2.0 (the "License");
8
# you may not use this file except in compliance with the License.
9
# You may obtain a copy of the License at
10
#
11
#     http://www.apache.org/licenses/LICENSE-2.0
12
#
13
# Unless required by applicable law or agreed to in writing, software
14
# distributed under the License is distributed on an "AS IS" BASIS,
15
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
# See the License for the specific language governing permissions and
17
# limitations under the License.
18
"""Renku workflow commands."""
5✔
19

20

21
from renku.command.command_builder.command import Command
5✔
22
from renku.core.workflow.activity import revert_activity
5✔
23
from renku.core.workflow.execute import execute_workflow, iterate_workflow
5✔
24
from renku.core.workflow.plan import (
5✔
25
    compose_workflow,
26
    edit_workflow,
27
    export_workflow,
28
    list_workflows,
29
    remove_plan,
30
    search_workflows,
31
    show_workflow,
32
    visualize_graph,
33
    workflow_inputs,
34
    workflow_outputs,
35
)
36

37

38
def search_workflows_command():
5✔
39
    """Command to get all the workflows whose Plan.name are greater than or equal to the given name."""
40
    return Command().command(search_workflows).require_migration().with_database(write=False)
×
41

42

43
def list_workflows_command():
5✔
44
    """Command to list or manage workflows with subcommands."""
45
    return Command().command(list_workflows).require_migration().with_database(write=False)
×
46

47

48
def remove_plan_command():
5✔
49
    """Command that removes the workflow named <name>."""
50
    return Command().command(remove_plan).require_clean().with_database(write=True).with_commit()
1✔
51

52

53
def show_workflow_command():
5✔
54
    """Command that the details of a workflow."""
55
    return Command().command(show_workflow).require_migration().with_database(write=False)
1✔
56

57

58
def compose_workflow_command():
5✔
59
    """Command that creates a composite of several workflows."""
60
    return (
1✔
61
        Command().command(compose_workflow).require_migration().require_clean().with_database(write=True).with_commit()
62
    )
63

64

65
def edit_workflow_command():
5✔
66
    """Command that edits the properties of a given workflow."""
67
    return Command().command(edit_workflow).require_clean().with_database(write=True).with_commit()
×
68

69

70
def export_workflow_command():
5✔
71
    """Command that exports a workflow into a given format."""
72
    return Command().command(export_workflow).require_migration().with_database(write=False)
3✔
73

74

75
def workflow_inputs_command():
5✔
76
    """Command that shows inputs used by workflows."""
77
    return Command().command(workflow_inputs).require_migration().with_database(write=False)
2✔
78

79

80
def workflow_outputs_command():
5✔
81
    """Command that shows inputs used by workflows."""
82
    return Command().command(workflow_outputs).require_migration().with_database(write=False)
2✔
83

84

85
def execute_workflow_command(skip_metadata_update: bool):
5✔
86
    """Command that executes a workflow."""
87
    command = Command().command(execute_workflow).require_migration()
×
88
    if skip_metadata_update:
×
89
        command = command.with_database(write=False)
×
90
    else:
91
        command = command.with_database(write=True).with_commit()
×
92
    return command
×
93

94

95
def visualize_graph_command():
5✔
96
    """Execute the graph visualization command."""
97
    return Command().command(visualize_graph).require_migration().with_database(write=False)
×
98

99

100
def iterate_workflow_command(skip_metadata_update: bool):
5✔
101
    """Command that executes several workflows given a set of variables."""
102
    command = Command().command(iterate_workflow).require_migration().require_clean()
×
103
    if skip_metadata_update:
×
104
        command = command.with_database(write=False)
×
105
    else:
106
        command = command.with_database(write=True).with_commit()
×
107
    return command
×
108

109

110
def revert_activity_command():
5✔
111
    """Command that reverts an activity."""
112
    return (
×
113
        Command().command(revert_activity).require_migration().require_clean().with_database(write=True).with_commit()
114
    )
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc