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

SwissDataScienceCenter / renku-python / 5529030370

pending completion
5529030370

push

github-actions

Ralf Grubenmann
fix docker build, pin versions

24252 of 28479 relevant lines covered (85.16%)

2.95 hits per line

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

33.33
/renku/ui/cli/env.py
1
# -*- coding: utf-8 -*-
2
#
3
# Copyright 2018-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 environment related commands."""
6✔
19

20
import click
6✔
21

22

23
@click.command()
6✔
24
@click.option("shell_completion", "--shell-completion", is_flag=True, help="Print shell completion command")
6✔
25
@click.pass_context
6✔
26
def env(ctx, shell_completion):
6✔
27
    """Renku environment commands."""
28

29
    if shell_completion:
×
30
        import shellingham
×
31

32
        from renku.core.errors import UsageError
×
33

34
        shell = shellingham.detect_shell()[0]
×
35
        if shell == "bash":
×
36
            click.echo("_RENKU_COMPLETE=bash_source renku")
×
37
        elif shell == "zsh":
×
38
            click.echo("_RENKU_COMPLETE=zsh_source renku")
×
39
        elif shell == "fish":
×
40
            click.echo("env _RENKU_COMPLETE=fish_source renku")
×
41
        else:
42
            raise UsageError(f"The currently used shell '{shell}' is not supported for shell completion.")
×
43
    else:
44
        click.echo(ctx.get_help())
×
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

© 2025 Coveralls, Inc