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

SwissDataScienceCenter / renku-python / 9903255773

12 Jul 2024 06:06AM UTC coverage: 77.595% (-8.5%) from 86.128%
9903255773

Pull #3730

github

RenkuBot
chore: release v2.9.4
Pull Request #3730: chore: release v2.9.4

1 of 1 new or added line in 1 file covered. (100.0%)

2624 existing lines in 126 files now uncovered.

23855 of 30743 relevant lines covered (77.59%)

3.23 hits per line

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

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

18

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

35

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

40

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

45

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

50

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

55

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

62

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

67

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

72

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

77

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

82

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

92

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

97

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

107

108
def revert_activity_command():
5✔
109
    """Command that reverts an activity."""
UNCOV
110
    return (
×
111
        Command().command(revert_activity).require_migration().require_clean().with_database(write=True).with_commit()
112
    )
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