Skip to content

Bump docs infraestructure #2112

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 39 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2514b8b
Initial version bump
echedey-ls Jun 29, 2024
3da9e04
Pin latests, okay
echedey-ls Jun 29, 2024
598f535
Update extlinks
echedey-ls Jun 29, 2024
c95b440
add entries to html_context, from pydata sphinx theme
echedey-ls Jun 29, 2024
7fb8bc9
Update edit-this-page.html
echedey-ls Jun 29, 2024
6705e8d
Update edit-this-page.html
echedey-ls Jun 29, 2024
748b81a
Update conf.py
echedey-ls Jun 29, 2024
ae080e6
Update conf.py
echedey-ls Jun 29, 2024
a62390d
Footer warning
echedey-ls Jun 29, 2024
bafacca
`"left_sidebar_end"` -> `"primary_sidebar_end"`
echedey-ls Jun 29, 2024
45ca25a
Add favicons
echedey-ls Jun 29, 2024
5932951
Add favicons dependency
echedey-ls Jun 29, 2024
34988f3
GH desktop is a bit broken
echedey-ls Jun 29, 2024
e07c672
linter
echedey-ls Jun 29, 2024
c996dd5
Edit link (I?)
echedey-ls Jun 29, 2024
2d889c5
`"use_edit_page_button": True,` else I can't test it xd
echedey-ls Jun 29, 2024
1ecdfc8
Add `edit-this-page.html` again
echedey-ls Jun 29, 2024
8f4a7b0
`html_show_sourcelink = False`
echedey-ls Jun 29, 2024
5e72776
Update conf.py
echedey-ls Jun 29, 2024
8daa10a
this was unnecessary
echedey-ls Jun 29, 2024
4175be5
Update edit-this-page.html
echedey-ls Jun 29, 2024
ec96670
Revert "Update edit-this-page.html"
echedey-ls Jun 29, 2024
6148b60
Update conf.py
echedey-ls Jun 29, 2024
de30ed8
Suppress warnings
echedey-ls Jun 29, 2024
6a6dcd6
Revert back to original
echedey-ls Jun 29, 2024
e89753c
Did I already try this?
echedey-ls Jun 29, 2024
ae9e23c
Using the docs
echedey-ls Jun 29, 2024
d85cd42
Fix the edit -> view on github
echedey-ls Jun 29, 2024
36273de
linter
echedey-ls Jun 29, 2024
04f14c7
No way linter
echedey-ls Jun 29, 2024
590310b
Fix references formatting
echedey-ls Jun 30, 2024
0da9f06
Remove prev/next links
echedey-ls Jul 1, 2024
aaf521c
Delay updating docs build env in the future
echedey-ls Jul 5, 2024
64e1e54
Merge branch 'main' into bump-docs
echedey-ls Jul 5, 2024
d94d807
Copyright
echedey-ls Jul 5, 2024
849ac56
Fix empty sidebar not collapsing (I hope)
echedey-ls Jul 5, 2024
97d4660
Stylize navigation and footer per Adam comment
echedey-ls Jul 13, 2024
ca2457b
linter on diff F
echedey-ls Jul 13, 2024
218f3e7
Update docs/sphinx/source/conf.py
echedey-ls Jul 13, 2024
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
12 changes: 2 additions & 10 deletions docs/sphinx/source/_static/reference_format.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
/* no reference superscript */
.footnote-reference {
font-size: 100% !important; /* default is 90% */
top: 0.0em !important; /* default is -0.4em */
}

/* reference number in brackets */
.footnote-reference::before {
content: '[';
}
.footnote-reference::after {
content: ']';
font-size: 100% !important;
vertical-align: baseline !important;
}
15 changes: 6 additions & 9 deletions docs/sphinx/source/_templates/edit-this-page.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
{#

Modify the "Edit on Github" links to handle auto-generated pages in the
example gallery and the API reference listings. The GH links that sphinx
example gallery and the API reference listings. The GH links that sphinx
generates by default make the assumption that an HTML file comes from an RST
file with the same filepath, which isn't the case for autogenerated files. The
logic to generate the correct URL is in conf.py, but we still have to modify
the template here to change the "Edit this page" text to "View on GitHub".

#}

{% if sourcename is defined and theme_use_edit_page_button==true and page_source_suffix %}
{% set src = sourcename.split('.') %}
<div class="tocsection editthispage">
<a href="{{ get_edit_url() }}">
<i class="fab fa-github-square"></i> {{ _("View on GitHub") }}
</a>
</div>
{% endif %}
{% extends "!components/edit-this-page.html" %}

{% block edit_this_page_text %}
View on GitHub
{% endblock %}
66 changes: 40 additions & 26 deletions docs/sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
# https://github.com/pypa/setuptools/issues/3044
import distutils # noqa: F401
import pandas as pd

pd.show_versions()

# If extensions (or modules to document with autodoc) are in another directory,
Expand Down Expand Up @@ -54,6 +55,7 @@
'IPython.sphinxext.ipython_console_highlighting',
'sphinx_gallery.gen_gallery',
'sphinx_toggleprompt',
'sphinx_favicon',
]

mathjax3_config = {'chtml': {'displayAlign': 'left',
Expand Down Expand Up @@ -82,7 +84,7 @@
# |version| and |release|, also used in various other places throughout the
# built documents.

import pvlib
import pvlib # noqa: E402

# The short X.Y version.
version = '%s' % (pvlib.__version__)
Expand Down Expand Up @@ -141,10 +143,6 @@
# https://pydata-sphinx-theme.rtfd.io/en/latest/user_guide/configuring.html
html_theme_options = {
"github_url": "https://github.com/pvlib/pvlib-python",
"favicons": [
{"rel": "icon", "sizes": "16x16", "href": "favicon-16x16.png"},
{"rel": "icon", "sizes": "32x32", "href": "favicon-32x32.png"},
],
"icon_links": [
{
"name": "StackOverflow",
Expand All @@ -164,12 +162,23 @@
],
"use_edit_page_button": True,
"show_toc_level": 1,
"footer_items": ["copyright", "sphinx-version", "sidebar-ethical-ads"],
"left_sidebar_end": [],
}
# "footer_start": [], # "copyright", "sphinx-version"
# "footer_center": [],
"footer_end": [],
# "primary_sidebar_end": [],
# https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/layout.html#hide-the-previous-and-next-buttons
"show_prev_next": False, # disable next/previous links
} # noqa: E501

# Add favicons from extension sphinx_favicon
favicons = [
{"rel": "icon", "sizes": "16x16", "href": "favicon-16x16.png"},
{"rel": "icon", "sizes": "32x32", "href": "favicon-32x32.png"},
]


# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# html_theme_path = []

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
Expand All @@ -195,40 +204,42 @@
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# html_extra_path = []

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# html_last_updated_fmt = '%b %d, %Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
# html_sidebars = {}
# html_sidebars = {
# "**": ["sidebar-nav-bs"]
# }

# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# html_additional_pages = {}

# If false, no module index is generated.
#html_domain_indices = True
# html_domain_indices = True

# If false, no index is generated.
#html_use_index = True
# html_use_index = True

# If true, the index is split into individual pages for each letter.
#html_split_index = False
# html_split_index = False

# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
html_show_sourcelink = False

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# html_show_sphinx = True

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
html_show_copyright = False
# html_show_copyright = False

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
Expand Down Expand Up @@ -296,12 +307,15 @@ def setup(app):

# extlinks alias
extlinks = {
'issue': ('https://github.com/pvlib/pvlib-python/issues/%s', 'GH'),
'pull': ('https://github.com/pvlib/pvlib-python/pull/%s', 'GH'),
'wiki': ('https://github.com/pvlib/pvlib-python/wiki/%s', 'wiki '),
'doi': ('http://dx.doi.org/%s', 'DOI: '),
'ghuser': ('https://github.com/%s', '@'),
'discuss': ('https://github.com/pvlib/pvlib-python/discussions/%s', 'GH'),
"issue": ("https://github.com/pvlib/pvlib-python/issues/%s", "GH%s"),
"pull": ("https://github.com/pvlib/pvlib-python/pull/%s", "GH%s"),
"wiki": ("https://github.com/pvlib/pvlib-python/wiki/%s", "wiki %s"),
"doi": ("http://dx.doi.org/%s", "DOI: %s"),
"ghuser": ("https://github.com/%s", "@%s"),
"discuss": (
"https://github.com/pvlib/pvlib-python/discussions/%s",
"GH%s",
),
}

# -- Options for manual page output ---------------------------------------
Expand Down
10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@ optional = [
]
doc = [
'ipython',
'pickleshare', # required by ipython
'matplotlib',
'sphinx == 4.5.0',
'pydata-sphinx-theme == 0.8.1',
'sphinx == 7.3.7',
'pydata-sphinx-theme == 0.15.4',
'sphinx-gallery',
'docutils == 0.15.2',
'docutils == 0.21',
'pillow',
'sphinx-toggleprompt >= 0.0.5',
'sphinx-toggleprompt == 0.5.2',
'sphinx-favicon',
'solarfactors',
]
test = [
Expand Down
4 changes: 2 additions & 2 deletions readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
version: 2

build:
os: ubuntu-20.04
os: ubuntu-lts-latest
tools:
python: "3.8"
python: "3.11"
jobs:
# fetch the full history so that setuptools_scm can determine the
# correct version string for long PRs with many commits
Expand Down
Loading