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

Test local icn3d instance #3

Open
CFGrote opened this issue Jul 13, 2022 · 3 comments
Open

Test local icn3d instance #3

CFGrote opened this issue Jul 13, 2022 · 3 comments

Comments

@CFGrote
Copy link
Collaborator

CFGrote commented Jul 13, 2022

Going through @digitaltodd 's instructions how to setup and run a local icn3d instance and taking notes

@CFGrote
Copy link
Collaborator Author

CFGrote commented Jul 13, 2022

Unpacking

I made the mistake to create a new subdirectory first, cd into that and unpack the zip file from here. Instead, it's important that the zip file is unpacked directly in the ImmunoZoo root directory.

unzip icn3d.zip

Instantiation with python

I ran

python -m http.server 8080 | python -m webbrowser 'http://localhost:8080/icn3d/?menuconfig=menu.json'

Expected to see the familiar icn3d site but only see my default browser start page.

Instead, I only start the server with

python -m http.server 8080 

and navigate to http://localhost/icn3d?menuconfig=menu.json which brings up the expected icn3d site.

@CFGrote
Copy link
Collaborator Author

CFGrote commented Jul 13, 2022

Editing the menu file.

Starting the server as I did above, takes the menu.json from the icn3d/ directory, not the one in the repository root dir, so I have to edit icn3d/menu.json, clear cache, reload http://localhost/icn3d?menuconfig=menu.json, to see the effect.

I'm attaching my menu.json here. I deactivated every menu item and only kept those that I used or looked into during the hackathon.

menu.json.txt

@CFGrote
Copy link
Collaborator Author

CFGrote commented Jul 13, 2022

Debugging

If the edited menu.json contains syntax errors (e.g. unmatched parentheses, invalid characters, ...), the site loads a default
menu. This may be confusing for the developer working on menu.json. Good advise is to have the browser's log console open and filter for "menu", see attached screenshot

image

There's an unmatched parenthesis on the highlighted line in the editor window which causes an exception when the site loads the menu file. The Color menu should only show "UniColor" (everything else set to '0' in menu.json) but shows all default menu items instead. The console shows the error message but it does not point to menu.json, so beware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant