Skip to main content

Voilà template for Materials Cloud that implements the Materials Cloud header and CSS.

Project description

Voilà template for Materials Cloud

Binder

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

voila_materialscloud_template-0.4.0.tar.gz (575.2 kB view details)

Uploaded Source

Built Distribution

voila_materialscloud_template-0.4.0-py2.py3-none-any.whl (2.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file voila_materialscloud_template-0.4.0.tar.gz.

File metadata

File hashes

Hashes for voila_materialscloud_template-0.4.0.tar.gz
Algorithm Hash digest
SHA256 9c82eebce35699fac9497507523ce723aacef95f3b50dabbb5036bbc3881392e
MD5 1c204940426e32827be2ca842c696ccf
BLAKE2b-256 0ac8ba38ebf2a7b84827f49af4626ab3fe4ecfe0bcac4e47f9b2307eca8aafae

See more details on using hashes here.

File details

Details for the file voila_materialscloud_template-0.4.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for voila_materialscloud_template-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4e38b35e1462c786ddfc9ddb9009b192dc1001c3e321d9322eb35eecb6fe9d92
MD5 3d2d4b14b228852368eb7d5a3c9c484b
BLAKE2b-256 21c9a8dff1560a0c9d122c999b69eccc65439cc0927dd05a5e39e1c92c119898

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page