Skip to content

Commit

Permalink
some general website and infrastructure fixes (pymc-devs#439)
Browse files Browse the repository at this point in the history
* remove extra elements from toctree

* fix logo link and remove extra search field

* add hook to prevent notebook_name as target

* fix bad target in GLM hierarchical

* remove more dropdown with single element in navbar
  • Loading branch information
OriolAbril authored Oct 11, 2022
1 parent a384f35 commit 6f22c67
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
12 changes: 9 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,16 @@ repos:
minimum_pre_commit_version: 2.8.0
name: Check notebooks have watermark (see Jupyter style guide from PyMC docs)
types: [jupyter]
- id: no-internal-links
name: Check no internal links are in the docs
- id: notebook_name
entry: '\(notebook_name\)='
language: pygrep
minimum_pre_commit_version: 2.8.0
name: Check notebooks do not use literally notebook_name as target
types: [jupyter]
- id: no-references-as-links
name: Check no references that should be sphinx cross-references are urls
description: >-
'A quick check to prevent urls pointing to pymc docs'
'A quick check to prevent urls pointing to pymc docs or other sphinx built docs like arviz, numpy, scipy...'
files: ^examples/
exclude: >
(?x)(index.md|
Expand Down
9 changes: 6 additions & 3 deletions examples/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,14 @@ def setup(app: Sphinx):
"icon": "fab fa-discourse",
},
],
"logo_link": "https://www.pymc.io",
"search_bar_text": "Search...",
"navbar_end": ["search-field.html", "navbar-icon-links.html"],
"navbar_end": ["navbar-icon-links.html"],
"page_sidebar_items": ["postcard", "page-toc", "edit-this-page", "donate"],
"google_analytics_id": "G-6KPRBTE6WV",
"logo_link": "https://www.pymc.io",
"header_links_before_dropdown": 6,
"logo": {
"link": "https://www.pymc.io",
},
}
version = os.environ.get("READTHEDOCS_VERSION", "")
version = version if "." in version else "main"
Expand Down Expand Up @@ -222,6 +224,7 @@ def setup(app: Sphinx):
remove_from_toctrees = [
"BART/*",
"case_studies/*",
"causal_inference/*",
"diagnostics_and_criticism/*",
"gaussian_processes/*",
"generalized_linear_models/*",
Expand Down
2 changes: 1 addition & 1 deletion examples/generalized_linear_models/GLM-hierarchical.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"(notebook_name)=\n",
"(GLM-hierarchical)=\n",
"# GLM: Hierarchical Linear Regression\n",
"\n",
":::{post} May 20, 2022\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ kernelspec:
name: python3
---

(notebook_name)=
(GLM-hierarchical)=
# GLM: Hierarchical Linear Regression

:::{post} May 20, 2022
Expand Down
2 changes: 1 addition & 1 deletion requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
myst-nb
sphinx==5.0.2 # see https://github.com/pymc-devs/pymc-examples/issues/409
pydata_sphinx_theme<0.10.1
pydata_sphinx_theme>=0.11.0
sphinx-design
sphinx-copybutton
sphinxcontrib-bibtex
Expand Down

0 comments on commit 6f22c67

Please sign in to comment.