Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Backport #21429 from jklymak/doc-use-mpl-sphinx #21461

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 2 commits into from
Oct 26, 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
21 changes: 0 additions & 21 deletions doc/_templates/mpl_nav_bar.html

This file was deleted.

26 changes: 2 additions & 24 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def _check_dependencies():
f"mpl.css?{SHA}",
]

html_theme = "pydata_sphinx_theme"
html_theme = "mpl_sphinx_theme"

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
Expand All @@ -302,34 +302,12 @@ def _check_dependencies():
# the sidebar.
html_logo = "_static/logo2.svg"
html_theme_options = {
"native_site": True,
"logo_link": "index",
# collapse_navigation in pydata-sphinx-theme is slow, so skipped for local
# and CI builds https://github.com/pydata/pydata-sphinx-theme/pull/386
"collapse_navigation": not is_release_build,
"icon_links": [
{
"name": "gitter",
"url": "https://gitter.im/matplotlib",
"icon": "fab fa-gitter",
},
{
"name": "discourse",
"url": "https://discourse.matplotlib.org",
"icon": "fab fa-discourse",
},
{
"name": "GitHub",
"url": "https://github.com/matplotlib/matplotlib",
"icon": "fab fa-github-square",
},
{
"name": "twitter",
"url": "https://twitter.com/matplotlib/",
"icon": "fab fa-twitter-square",
},
],
"show_prev_next": False,
"navbar_center": ["mpl_nav_bar.html"],
}
include_analytics = is_release_build
if include_analytics:
Expand Down
8 changes: 8 additions & 0 deletions doc/devel/documenting_mpl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,14 @@ Example:
:parts: 2


Navbar and style
----------------

Matplotlib has a few subprojects that share the same navbar and style, so these
are centralized as a sphinx theme at
`mpl_sphinx_theme <https://github.com/matplotlib/mpl-sphinx-theme>`_. Changes to the
style or topbar should be made there to propagate across all subprojects.

.. TODO: Add section about uploading docs

.. _ReST: https://docutils.sourceforge.io/rst.html
Expand Down
58 changes: 58 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# To set up a development environment using conda run:
#
# conda env create -f environment.yml
# conda activate mpl-dev
# pip install -e .
#
name: mpl-dev
channels:
- conda-forge
dependencies:
- cairocffi
- cycler>=0.10.0
- fonttools>=4.22.0
- kiwisolver>=1.0.1
- numpy>=1.17
- pillow>=6.2
- pygobject
- pyparsing
- pyqt
- python-dateutil>=2.1
- setuptools
- setuptools_scm
- wxpython
# building documentation
- colorspacious
- graphviz
- ipython
- ipywidgets
- numpydoc>=0.8
- packaging
- pydata-sphinx-theme
- scipy
- sphinx>=1.8.1,!=2.0.0
- sphinx-copybutton
- sphinx-gallery>=0.10
- sphinx-panels
- pip
- pip:
- mpl-sphinx-theme
- sphinxcontrib-svg2pdfconverter
# testing
- coverage
- flake8>=3.8
- flake8-docstrings>=1.4.0
- gtk3
- ipykernel
- nbconvert[execute]!=6.0.0,!=6.0.1
- nbformat!=5.0.0,!=5.0.1
- pandas!=0.25.0
- pikepdf
- pydocstyle>=5.1.0
- pytest!=4.6.0,!=5.4.0
- pytest-cov
- pytest-rerunfailures
- pytest-timeout
- pytest-xdist
- tornado
- pytz
2 changes: 1 addition & 1 deletion requirements/doc/doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ipython
ipywidgets
numpydoc>=0.8
packaging>=20
pydata-sphinx-theme>=0.6.0
mpl-sphinx-theme
sphinxcontrib-svg2pdfconverter>=1.1.0
sphinx-gallery>=0.10
sphinx-copybutton
Expand Down