Skip to content

Commit

Permalink
temporarily disable the CLI
Browse files Browse the repository at this point in the history
bump version to 0.1.0a1
  • Loading branch information
shadeofblue committed Feb 19, 2023
1 parent 385cab6 commit 368d72f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
53 changes: 27 additions & 26 deletions dapp_manager/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
import click

from dapp_manager import DappManager
from dapp_manager.autocomplete import install_autocomplete
from dapp_manager.exceptions import DappManagerException
from dapp_manager.storage import RunnerReadFileType

# from dapp_manager.autocomplete import install_autocomplete


def _app_id_autocomplete(_ctx, _param, incomplete):
return [app_id for app_id in DappManager.list() if app_id.startswith(incomplete)]


def _with_app_id(wrapped_func):
wrapped_func = click.argument("app-id", type=str, shell_complete=_app_id_autocomplete)(
wrapped_func = click.argument("app-id", type=str)( # shell_complete=_app_id_autocomplete)(
wrapped_func
)
return wrapped_func
Expand Down Expand Up @@ -165,27 +166,27 @@ def read(app_id: str, file_type: RunnerReadFileType, ensure_alive: bool, follow:
print(dapp.read_file(file_type, ensure_alive=ensure_alive))


@cli.command()
@click.argument("shell", type=click.Choice(["bash", "fish", "zsh"]))
@click.option(
"--path",
"-p",
type=Path,
default=None,
help="Path to the file to which the shell completion function should be added.",
)
def autocomplete(shell: str, path: Path):
"""Enable CLI shell completion for the given shell.
This command works by appending a pre-defined piece of shell code to the user's shell
configuration file.
The default target file will depend on the selected shell type (bash, fish or zsh):
- bash: `~/.bashrc`
- fish: `~/.config/fish/completions/{script_name}.fish`
- zsh: `~/.zshrc`
Use the `--path` flag to override the default target file.
The command does nothing if the target file already contains the completion code.
"""
install_autocomplete(shell, path)
# @cli.command()
# @click.argument("shell", type=click.Choice(["bash", "fish", "zsh"]))
# @click.option(
# "--path",
# "-p",
# type=Path,
# default=None,
# help="Path to the file to which the shell completion function should be added.",
# )
# def autocomplete(shell: str, path: Path):
# """Enable CLI shell completion for the given shell.
#
# This command works by appending a pre-defined piece of shell code to the user's shell
# configuration file.
#
# The default target file will depend on the selected shell type (bash, fish or zsh):
# - bash: `~/.bashrc`
# - fish: `~/.config/fish/completions/{script_name}.fish`
# - zsh: `~/.zshrc`
# Use the `--path` flag to override the default target file.
#
# The command does nothing if the target file already contains the completion code.
# """
# install_autocomplete(shell, path)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dapp-manager"
version = "0.1.0a0"
version = "0.1.0a1"
description = "Golem dapp-manager - run decetralized apps on the Golem Network using a 'docker-compose'-like interface"
authors = ["Golem Factory <[email protected]>"]
license = "LGPL-3.0"
Expand Down

0 comments on commit 368d72f

Please sign in to comment.