Skip to content

Commit 5df3812

Browse files
PhillipDowneyPhil Downey
andauthored
Oct mid 24 (#71)
* fix help generation as last merge excluded fixes * \r return character no longer catered for in output impacting help * added desc to support bug fix floating number parameters * molecules @ property retrieval bug from last commit * refactor broke @ molecules, reinstated identifiers and and removed output text formatting of synonyms * support openad bmfm demo * version update * formatting black --------- Co-authored-by: Phil Downey <phildowney@pd-work-mac.local>
1 parent 607d680 commit 5df3812

18 files changed

Lines changed: 140 additions & 55 deletions

openad/app/magic/openad_magic.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def openad(self, line, cell=None, local_ns=None):
7171
result = strip_leading_blanks(result)
7272
result = result.replace("<br>", "\n")
7373

74-
# MAJOR-RELEASE-TODO: display function should never return data
7574
return result
7675

7776
@needs_local_scope
@@ -98,8 +97,8 @@ def openadd(self, line, cell=None, local_ns=None):
9897
# MAJOR-RELEASE-TODO: data function should never display
9998
if isinstance(result, Styler):
10099
result = result.data
101-
if isinstance(result, str):
102-
display(Markdown(result))
100+
# if isinstance(result, str):
101+
# display(Markdown(result))
103102
return result
104103

105104

openad/app/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,10 @@ def default(self, line):
652652
# print("------------------------------")
653653
y = self.current_statement_defs.parseString(convert(inp), parseAll=True)
654654
x = lang_parse(self, y)
655+
if GLOBAL_SETTINGS["grammar_refresh"]:
656+
create_statements(self)
657+
GLOBAL_SETTINGS["grammar_refresh"] = False
658+
655659
self.prompt = refresh_prompt(self.settings)
656660
MEMORY.before_command()
657661
except Exception as err1: # pylint: disable=broad-exception-caught # error could be unknown

openad/app/main_lib.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,16 +259,12 @@ def lang_parse(cmd_pointer, parser):
259259
elif parser.getName() == "show_molecules":
260260
return show_molecules(cmd_pointer, parser)
261261
elif parser.getName() == "save_molecules_DEPRECATED":
262-
# MAJOR-RELEASE-TODO: Remove this, this is deprecated functionality
263262
return save_molecules_DEPRECATED(cmd_pointer, parser)
264263
elif parser.getName() == "load_molecules_DEPRECATED":
265-
# MAJOR-RELEASE-TODO: Remove this, this is deprecated functionality
266264
return load_molecules_DEPRECATED(cmd_pointer, parser)
267265
elif parser.getName() == "merge_molecules_DEPRECATED":
268-
# MAJOR-RELEASE-TODO: Remove this, this is deprecated functionality
269266
return merge_molecules_DEPRECATED(cmd_pointer, parser)
270267
elif parser.getName() == "list_molecule_sets_DEPRECATED":
271-
# MAJOR-RELEASE-TODO: Remove this, this is deprecated functionality
272268
return display_molsets_DEPRECATED(cmd_pointer, parser)
273269
elif parser.getName() == "enrich_mws_with_analysis":
274270
return enrich_mws_with_analysis(cmd_pointer, parser)

openad/app/metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"banner": "OPENAD",
33
"title": "Welcome to the Open Accelerated Discovery CLI",
4-
"version": "0.6.1",
4+
"version": "0.6.2",
55
"commands": {
66
"intro": "If this is your first time, let us help you getting started.",
77
"? toolkits": "Learn about the toolkits.",
@@ -10,4 +10,4 @@
1010
"? <soft>...</soft>": "List commands containing \"...\"",
1111
"docs": "Read the docs in your browser."
1212
}
13-
}
13+
}

openad/core/grammar.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ def field_list_act(toks):
159159
grammar_help = [] # Help text
160160

161161

162-
# Add molecule grammar
163-
smol_grammar_add(statements=statements, grammar_help=grammar_help)
162+
# Add molecule grammar (moved to refresh zone)
163+
# smol_grammar_add(statements=statements, grammar_help=grammar_help)
164164

165165
# Add protein grammar
166166
mmol_grammar_add(statements=statements, grammar_help=grammar_help)
@@ -993,8 +993,10 @@ def create_statements(cmd_pointer):
993993
temp_help = []
994994

995995
service_grammar_add(statements=cmd_pointer.current_statements, help=temp_help, service_catalog=service_catalog)
996+
smol_grammar_add(statements=cmd_pointer.current_statements, grammar_help=temp_help)
996997

997998
# cmd_pointer.current_statements.extend(service_statements)
999+
9981000
cmd_pointer.current_help.help_model_services.clear()
9991001
cmd_pointer.current_help.help_model_services.extend(temp_help)
10001002
cmd_pointer.current_help.reset_help()
362 KB
Loading
1.07 MB
Loading
241 KB
Loading
726 KB
Loading
161 KB
Loading

0 commit comments

Comments
 (0)