Voilà template for Materials Cloud that implements the Materials Cloud header and CSS.
Project description
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 if new tests are required.
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.
License
This repository and all files in it are licensed under the BSD license, copyright (c) by Voilà contributors.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file voila_materialscloud_template-0.4.0.tar.gz
.
File metadata
- Download URL: voila_materialscloud_template-0.4.0.tar.gz
- Upload date:
- Size: 575.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c82eebce35699fac9497507523ce723aacef95f3b50dabbb5036bbc3881392e |
|
MD5 | 1c204940426e32827be2ca842c696ccf |
|
BLAKE2b-256 | 0ac8ba38ebf2a7b84827f49af4626ab3fe4ecfe0bcac4e47f9b2307eca8aafae |
File details
Details for the file voila_materialscloud_template-0.4.0-py2.py3-none-any.whl
.
File metadata
- Download URL: voila_materialscloud_template-0.4.0-py2.py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e38b35e1462c786ddfc9ddb9009b192dc1001c3e321d9322eb35eecb6fe9d92 |
|
MD5 | 3d2d4b14b228852368eb7d5a3c9c484b |
|
BLAKE2b-256 | 21c9a8dff1560a0c9d122c999b69eccc65439cc0927dd05a5e39e1c92c119898 |