Skip to content

Commit

Permalink
Add configuration to demonstrate rendering a jupyter notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmarwitz committed Aug 14, 2024
1 parent d4cb6d3 commit 242f603
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/examples/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
You can find examples here:

- [Basic Example](example_basic/)
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Welcome to this exemplary `mkdocs` documentation!
11 changes: 11 additions & 0 deletions docs/styles/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
Hides the In[ ] blocks.
Out[ ] blocks are not displayed
*/
.jp-InputPrompt, .jp-OutputPrompt {
display: none !important;
}

.custom-highlight {
border: 1px solid red;
}
87 changes: 87 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
site_name: metalearners
site_description: description
site_url: http://url
theme:
name: material
palette:
# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
name: Switch to light mode
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
primary: deep purple
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Switch to system preference
primary: deep purple
features:
- content.action.edit
- search.suggest
- search.highlight
- content.code.annotate
- content.code.copy
- navigation.tabs
icon:
repo: fontawesome/brands/github-alt
edit: material/pencil
repo_name: quantco/metalearners
repo_url: https://github.com/quantco/metalearners
edit_uri: edit/main/docs/
plugins:
- search
- mkdocs-jupyter:
ignore_h1_titles: False # Heading H1 -> Site title
execute: true
allow_errors: false
show_input: True
include_source: True
# highlight_extra_classes: custom-highlight -> add custom styling to code & output cells
no_input: False
execute_ignore:
- examples/example_data_generation.ipynb
- examples/example_estimating_ates.ipynb
- examples/example_feature_importance_shap.ipynb
- examples/example_gridsearch.ipynb
- examples/example_lime.ipynb
- examples/example_onnx.ipynb
- examples/example_optuna.ipynb
- examples/example_propensity.ipynb
- examples/example_reuse.ipynb
- examples/example_survival.ipynb

- mkdocstrings:
handlers:
python:
paths: [metalearners]
options:
unwrap_annotated: true
show_symbol_type_heading: true
docstring_style: numpy
docstring_section_style: spacy
separate_signature: true
merge_init_into_class: true
show_submodules: true # show *all* code docu

nav:
# Demonstrate notebook inclusion
- Welcome: index.md
- Examples:
- examples/index.md
- examples/example_basic.ipynb
markdown_extensions:
- admonition
- pymdownx.highlight
- pymdownx.superfences
- pymdownx.inlinehilite

extra_css:
- styles/custom.css

0 comments on commit 242f603

Please sign in to comment.