Skip to content

Commit

Permalink
Merge pull request #2284 from fetchai/fix/2090
Browse files Browse the repository at this point in the history
Remove CLI GUI
  • Loading branch information
DavidMinarsch authored Feb 23, 2021
2 parents 29b8dee + e18d280 commit d84735a
Show file tree
Hide file tree
Showing 44 changed files with 24 additions and 3,602 deletions.
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ disable=C0103,C0201,C0301,C0302,C0330,W0105,W0107,W0707,W1202,W1203,R0801
# R0801: similar lines, # too granular

[IMPORTS]
ignored-modules=aiohttp,defusedxml,gym,fetch,matplotlib,memory_profiler,numpy,oef,openapi_core,psutil,tensorflow,temper,skimage,vyper,web3,aioprometheus
ignored-modules=bech32,ecdsa,lru,eth_typing,eth_keys,eth_account,ipfshttpclient,werkzeug,openapi_spec_validator,aiohttp,yoti_python_sdk,defusedxml,gym,fetch,matplotlib,memory_profiler,numpy,oef,openapi_core,psutil,tensorflow,temper,skimage,vyper,web3,aioprometheus

[DESIGN]
min-public-methods=1
Expand Down
32 changes: 0 additions & 32 deletions aea/cli/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@
from aea.cli.transfer import transfer
from aea.cli.upgrade import upgrade
from aea.cli.utils.click_utils import registry_path_option
from aea.cli.utils.config import get_or_create_cli_config
from aea.cli.utils.constants import AUTHOR_KEY
from aea.cli.utils.context import Context
from aea.cli.utils.loggers import logger, simple_verbosity_option
from aea.helpers.win32 import enable_ctrl_c_support
Expand Down Expand Up @@ -96,36 +94,6 @@ def cli(
enable_ctrl_c_support()


@cli.command()
@click.option("-p", "--port", default=8080)
@click.option("--local", is_flag=True, help="For using local folder.")
@click.pass_context
def gui( # pylint: disable=unused-argument
click_context: click.Context, port: int, local: bool
) -> None: # pragma: no cover
"""Run the CLI GUI."""
_init_gui()
import aea.cli_gui # pylint: disable=import-outside-toplevel,redefined-outer-name

click.echo("Running the GUI.....(press Ctrl+C to exit)")
aea.cli_gui.run(port)


def _init_gui() -> None:
"""
Initialize GUI before start.
:return: None
:raisees: ClickException if author is not set up.
"""
config_ = get_or_create_cli_config()
author = config_.get(AUTHOR_KEY, None)
if author is None:
raise click.ClickException(
"Author is not set up. Please run 'aea init' and then restart."
)


cli.add_command(_list)
cli.add_command(add_key)
cli.add_command(add)
Expand Down
Loading

0 comments on commit d84735a

Please sign in to comment.