Voilà template for Materials Cloud
This is the Voilà template for Materials Cloud, implements the standard header and CSS.
Three templates are provided:
materialscloud-tool- highlights the WORK/Tools section in the header/breadcrumbs.materialscloud-discover- highlights the DISCOVER section in the header/breadcrumbs.materialscloud-iframe- just adds a simple "Hosted on Materials Cloud" note at the bottom.
Installation
pip install voila-materialscloud-template
This installs the templates in the correct Jupyter path (using copy_voila_template.py).
Usage
The main way is to use the voila --template option, e.g.:
voila --template=materialscloud-tool example.ipynb
Alternatively, you can write a voila.json file containing
{
"VoilaConfiguration": {
"template": "materialscloud-tool"
},
...
}
and passing its path with
voila --Voila.config_file_paths=<...> example.ipynb
There are also other options, see the Voilà documentation for more information.
Development
Option 1:
pip install -e .[dev]
Note: this will copy the templates to the jupyter folder, and they need to be modified directly there or re-copied for changes to take effect.
Option 2:
It's more convenient to use a docker container and rebuild after modification:
cd docker
docker compose up --build
and access via http://localhost:8866/. The template and other voila configuration is specified in voila.json.
Note: maybe there is an easier setup, e.g. with live-reload or similar.
Making a new release
To release a new version, just make a new release on Github with the correct version tag, without updating any versions manually. This will start the GitHub action that will
- update version numbers in the repo and commits it;
- tags this new commit with the version, overwriting the tag that was made by the Github release;
- pushes commit & tag to Github;
- publishes new version on PYPI.
License
This repository and all files in it are licensed under the BSD license, copyright (c) by Voilà contributors.
Metadata
Release files for voila-materialscloud-template 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| voila_materialscloud_template-0.4.3.tar.gz | 445.6 kB | Details |
Release files / voila_materialscloud_template-0.4.3.tar.gz
| Download URL | voila_materialscloud_template-0.4.3.tar.gz |
|---|---|
| Size | 445.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc1b4ed7705096822e49db587dc56594534506730bd80d3080576f81e8346917
|
|
BLAKE2b-256 checksum How to use checksums |
990c33f0b3f82e8b50db7218e2a1b8865542481af2f0be6c7febd42aceaca835
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|