Package: openvisuspy
OpenViSUS Visualization projectThe official OpenVisus C++ GitHub repository ishere.Install openvisuspyCreate a virtual environment. This step is optional, but best to avoid conflicts:for Linux/OS userspython3-mvenv.venvsource.venv/bin/activate
python3-mpipinstall--upgradepipFor windows usersdoskey python3=python $*
python3 -m venv .venv
.venv\Scripts\activate.bat
python3 -m pip install --upgrade pipInstall python packages, technically onlynumpyis stricly needed, but to access cloud storage and show dashboards/notebooks, you need additional packages too.python3-mpipinstallnumpyboto3xmltodictcolorcetrequestsscikit-imagematplotlibbokeh==3.1.1panel==1.3.6itkwidgets[all]pyvistavtkjupyterNext, install Openvisus packages.If youDO NOT NEED the OpenVisus viewer(or if you are in Windows WSL):python3-mpipinstall--upgradeOpenVisusNoGui==2.2.128
python3-mpipinstall--upgradeopenvisuspy==1.0.28if you ** DO NEED the OpenVisus viewer**:python3-mpipinstall--upgradeOpenVisus==2.2.128
python3-mOpenVisusconfigurepython3-mpipinstall--upgradeopenvisuspy==1.0.28Bokeh Dashboards# export BOKEH_ALLOW_WS_ORIGIN=*# export BOKEH_LOG_LEVEL=debug# export VISUS_CPP_VERBOSE=0# export VISUS_NETSERVICE_VERBOSE=0# export PYTHONPATH=./src;/projects/OpenVisus/build/RelWithDebInfopython-mbokehserve"examples/dashboards/app"--dev--args--dataset"https://atlantis.sci.utah.edu/mod_visus?dataset=david_subsampled&cached=arco"python-mbokehserve"examples/dashboards/app"--dev--args--dataset"https://atlantis.sci.utah.edu/mod_visus?dataset=2kbit1&cached=arco"Developers onlyDeploy new binariesUpdate thePROJECT_VERSIONinsidepyproject.toml# source .venv/bin/activate./scripts/new_tag.sh(EXPERIMENTAL) Pure Python BackendThis version may be used for cpython too in case you cannot install C++ OpenVisus (e.g., WebAssembly).Itwill not work with S3 cloud-storage blocks.Bokeh dashboards:python3 -m bokeh serve "examples/dashboards/app"  --dev --address localhost --port 8888 --args --py  --single
python3 -m bokeh serve "examples/dashboards/app"  --dev --address localhost --port 8888 --args --py  --multiPanel dashboards:python -m panel serve "examples/dashboards/app"  --dev --address localhost --port 8888 --args --py --single
python -m panel serve "examples/dashboards/app"  --dev --address localhost --port 8888 --args --py --multiJupyter notebooks:export VISUS_BACKEND=py
python3 -m jupyter notebook ./examples/notebooksDemosREMEMBER to resize the browswe  window,otherwise it will not work:https://scrgiorgio.it/david_subsampled.htmlhttps://scrgiorgio.it/2kbit1.htmlhttps://scrgiorgio.it/chess_zip.htmlDEVELOPERS notes:grep foropenvisuspy==andchange the version consistently.PyScriptServe local directoryexport VISUS_BACKEND=py
python3 examples/server.py --directory ./Open the urls in your Google Chrome browser:http://localhost:8000/examples/pyscript/index.htmlhttp://localhost:8000/examples/pyscript/2kbit1.htmlhttp://localhost:8000/examples/pyscript/chess_zip.htmlhttp://localhost:8000/examples/pyscript/david_subsampled.htmlJupyterLiteexport VISUS_BACKEND=py
ENV=/tmp/openvisuspy-lite-last
python3 -m venv ${ENV}
source ${ENV}/bin/activate

# Right now jupyter lite seems to build the output based on installed packages. 
# There should be other ways (e.g., JSON file or command line) for specifying packages, but for now creating a virtual env is good enough\
# you need to have exactly the same package version inside your jupyter notebook (see `12-jupyterlite.ipynb`)
python3 -m pip install \
    jupyterlite==0.1.0b20 pyviz_comms numpy pandas requests xmltodict xyzservices pyodide-http colorcet \
    https://cdn.holoviz.org/panel/0.14.3/dist/wheels/bokeh-2.4.3-py3-none-any.whl \
    panel==0.14.2 \
    openvisuspy==1.0.100 \
    jupyter_server 

rm -Rf ${ENV}/_output 
jupyter lite build --contents /mnt/c/projects/openvisuspy/examples/notebooks --output-dir ${ENV}/_output

# change port to avoid caching
PORT=14445
python3 -m http.server --directory ${ENV}/_output --bind localhost ${PORT}

# or serve
jupyter lite serve --contents ./examples/notebooks --output-dir ${ENV}/_output --port ${PORT} 

# copy the files somewhere for testing purpouse
rsync -arv ${ENV}/_output/* <username>@<hostname>:jupyterlite-demos/