UTNAK / kepler16b-using-imce-vocabulary

Forked from a demo project for the openCAESAR platform
http://opencaesar.github.io/kepler16b-example/
0 stars 0 forks source link

Feat/20 demonstration of jupyter notebook as an analysis engine #21

Closed UTNAK closed 4 weeks ago

UTNAK commented 1 month ago

Checklist before submitting a merge request

Description of contribution

I have built a Jupyter notebook that has a similar function to analysisShell.

Testing performed

How to Test Expected functionality changes

  1. Open 'src/analysis/analysisShell.ipynb'
  2. On terminal, send commands
    • conda init
    • CLOSE shells
    • conda activate py39
  3. From command pallet, python select interpreter -> `py39
    • sometimes, py39 doesn't appear. please click reload of command pallet
  4. In jupyter notebook, Select Python Kernel to appropriate environment in this simulation. (normally, py39 created by .sh)
  5. Using OML Vision or terminal, Run Build and Run Load ( .sh also include these commands, no need to run normally)
  6. Following the script in Jupyter Notebook, run all cells.
  7. Using OML Vision or terminal, Run Save
  8. Verify the oml description file src/oml/example.com/tutorial2/description/statedictionary.oml is updated.
image

Additional context

[If needed, you may add additional context]

UTNAK commented 1 month ago

I have tested using r2u but failed to install "tidyverse". so reverting to ghcr.io/rocker-org/devcontainer-features/r-rig:1

UTNAK commented 1 month ago

I have tested on github codespace and found some issues.

  1. In Setup R section, loading igraph package failed ( FIXED)

Error: package or namespace load failed for ‘igraph’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/home/vscode/R/x86_64-pc-linux-gnu-library/4.3/igraph/libs/igraph.so': libglpk.so.40: cannot open shared object file: No such file or directory

--> I have added below commands to .sh file

## Install libglpk40 package in the terminal for igraph
sudo apt-get update
sudo apt install -y libglpk40

## Fix libstdc++.so.6 for Quarto + Reticulate
cd /opt/conda/envs/py39/lib/
sudo cp libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6
  1. I have added ./gradlew buil and owlLoad in post-create.sh and it works well now.

  2. I have added post-create.sh instead of manually configure environment using SetUpEnvironment.qmd. It's better to remove this file and using automation to create environment by .sh file at postCreateCommand

Now, I can run the jupyter notebook in github codespace!