Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update create_cli.py #1

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions ersilia/cli/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ def clear(self):
def close(self):
m = importlib.import_module("ersilia.cli.commands.close")
m.close_cmd()

def current(self):
m = importlib.import_module("ersilia.cli.commands.current")
m.current_cmd()


def delete(self):
m = importlib.import_module("ersilia.cli.commands.delete")
m.delete_cmd()
Expand Down Expand Up @@ -75,4 +71,4 @@ def test(self):

def inspect(self):
m = importlib.import_module("ersilia.cli.commands.inspect")
m.inspect_cmd()
m.inspect_cmd()
20 changes: 3 additions & 17 deletions ersilia/cli/commands/current.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
from . import ersilia_cli
from .. import echo
from ...core.session import Session


def current_cmd():
@ersilia_cli.command(
short_help="Get identifier of current model",
help="Get identifier of currently served model",
)
def current():
session = Session(config_json=None)
model_id = session.current_model_id()
if model_id is not None:
echo("Current model identifier: {0}".format(model_id), fg="blue")
else:
echo("No model is current served...", fg="yellow")
#from . import ersilia_cli
#from .. import echo
#from ...core.session import Session
1 change: 0 additions & 1 deletion ersilia/cli/create_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def create_ersilia_cli():
cmd.catalog()
cmd.clear()
cmd.close()
cmd.current()
cmd.delete()
cmd.example()
cmd.fetch()
Expand Down