Skip to content

Commit 75d3035

Browse files
themoenenMoenen ErbuerPhil DowneyMoenen ErbuerPhillipDowney
authored
Updated documentation script (#62)
* Basic persistent GUI server prototype in separate thread * Added install and launch gui commands * gui api * gui api updates * Added GUI api endpoints * Remove openad-gui files from git * stash * stash laptop * demo prototype * stash * switch workspace GUI API * Added hydrogen atoms to 3d coordinates data * Websocket experiment * created filesystem worker and refactored 'list files' command to use the same method as the GUI api, plus added optional path parameter * Refactored fs_get_file and fs_get_workspace files to follow similar data structure and moved fileType logic to backend * stash * Before removing index_only functionality from get_molset() * Indexing done right wip * Stash * stash before refactoring molset fs/cache reading * sdf processing + api refactor * added 'enriched' parameter to molecule object * fixed list files * Removed old messy molecule API functions * implemented reverse sort * Support for invalid file paths and smiles in .smi files * stash * various * cleanup & debugging * Mega commit regarding persistent GUI updates * RXN login error message update * updated grammar in models to allow auth_group and service name without quotes * Merged conflicts #2 * fix for unspported PDF viewing * changed host for flask apps to 0.0.0.0 * changed host for flask apps to 0.0.0.0 port 5005 starter * cleaned up molecules * adding auth group to catalog model service * adding auth group to catalog model service * fix opena api session management * fix openad rxn api session management * fix openad rxn api session management * fix openad rxn api session management * fix openad rxn api session management * fix openad rxn api session management * fix openad rxn api session management * fix openad rxn api session management * fix openad rxn api session management * fix openad rxn api session management * fix openad rxn api session management * fix openad rxn api session management * fix openad rxn api session management * fine tune jupyter install * install update * install update * install update * fix openad rxn api session management * fix openad rxn api session management * Added command to show working set molecules * stash * Added openad-gui build folder * stash show_molset * Moved openad-gui folder inside openad folder so it is part of pip install, renamed to gui-build * Added gui-build folder * Move to port 0.0.0.0 * New place for the gui-build dir, updated to latest version * show molset command + updated gui launch/shutdown messages * Centralized duplicate normalize_mol_df and _smiles_to_iupac functions into mol_functions * mymols fix * debugged dataviewer display and updated notebooks * debugged dataviewer display and updated notebooks * enabled append for loading molecules * First step for command * Remove icloud duplicate files * formatting and fox new_molecule bug * merge properties bug * gui notebook and readme * markdown test * readme & gui demo * gui readme update * stash * Support for display molecules from a dataframe * stash * prox server major upgrade and debug visuals * prox server major upgrade and debug visuals * prox server major upgrade and debug visuals * stash * Undid renaming gui-build to gui-build-proxy * paths for routes * acheived build * merge conflicts mergibg with gui_api_moe #2 * Merge conflicts #3 * Merge wrapup * Simplified/cleaned up JL_PROXY proxy code in gui_launcher * Demo Notebook design * patch launcher * notebook updates * stash * gui-build & gui-build-proxy wip * Updated gui build folders * Updated gui build folders * stash * initial chemchat branch * retrieving based on name before smils) * turn spinner off models gen for api * API IMPROVEMENTS * API IMPROVEMENTS * stash * Update readme * Update readme 1 * Update readme 2 * Update readme 3 * Update readme * Update readme * Update readme * Update readme * Update readme * Update readme * jupyter lab config sensing * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * Update readme * Update readme * Update readme * Update readme * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * update for continer proxy base_url * ollama fix * ollama fix * ollama fix * update for continer proxy base_url * demo update * demo update * debug set context * debug set context * debug set context * debug set context * debug set context * debug set context * debug set context * debug set context * debug set context * debug set context * debug set context * debug set context * debug set context * debug set context * debug set context * Update readme * Update readme * Update readme * Update readme * Update readme * Update readme * Update readme * Update readme * Update readme * Update readme * Update readme * Update readme * Update readme * Update readme * Updated Notebook 'Common_Client_Intro.ipynb' * Updated Notebook 'Common_Client_Intro.ipynb' #2 * Updated readme * Updated readme * Updated readme * Updated readme * Updated readme * Updated readme * Updated readme * Updated readme * add remove * cross origin for flask apps * cross origin for flask apps * cross origin for flask apps * cross origin for flask apps * api decode info (#58) (#59) * api decode info * chore: lint Co-authored-by: Brian Duenas <brian.duenas@ibm.com> * reinstate commented out notebook line for importing molecules * Fixed dataviewer submit with proxy url * static data viewer * Refactored doc generation + added auto-copy function to openad-docs repo * Intro command will now also source the text from the docs folder, centralizing all documentation to a single source of truth * Docs readme * Docs readme * Docs readme * Docs readme * Docs readme * Docs readme * Docs readme * fix merge batch and doco * update version * update version * formatting with lint * Fixed display run header rendering issue * Removed superfluous old gui-build-proxy files * Fixed command in Jupyter * Removed banner.css which wasn't used * Fixed notebook header layout issue ion wide screen, added remove run command * Cleanup * Removed trash * Removed trash * docs now also update main README.md file * Updated documentation * README.md now updated by documentation script + Analysis included in mol viewer * Updated * Removed gui-build and gui-build-proxy to overcome merge conflicts with main * Restore gui-build folders from main to avoid conflicts * Remove logger --------- Co-authored-by: Moenen Erbuer <moenen@arthur.io> Co-authored-by: Phil Downey <phildowney@pd-work-mac.local> Co-authored-by: Moenen Erbuer <themoenen@Moenens-MacBook-Pro.local> Co-authored-by: Phil Downey <Phil.downey1@ibm.com> Co-authored-by: Brian Duenas <brian.duenas@ibm.com>
1 parent cafe469 commit 75d3035

8 files changed

Lines changed: 56 additions & 12 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ for (var i=0; i< urls.length; i++) {
3737

3838
OpenAD is an open-source framework for molecular and materials discovery developed by IBM Research.
3939

40-
The OpenAD client is accessible from a command line interface, Jupyter Notebook and an API. It provides unified access to a variety of tools and AI models for literature knowledge extraction, synthesis prediction (forward and retro-), generative methods and property inference. You can train models on your own data as well as visualize and filter candidate molecules.
40+
The OpenAD client is accessible from a command line interface, Jupyter Notebook and an API. It provides unified access to a variety of tools and AI models for literature knowledge extraction, forward and retrosynthesis prediction, generative methods and property inference. You can train models on your own data as well as visualize and filter candidate molecules.
4141

4242
<!-- /description -->
4343

@@ -336,7 +336,7 @@ Before you can interact with the toolkits, you'll need to register with each ind
336336
- Once logged in, click the Toolkit/API icon in the top right hand corner, then open the HTTP section
337337
- Click the "Generate new API key" button<br>
338338
<br>
339-
<!-- ![Landing](assets/ds4sd-api-key.png) -->
339+
<!-- ![Landing](assets/ds4sd-api-key.png) -->
340340
<a href="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/ds4sd-api-key.png" target="_blank"><img src="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/ds4sd-api-key.png" /></a>
341341
342342
1. Once inside the OpenAD client, you'll be prompted to authenticate when activating the Deep Search (DS4SD) toolkit. When running `set context ds4sd` :
@@ -361,7 +361,7 @@ Before you can interact with the toolkits, you'll need to register with each ind
361361
- Sign up for an RXN account at [rxn.app.accelerate.science](https://rxn.app.accelerate.science)
362362
- Obtain your API key by clicking the user profile icon in the top right hand corner and select "My profile".<br>
363363
<br>
364-
<!-- ![Landing](assets/rxn-api-key.png) -->
364+
<!-- ![Landing](assets/rxn-api-key.png) -->
365365
<a href="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/rxn-api-key.png" target="_blank"><img src="https://raw.githubusercontent.com/acceleratedscience/open-ad-toolkit/main/assets/rxn-api-key.png" /></a>
366366
367367
1. When setting the context to RXN using `set context rxn` you'll be prompted to create a new auth configuration file:

docs/generate_docs.py

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,45 @@
4444
"-->"
4545
)
4646

47+
# endregion
48+
49+
############################################################
50+
# region - README.md
51+
52+
53+
# Replace the description in the main README.md file.
54+
def update_readme_md(filename):
55+
output_text("<h1>Updating <yellow>README.md</yellow> with OpenAD description</h1>", pad_top=2)
56+
57+
# Read README.md input content
58+
readme_md, err_msg = open_file("README.md", return_err=True)
59+
if not readme_md:
60+
output_text(FLAG_ERROR, pad_top=1)
61+
output_error(err_msg)
62+
return
63+
64+
# Read description file input content
65+
description_txt, err_msg = open_file("docs/source/description.txt", return_err=True)
66+
if not description_txt:
67+
output_text(FLAG_ERROR, pad_top=1)
68+
output_error(err_msg)
69+
return
70+
71+
# Insert description
72+
readme_md_1 = readme_md.split("<!-- description -->")[0]
73+
readme_md_2 = readme_md.split("<!-- /description -->")[1]
74+
readme_md = readme_md_1 + "<!-- description -->\n\n" + description_txt + "\n\n<!-- /description -->" + readme_md_2
75+
76+
# Write to output file
77+
success, err_msg = write_file(filename, readme_md, return_err=True)
78+
if success:
79+
output_text(FLAG_SUCCESS)
80+
output_text(f"<soft>Updated</soft> <reset>{filename}</reset>")
81+
else:
82+
output_text(FLAG_ERROR)
83+
output_error(err_msg, pad=0)
84+
85+
4786
# endregion
4887

4988
############################################################
@@ -475,7 +514,10 @@ def _compile_commands(cmds_organized):
475514
############################################################
476515

477516
if __name__ == "__main__":
478-
# Render files
517+
# Update main README.md
518+
update_readme_md("README.md")
519+
520+
# Render markdown files for documentation website
479521
render_index_md("index.md")
480522
render_installation_md("installation.md")
481523
render_base_concepts_md("base-concepts.md")

docs/output/markdown/base-concepts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ https://github.com/acceleratedscience/open-ad-toolkit/tree/main/docs
2020

2121
Your workspace represents an isolated environment where your molecules, molecule sets and other files related to your research are stored.
2222

23-
You can have as many workspaces as needed, allowing you to work on multiple isolated projects. Each workspace has its own command history and corresponds with a directory stored in ~/openad/workspaces. OpenAD comes loaded with a default workspace called 'default'.
23+
Each workspace has its own command history and corresponds with a directory stored in ~/openad/workspaces, allowing you to work on multiple isolated projects at once. OpenAD comes loaded with a default workspace called 'default', and you can create as many additional workspaces as needed.
2424

2525
To see how to work with workspaces:
2626

2727
? workspace
2828

2929
## Plugins
3030

31-
The OpenAD client is an interface to interact with a variety of molecular tools and AI models, which are exposed through plugins. Thanks to a unified language, accessing these tools through OpenAD lets you bypass a lot of complexity.
31+
Plugins are the way molecular tools and AI models are made available to the OpenAD client. Thanks to a unified language, accessing these tools through OpenAD lets you bypass a lot of complexity.
3232

3333
OpenAD comes preloaded with a number of plugins for literature knowledge extraction (DS4SD), forward and retrosynthesis prediction (RXN) as well as generative methods and property inference (GT4SD).
3434

@@ -42,7 +42,7 @@ To see how to work with plugins:
4242

4343
## Context
4444

45-
In order to interact with any plugin, you first need to set the context to that plugin. This will make all commands for the plugin available.
45+
Your context defines what plugin you are currently working with. It ensures you are logged onto the a plugin's corresponding system and all the related functionality is loaded.
4646

4747
To see how to switch contexts:
4848

docs/source/about_context.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
In order to interact with any plugin, you first need to set the context to that plugin. This will make all commands for the plugin available.
1+
Your context defines what plugin you are currently working with. It ensures you are logged onto the a plugin's corresponding system and all the related functionality is loaded.

docs/source/about_plugin.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The OpenAD client is an interface to interact with a variety of molecular tools and AI models, which are exposed through plugins. Thanks to a unified language, accessing these tools through OpenAD lets you bypass a lot of complexity.
1+
Plugins are the way molecular tools and AI models are made available to the OpenAD client. Thanks to a unified language, accessing these tools through OpenAD lets you bypass a lot of complexity.
22

33
OpenAD comes preloaded with a number of plugins for literature knowledge extraction (DS4SD), forward and retrosynthesis prediction (RXN) as well as generative methods and property inference (GT4SD).
44

docs/source/about_workspace.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Your workspace represents an isolated environment where your molecules, molecule sets and other files related to your research are stored.
22

3-
You can have as many workspaces as needed, allowing you to work on multiple isolated projects. Each workspace has its own command history and corresponds with a directory stored in ~/openad/workspaces. OpenAD comes loaded with a default workspace called 'default'.
3+
Each workspace has its own command history and corresponds with a directory stored in ~/openad/workspaces, allowing you to work on multiple isolated projects at once. OpenAD comes loaded with a default workspace called 'default', and you can create as many additional workspaces as needed.

openad/gui/api/molecules_api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ def get_mol_data(self):
6767
response.status = "No identifier provided."
6868
return response
6969

70-
mol = retrieve_mol(identifier)
70+
mol = retrieve_mol_from_list(self.cmd_pointer, identifier)
71+
if mol is None:
72+
mol = retrieve_mol(identifier)
7173

7274
# Fail
7375
if not mol:

openad/notebooks/Demonstration.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@
10331033
"name": "python",
10341034
"nbconvert_exporter": "python",
10351035
"pygments_lexer": "ipython3",
1036-
"version": "3.11.7"
1036+
"version": "3.10.14"
10371037
}
10381038
},
10391039
"nbformat": 4,

0 commit comments

Comments
 (0)