quantecon-book-theme
A Jupyter Book Theme for QuantEcon Book Style Projects
Features
- Clean, professional design optimized for technical and academic documentation
- Git-based metadata - Automatic display of last modified dates and interactive changelog with commit history
- Collapsible stderr warnings - Automatically wraps verbose warnings in notebook cells with an expandable interface
- Jupyter Notebook support with visual classes for cell inputs, outputs, and interactive functionality
- Configurable code syntax highlighting - Choose between custom QuantEcon styles or Pygments built-in themes
- Launch buttons for online interactivity via BinderHub
- Flexible content layout inspired by beautiful online books
- Bootstrap 4 for visual elements and functionality
- Built on PyData Sphinx Theme inheriting robust features and design patterns
Usage
To use this theme in Jupyter Book:
- Install the theme
pip install quantecon-book-theme
- Add the theme to your
_config.ymlfile:
sphinx:
config:
html_theme: quantecon_book_theme
Configuration Options
The theme supports various configuration options in your conf.py or _config.yml:
html_theme_options = {
"repository_url": "https://github.com/{your-org}/{your-repo}",
"use_repository_button": True,
"use_issues_button": True,
"use_edit_page_button": True,
# Git metadata (new in v0.12.0)
"last_modified_date_format": "%b %d, %Y", # Date format for last modified
"changelog_max_entries": 10, # Number of commits to show in changelog
# Code highlighting (new in v0.10.0)
"qetheme_code_style": True, # False to use Pygments built-in styles
}
# When using Pygments styles
pygments_style = 'friendly' # or 'monokai', 'github-dark', etc.
See the full documentation for all configuration options.
Development
Testing
This project uses tox for running tests across multiple Python versions:
# Run full test suite
tox
# Run pre-commit checks
pre-commit run --all-files
Important: Always use tox instead of running pytest directly to ensure proper environment isolation and multi-version testing.
Updating Fixtures for Tests
Updating test regression files on layout changes
It is advisable to update the test files for file regression checks when releavant layout files change.
For example, at present we have a sidebar file-regression check to validate html across tests.
The file which it compares against is tests/test_build/test_build_book.html.
If updating the sidebar html, then one of the easier steps to update this test file is:
- Delete the file
tests/test_build/test_build_book.html. - Run
pytestin your command line, which will then generate a new file. Check if the file is at par with your expectations, contains elements which you added/modified.
Now future pytests will test against this file, and the subsequent tests should pass.
Contributing Guide
The developer guide (setup, testing, visual regression tests, releases) lives in docs/developer/ and is published with the rest of the documentation at https://quantecon.github.io/quantecon-book-theme/.
Metadata
Release files for quantecon-book-theme 0.22.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quantecon_book_theme-0.22.2.tar.gz | 8.6 MB | Without provenance | Details for quantecon_book_theme-0.22.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quantecon_book_theme-0.22.2-py3-none-any.whl | Python 3 | none | any | Details for quantecon_book_theme-0.22.2-py3-none-any.whl |
Total release size: 9.2 MB
Release files / quantecon_book_theme-0.22.2.tar.gz
| Download URL | quantecon_book_theme-0.22.2.tar.gz |
|---|---|
| Size | 8.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
499a8da273a67434aa6ec7194363f4abf499a18e69191850915a8acc27919930
|
|
BLAKE2b-256 checksum How to use checksums |
7c1b4440d9ad3cd48f406d4ce18cea61a0d477ae7e56f6536444bef679848e8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / quantecon_book_theme-0.22.2-py3-none-any.whl
| Download URL | quantecon_book_theme-0.22.2-py3-none-any.whl |
|---|---|
| Size | 614.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3089e175aee93a3b3e0ccb6c3fe8905bfb497d6b99108021f8a64d50bbc7b8d
|
|
BLAKE2b-256 checksum How to use checksums |
c94af41f9f1dcb675d53541cd3bb647796b52268d4a48f1a5e700682ec020959
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for quantecon-book-theme 0.22.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.