Skip to content

add 404 page to docs #5057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ repos:
hooks:
- id: no-print-statements
files: ^pymc3/
- id: conda-env-sorter
files: ^conda-envs/environment-dev-py.+\.yml$
- repo: local
hooks:
- id: check-no-tests-are-ignored
Expand All @@ -47,13 +49,6 @@ repos:
language: python
name: Check no tests are ignored
pass_filenames: false
- id: conda-env-sort
additional_dependencies: [pyyaml]
entry: python scripts/sort_conda_envs.py
files: ^conda-envs/environment-dev-py37\.yml$
language: python
name: Sort dependencies in conda envs
types: [yaml]
- id: pip-from-conda
additional_dependencies: [pyyaml]
entry: python scripts/generate_pip_deps_from_conda.py
Expand Down
7 changes: 5 additions & 2 deletions conda-envs/environment-dev-py37.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ dependencies:
- libblas=*=*mkl
- mkl-service
- myst-nb
- numpy=1.15
- numpy>=1.15
- numpydoc>=0.9
- pandas=0.24
- pandas>=0.24
- pre-commit>=2.8.0
- pydata-sphinx-theme
- pytest-cov>=2.5
Expand All @@ -25,7 +25,10 @@ dependencies:
- recommonmark>=0.4
- scipy>1.4.1
- sphinx-autobuild>=0.7
- sphinx-notfound-page
- sphinx-panels
- sphinx>=1.5
- typing-extensions
- watermark
- pip:
- sphinx-design
6 changes: 4 additions & 2 deletions conda-envs/environment-dev-py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ dependencies:
- libblas=*=*mkl
- mkl-service
- myst-nb
- nbsphinx>=0.4
- numpy>=1.15.0
- numpydoc>=0.9
- pandas
- pandas>=0.24.0
- pre-commit>=2.8.0
- pydata-sphinx-theme
- pytest-cov>=2.5
Expand All @@ -26,7 +25,10 @@ dependencies:
- recommonmark>=0.4
- scipy>1.4.1
- sphinx-autobuild>=0.7
- sphinx-notfound-page
- sphinx-panels
- sphinx>=1.5
- typing-extensions>=3.7.4
- watermark
- pip:
- sphinx-design
4 changes: 3 additions & 1 deletion conda-envs/environment-dev-py39.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ dependencies:
- libblas=*=*mkl
- mkl-service
- myst-nb
- nbsphinx>=0.4
- numpy>=1.15.0
- numpydoc>=0.9
- pandas>=0.24.0
Expand All @@ -26,7 +25,10 @@ dependencies:
- recommonmark>=0.4
- scipy>1.4.1
- sphinx-autobuild>=0.7
- sphinx-notfound-page
- sphinx-panels
- sphinx>=1.5
- typing-extensions>=3.7.4
- watermark
- pip:
- sphinx-design
4 changes: 3 additions & 1 deletion conda-envs/windows-environment-dev-py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@ dependencies:
# Extra stuff for dev, testing and docs build
- ipython>=7.16
- myst-nb
- nbsphinx>=0.4
- numpydoc>=0.9
- pre-commit>=2.8.0
- pydata-sphinx-theme
- pytest-cov>=2.5
- pytest>=3.0
- recommonmark>=0.4
- sphinx-autobuild>=0.7
- sphinx-notfound-page
- sphinx-panels
- sphinx>=1.5
- watermark
- pip:
- sphinx-design
44 changes: 44 additions & 0 deletions docs/source/404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
orphan: true
---

# Page not found

**Sorry, we could not find this page**

We are working on the next major release for PyMC,
which will come with faster sampling, more flexible
model building, multiple computational backends...

::::{grid} 3
:::{grid-item}
![old banner](https://raw.githubusercontent.com/pymc-devs/pymc/v3/docs/logos/svg/PyMC3_banner.svg)
:::
:::{grid-item}
:class: text-center
{fas}`arrow-alt-circle-right;fa-5x`
:::
:::{grid-item}
![new banner](https://raw.githubusercontent.com/pymc-devs/pymc/main/docs/logos/svg/PyMC_banner.svg)
:::
::::

...and much better documentation too! However, to
do so we have moved some files around and we have
modified the base url in order to support multi version docs
(you'll see the version switcher at the bottom right of the page).

::::{grid} 3
:::{grid-item}
:::
:::{grid-item}
```{button-link} https://docs.pymc.io/en/stable/
:color: primary
:expand:

Back to stable version documentation
```
:::
:::{grid-item}
:::
::::
12 changes: 10 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
"sphinx.ext.napoleon",
"gallery_generator",
"myst_nb",
"sphinx_design",
"sphinx_panels",
"notfound.extension",
]

# Don't auto-generate summary for class members.
Expand Down Expand Up @@ -83,9 +85,12 @@
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.

version = pymc.__version__
if os.environ.get("READTHEDOCS", False):
rtd_version = os.environ.get("READTHEDOCS_VERSION", "")
if "." not in rtd_version and rtd_version.lower() != "stable":
version = "dev"
# The full version, including alpha/beta/rc tags.
release = version

Expand All @@ -96,6 +101,9 @@
# Usually you set "language" from the command line for these cases.
language = None

# configure notfound extension to not add any prefix to the urls
notfound_urls_prefix = "/en/latest/"

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
# today = ''
Expand Down
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ fastprogress>=0.2.0
h5py>=2.7
ipython>=7.16
myst-nb
nbsphinx>=0.4
numpy>=1.15.0
numpydoc>=0.9
pandas>=0.24.0
Expand All @@ -20,6 +19,8 @@ pytest>=3.0
recommonmark>=0.4
scipy>1.4.1
sphinx-autobuild>=0.7
sphinx-design
sphinx-notfound-page
sphinx-panels
sphinx>=1.5
typing-extensions>=3.7.4
Expand Down
21 changes: 0 additions & 21 deletions scripts/sort_conda_envs.py

This file was deleted.