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

SwissDataScienceCenter / renku-python / 5948282216

23 Aug 2023 07:22AM UTC coverage: 43.128% (-42.8%) from 85.902%
5948282216

push

github-actions

Ralf Grubenmann
fix(service): remove doctor check from cache.migrations_check (#3597)

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

10566 existing lines in 224 files now uncovered.

10524 of 24402 relevant lines covered (43.13%)

0.43 hits per line

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

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

19

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

36

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

41

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

46

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

51

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

56

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

63

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

68

69
def export_workflow_command():
1✔
70
    """Command that exports a workflow into a given format."""
UNCOV
71
    return Command().command(export_workflow).require_migration().with_database(write=False)
×
72

73

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

78

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

83

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

93

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

98

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

108

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