Skip to content

Commit

Permalink
Merge branch 'main' into malformed-links
Browse files Browse the repository at this point in the history
  • Loading branch information
echedey-ls committed Jul 19, 2024
2 parents df5ca46 + 2e9c2c0 commit e520078
Show file tree
Hide file tree
Showing 9 changed files with 150 additions and 120 deletions.
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 @@ -83,7 +85,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 @@ -142,10 +144,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 @@ -165,12 +163,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 @@ -196,40 +205,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 @@ -297,12 +308,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
3 changes: 3 additions & 0 deletions docs/sphinx/source/whatsnew/v0.11.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Enhancements
* Add new losses function that accounts for non-uniform irradiance on bifacial
modules, :py:func:`pvlib.bifacial.power_mismatch_deline`.
(:issue:`2045`, :pull:`2046`)
* Add new parameters for min/max absolute air mass to
:py:func:`pvlib.spectrum.spectral_factor_firstsolar`.
(:issue:`2086`, :pull:`2100`)


Bug fixes
Expand Down
3 changes: 1 addition & 2 deletions pvlib/solarposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import pandas as pd
import scipy.optimize as so
import warnings
import datetime

from pvlib import atmosphere
from pvlib.tools import datetime_to_djd, djd_to_datetime
Expand Down Expand Up @@ -587,7 +586,7 @@ def sun_rise_set_transit_ephem(times, latitude, longitude,
# older versions of pyephem ignore timezone when converting to its
# internal datetime format, so convert to UTC here to support
# all versions. GH #1449
obs.date = ephem.Date(thetime.astimezone(datetime.timezone.utc))
obs.date = ephem.Date(thetime.astimezone(dt.timezone.utc))
sunrise.append(_ephem_to_timezone(rising(sun), tzinfo))
sunset.append(_ephem_to_timezone(setting(sun), tzinfo))
trans.append(_ephem_to_timezone(transit(sun), tzinfo))
Expand Down
Loading

0 comments on commit e520078

Please sign in to comment.