Skip to content

Commit 03df114

Browse files
committed
Merge branch 'main' of github.com:ironArray/Caterva2
2 parents fe2f1f9 + 073028d commit 03df114

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

README-DEVELOPERS.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,28 @@ sphinx-build doc doc/html
103103
```
104104

105105
and the docs will appear in `doc/html`.
106+
107+
## Deploy latest wheels to GitHub Pages
108+
The CI workflow (`pages-build-deployment`) is set up to upload the latest wheels generated from the `main` branch to a website hosted by Github Pages (settings for the website can be modified [here](https://github.com/ironArray/Caterva2/settings/pages)). This allows one to use the latest version of Caterva2 directly in WASM (e.g. a browser-hosted Jupyter notebook) (or indeed the version of `blosc2` hosted on the `blosc2` GitHub Pages website) via the following code:
109+
```
110+
import sys
111+
if sys.platform == "emscripten":
112+
import requests
113+
import micropip
114+
115+
# Install latest blosc2
116+
blosc_latest_url = "https://blosc.github.io/python-blosc2/wheels/latest.txt"
117+
blosc_wheel_name = requests.get(blosc_latest_url).text.strip()
118+
blosc_wheel_url = f"https://blosc.github.io/python-blosc2/wheels/{blosc_wheel_name}"
119+
await micropip.install(blosc_wheel_url)
120+
print(f"Installed {blosc_wheel_name} successfully!")
121+
122+
# Install latest caterva2
123+
caterva_latest_url = "https://ironarray.github.io/Caterva2/wheels/latest.txt"
124+
caterva_wheel_name = requests.get(caterva_latest_url).text.strip()
125+
caterva_wheel_url = f"https://ironarray.github.io/Caterva2/wheels/{caterva_wheel_name}"
126+
await micropip.install(caterva_wheel_url)
127+
print(f"Installed {caterva_wheel_name} successfully!")
128+
```
129+
130+
This code is automatically loaded into jupyter notebooks via changes implemented in https://github.com/ironArray/Caterva2/commit/882d9fa930e573fdbc65d62b8dc90722670b8e9a.

0 commit comments

Comments
 (0)