From a3488897baf02ef7f04cde3a5ee74c346906324e Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:21:06 +0100 Subject: [PATCH 01/15] Update conf.py --- docs/sphinx/source/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index b184f8db51..b545556930 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -274,7 +274,9 @@ def setup(app): #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. -#'preamble': '', +'preamble': r''' +\newcommand{\wm2}{\text{Wm}^{-2}} +''', } # Grouping the document tree into LaTeX files. List of tuples From 12de6c663e625ae2a8c07f407900532dde99e50a Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:28:01 +0100 Subject: [PATCH 02/15] Update irradiance.py --- pvlib/spectrum/irradiance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvlib/spectrum/irradiance.py b/pvlib/spectrum/irradiance.py index cb3e5e1ddb..1249e83781 100644 --- a/pvlib/spectrum/irradiance.py +++ b/pvlib/spectrum/irradiance.py @@ -189,7 +189,7 @@ def average_photon_energy(spectra): ---------- spectra : pandas.Series or pandas.DataFrame - Spectral irradiance, must be positive. [Wm⁻²nm⁻¹] + Spectral irradiance, must be positive. [Wm⁻²nm⁻¹] test: \wm2 A single spectrum must be a :py:class:`pandas.Series` with wavelength [nm] as the index, while multiple spectra must be rows in a From 28330c607b1cc3e051539886ae81c6815463e6a9 Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:53:53 +0100 Subject: [PATCH 03/15] test latex and custom role units --- docs/sphinx/source/conf.py | 17 +++++++++++++++++ pvlib/irradiance.py | 8 ++++---- pvlib/spectrum/irradiance.py | 2 +- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index b545556930..6df0d868e8 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -25,6 +25,9 @@ import distutils # noqa: F401 import pandas as pd +from docutils import nodes +from docutils.parsers.rst import roles + pd.show_versions() # If extensions (or modules to document with autodoc) are in another directory, @@ -495,3 +498,17 @@ def make_github_url(file_name): 'make_github_url': make_github_url, 'edit_page_url_template': '{{ make_github_url(file_name) }}', } + +def wm2_role(name, rawtext, text, lineno, inliner, options={}, content=[]): + # Create a node with the desired text + node = nodes.Text('Wm⁻²') + return [node], [] + + +def wm2nm1_role(name, rawtext, text, lineno, inliner, options={}, content=[]): + # Create a node with the desired text + node = nodes.Text('Wm⁻²nm⁻¹') + return [node], [] + +roles.register_canonical_role('wm2', wm2_role) +roles.register_canonical_role('wm2nm1', wm2nm1_role) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index 435c318562..0616b52f49 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -292,13 +292,13 @@ def get_total_irradiance(surface_tilt, surface_azimuth, solar_azimuth : numeric Solar azimuth angle. [degree] dni : numeric - Direct Normal Irradiance. [W/m2] + Direct Normal Irradiance. [\wm2] ghi : numeric - Global horizontal irradiance. [W/m2] + Global horizontal irradiance. [\wm2] dhi : numeric - Diffuse horizontal irradiance. [W/m2] + Diffuse horizontal irradiance. [:wm2:] dni_extra : numeric, optional - Extraterrestrial direct normal irradiance. [W/m2] + Extraterrestrial direct normal irradiance. [:wm2:] airmass : numeric, optional Relative airmass (not adjusted for pressure). [unitless] albedo : numeric, default 0.25 diff --git a/pvlib/spectrum/irradiance.py b/pvlib/spectrum/irradiance.py index 1249e83781..eb13345c84 100644 --- a/pvlib/spectrum/irradiance.py +++ b/pvlib/spectrum/irradiance.py @@ -189,7 +189,7 @@ def average_photon_energy(spectra): ---------- spectra : pandas.Series or pandas.DataFrame - Spectral irradiance, must be positive. [Wm⁻²nm⁻¹] test: \wm2 + Spectral irradiance, must be positive. [:wm2nm1:] A single spectrum must be a :py:class:`pandas.Series` with wavelength [nm] as the index, while multiple spectra must be rows in a From eb4eaed27c22ba4350a0df71229abaadd011c3f3 Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Thu, 12 Sep 2024 00:04:17 +0100 Subject: [PATCH 04/15] Update conf.py --- docs/sphinx/source/conf.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index 6df0d868e8..c97f5d2d12 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -499,15 +499,25 @@ def make_github_url(file_name): 'edit_page_url_template': '{{ make_github_url(file_name) }}', } +# ============================================================================= +# def wm2_role(name, rawtext, text, lineno, inliner, options={}, content=[]): +# # Create a node with the desired text +# node = nodes.Text('Wm⁻²') +# return [node], [] +# +# +# def wm2nm1_role(name, rawtext, text, lineno, inliner, options={}, content=[]): +# # Create a node with the desired text +# node = nodes.Text('Wm⁻²nm⁻¹') +# return [node], [] +# ============================================================================= + def wm2_role(name, rawtext, text, lineno, inliner, options={}, content=[]): - # Create a node with the desired text - node = nodes.Text('Wm⁻²') + node = nodes.raw('', 'Wm-2', format='html') return [node], [] - def wm2nm1_role(name, rawtext, text, lineno, inliner, options={}, content=[]): - # Create a node with the desired text - node = nodes.Text('Wm⁻²nm⁻¹') + node = nodes.raw('', 'Wm-2nm-1', format='html') return [node], [] roles.register_canonical_role('wm2', wm2_role) From b8e8ccd6ff58b91bd98005736205650860e428ca Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Thu, 12 Sep 2024 00:28:35 +0100 Subject: [PATCH 05/15] add various attempts --- docs/sphinx/source/conf.py | 29 +++++++++++++++-------------- pvlib/irradiance.py | 6 +++--- pvlib/spectrum/irradiance.py | 2 +- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index c97f5d2d12..d43e14d0b6 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -499,26 +499,27 @@ def make_github_url(file_name): 'edit_page_url_template': '{{ make_github_url(file_name) }}', } -# ============================================================================= -# def wm2_role(name, rawtext, text, lineno, inliner, options={}, content=[]): -# # Create a node with the desired text -# node = nodes.Text('Wm⁻²') -# return [node], [] -# -# -# def wm2nm1_role(name, rawtext, text, lineno, inliner, options={}, content=[]): -# # Create a node with the desired text -# node = nodes.Text('Wm⁻²nm⁻¹') -# return [node], [] -# ============================================================================= - def wm2_role(name, rawtext, text, lineno, inliner, options={}, content=[]): - node = nodes.raw('', 'Wm-2', format='html') + # Create a node with the desired text + node = nodes.Text('Wm⁻²') return [node], [] + def wm2nm1_role(name, rawtext, text, lineno, inliner, options={}, content=[]): + # Create a node with the desired text + node = nodes.Text('Wm⁻²nm⁻¹') + return [node], [] + +def wm2_role2(name, rawtext, text, lineno, inliner, options={}, content=[]): + node = nodes.raw('', 'Wm-2', format='html') + return [node], [] + +def wm2nm1_role2(name, rawtext, text, lineno, inliner, options={}, content=[]): node = nodes.raw('', 'Wm-2nm-1', format='html') return [node], [] roles.register_canonical_role('wm2', wm2_role) roles.register_canonical_role('wm2nm1', wm2nm1_role) + +roles.register_canonical_role('wm22', wm2_role2) +roles.register_canonical_role('wm2nm12', wm2nm1_role2) \ No newline at end of file diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index 0616b52f49..6b7121441e 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -294,11 +294,11 @@ def get_total_irradiance(surface_tilt, surface_azimuth, dni : numeric Direct Normal Irradiance. [\wm2] ghi : numeric - Global horizontal irradiance. [\wm2] + Global horizontal irradiance. [Wm-2] dhi : numeric - Diffuse horizontal irradiance. [:wm2:] + Diffuse horizontal irradiance. [:math:`Wm^{-2}`] dni_extra : numeric, optional - Extraterrestrial direct normal irradiance. [:wm2:] + Extraterrestrial direct normal irradiance. [ :wm2: and :wm22: ] airmass : numeric, optional Relative airmass (not adjusted for pressure). [unitless] albedo : numeric, default 0.25 diff --git a/pvlib/spectrum/irradiance.py b/pvlib/spectrum/irradiance.py index eb13345c84..1c180a63bc 100644 --- a/pvlib/spectrum/irradiance.py +++ b/pvlib/spectrum/irradiance.py @@ -189,7 +189,7 @@ def average_photon_energy(spectra): ---------- spectra : pandas.Series or pandas.DataFrame - Spectral irradiance, must be positive. [:wm2nm1:] + Spectral irradiance, must be positive. [ :wm2nm1: and :wm2nm12: ] A single spectrum must be a :py:class:`pandas.Series` with wavelength [nm] as the index, while multiple spectra must be rows in a From cf07ae2ba66384d7dc01b75ea55e561cdab99cc8 Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Thu, 12 Sep 2024 00:56:27 +0100 Subject: [PATCH 06/15] remove latex commands --- docs/sphinx/source/conf.py | 14 ++++++++------ pvlib/irradiance.py | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index d43e14d0b6..2ea63b2dad 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -277,10 +277,8 @@ def setup(app): #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. -'preamble': r''' -\newcommand{\wm2}{\text{Wm}^{-2}} -''', -} +# 'preamble': +# } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, @@ -499,6 +497,7 @@ def make_github_url(file_name): 'edit_page_url_template': '{{ make_github_url(file_name) }}', } + def wm2_role(name, rawtext, text, lineno, inliner, options={}, content=[]): # Create a node with the desired text node = nodes.Text('Wm⁻²') @@ -510,14 +509,17 @@ def wm2nm1_role(name, rawtext, text, lineno, inliner, options={}, content=[]): node = nodes.Text('Wm⁻²nm⁻¹') return [node], [] + def wm2_role2(name, rawtext, text, lineno, inliner, options={}, content=[]): - node = nodes.raw('', 'Wm-2', format='html') + node = nodes.raw('', 'Wm-2', format='html') # noqa: E501 return [node], [] + def wm2nm1_role2(name, rawtext, text, lineno, inliner, options={}, content=[]): - node = nodes.raw('', 'Wm-2nm-1', format='html') + node = nodes.raw('', 'Wm-2nm-1', format='html') # noqa: E501 return [node], [] + roles.register_canonical_role('wm2', wm2_role) roles.register_canonical_role('wm2nm1', wm2nm1_role) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index 6b7121441e..a2cd44c8a3 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -292,9 +292,9 @@ def get_total_irradiance(surface_tilt, surface_azimuth, solar_azimuth : numeric Solar azimuth angle. [degree] dni : numeric - Direct Normal Irradiance. [\wm2] + Direct Normal Irradiance. [Wm⁻²] ghi : numeric - Global horizontal irradiance. [Wm-2] + Global horizontal irradiance. [ Wm-2 ] dhi : numeric Diffuse horizontal irradiance. [:math:`Wm^{-2}`] dni_extra : numeric, optional From 0948b02f620b913d916143d624c8706a3454658c Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Thu, 12 Sep 2024 01:02:28 +0100 Subject: [PATCH 07/15] Update conf.py --- docs/sphinx/source/conf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index 2ea63b2dad..146d5b3476 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -278,7 +278,7 @@ def setup(app): # Additional stuff for the LaTeX preamble. # 'preamble': -# } + } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, @@ -511,12 +511,12 @@ def wm2nm1_role(name, rawtext, text, lineno, inliner, options={}, content=[]): def wm2_role2(name, rawtext, text, lineno, inliner, options={}, content=[]): - node = nodes.raw('', 'Wm-2', format='html') # noqa: E501 + node = nodes.raw('', 'Wm-2', format='html') # noqa: E501 return [node], [] def wm2nm1_role2(name, rawtext, text, lineno, inliner, options={}, content=[]): - node = nodes.raw('', 'Wm-2nm-1', format='html') # noqa: E501 + node = nodes.raw('', 'Wm-2nm-1', format='html') # noqa: E501 return [node], [] @@ -524,4 +524,4 @@ def wm2nm1_role2(name, rawtext, text, lineno, inliner, options={}, content=[]): roles.register_canonical_role('wm2nm1', wm2nm1_role) roles.register_canonical_role('wm22', wm2_role2) -roles.register_canonical_role('wm2nm12', wm2nm1_role2) \ No newline at end of file +roles.register_canonical_role('wm2nm12', wm2nm1_role2) From 2115feeb7f2cbc7bf703aa7ff8a984bb610558ab Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Fri, 13 Sep 2024 17:22:59 +0100 Subject: [PATCH 08/15] trying rst_prolog and reverting other changes --- docs/sphinx/source/conf.py | 33 +++++---------------------------- pvlib/irradiance.py | 8 ++++---- pvlib/spectrum/irradiance.py | 2 +- 3 files changed, 10 insertions(+), 33 deletions(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index 146d5b3476..308e98768e 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -497,31 +497,8 @@ def make_github_url(file_name): 'edit_page_url_template': '{{ make_github_url(file_name) }}', } - -def wm2_role(name, rawtext, text, lineno, inliner, options={}, content=[]): - # Create a node with the desired text - node = nodes.Text('Wm⁻²') - return [node], [] - - -def wm2nm1_role(name, rawtext, text, lineno, inliner, options={}, content=[]): - # Create a node with the desired text - node = nodes.Text('Wm⁻²nm⁻¹') - return [node], [] - - -def wm2_role2(name, rawtext, text, lineno, inliner, options={}, content=[]): - node = nodes.raw('', 'Wm-2', format='html') # noqa: E501 - return [node], [] - - -def wm2nm1_role2(name, rawtext, text, lineno, inliner, options={}, content=[]): - node = nodes.raw('', 'Wm-2nm-1', format='html') # noqa: E501 - return [node], [] - - -roles.register_canonical_role('wm2', wm2_role) -roles.register_canonical_role('wm2nm1', wm2nm1_role) - -roles.register_canonical_role('wm22', wm2_role2) -roles.register_canonical_role('wm2nm12', wm2nm1_role2) +# list of abbreviations for typing out units with nonstandard formatting such +# as superscript +rst_prolog = """ +.. |wm2| replace:: Wm⁻² +""" diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index a2cd44c8a3..5e6f317fc8 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -292,13 +292,13 @@ def get_total_irradiance(surface_tilt, surface_azimuth, solar_azimuth : numeric Solar azimuth angle. [degree] dni : numeric - Direct Normal Irradiance. [Wm⁻²] + Direct Normal Irradiance. [W/m2] ghi : numeric - Global horizontal irradiance. [ Wm-2 ] + Global horizontal irradiance. [W/m2] dhi : numeric - Diffuse horizontal irradiance. [:math:`Wm^{-2}`] + Diffuse horizontal irradiance. [|wm2|] dni_extra : numeric, optional - Extraterrestrial direct normal irradiance. [ :wm2: and :wm22: ] + Extraterrestrial direct normal irradiance. [|wm2|] airmass : numeric, optional Relative airmass (not adjusted for pressure). [unitless] albedo : numeric, default 0.25 diff --git a/pvlib/spectrum/irradiance.py b/pvlib/spectrum/irradiance.py index 1c180a63bc..cb3e5e1ddb 100644 --- a/pvlib/spectrum/irradiance.py +++ b/pvlib/spectrum/irradiance.py @@ -189,7 +189,7 @@ def average_photon_energy(spectra): ---------- spectra : pandas.Series or pandas.DataFrame - Spectral irradiance, must be positive. [ :wm2nm1: and :wm2nm12: ] + Spectral irradiance, must be positive. [Wm⁻²nm⁻¹] A single spectrum must be a :py:class:`pandas.Series` with wavelength [nm] as the index, while multiple spectra must be rows in a From 0041d7e89b3b1304ed7df603bc39d5a294213272 Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Mon, 16 Sep 2024 12:52:29 +0100 Subject: [PATCH 09/15] Update conf.py --- docs/sphinx/source/conf.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index 308e98768e..e3b0a33b55 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -25,9 +25,6 @@ import distutils # noqa: F401 import pandas as pd -from docutils import nodes -from docutils.parsers.rst import roles - pd.show_versions() # If extensions (or modules to document with autodoc) are in another directory, @@ -501,4 +498,9 @@ def make_github_url(file_name): # as superscript rst_prolog = """ .. |wm2| replace:: Wm⁻² +.. |wm2nm1| replace:: Wm⁻²nm⁻¹ +.. |degc| replace:: °C +.. |deg| replace:: ° +.. |^-1| replace:: ⁻¹ +.. |^-2| replace:: ⁻² """ From dc68738d9e9aab4acc4ff57f7328c9d9e56a15e9 Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Mon, 16 Sep 2024 12:55:26 +0100 Subject: [PATCH 10/15] example application --- pvlib/irradiance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index 9444027b08..1e935f6a89 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -371,9 +371,9 @@ def get_sky_diffuse(surface_tilt, surface_azimuth, solar_azimuth : numeric Solar azimuth angle. [degree] dni : numeric - Direct Normal Irradiance. [W/m2] + Direct Normal Irradiance. [|wm2|] ghi : numeric - Global horizontal irradiance. [W/m2] + Global horizontal irradiance. [Wm|^-2|] dhi : numeric Diffuse horizontal irradiance. [W/m2] dni_extra : numeric, optional From 831c04c6bb11e5e67903d70c5496f8550f62de46 Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Mon, 16 Sep 2024 12:56:33 +0100 Subject: [PATCH 11/15] example usage --- pvlib/irradiance.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index 1e935f6a89..ccaa1a9bc3 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -298,7 +298,7 @@ def get_total_irradiance(surface_tilt, surface_azimuth, dhi : numeric Diffuse horizontal irradiance. [|wm2|] dni_extra : numeric, optional - Extraterrestrial direct normal irradiance. [|wm2|] + Extraterrestrial direct normal irradiance. [Wm|^-2|] airmass : numeric, optional Relative airmass (not adjusted for pressure). [unitless] albedo : numeric, default 0.25 @@ -371,9 +371,9 @@ def get_sky_diffuse(surface_tilt, surface_azimuth, solar_azimuth : numeric Solar azimuth angle. [degree] dni : numeric - Direct Normal Irradiance. [|wm2|] + Direct Normal Irradiance. [W/m2] ghi : numeric - Global horizontal irradiance. [Wm|^-2|] + Global horizontal irradiance. [W/m2] dhi : numeric Diffuse horizontal irradiance. [W/m2] dni_extra : numeric, optional From 2cee380dc379d7e3f13ca6c01087f9b9aa213e54 Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:08:15 +0100 Subject: [PATCH 12/15] example usage --- pvlib/irradiance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index ccaa1a9bc3..8b22d97ca5 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -290,7 +290,7 @@ def get_total_irradiance(surface_tilt, surface_azimuth, solar_zenith : numeric Solar zenith angle. [degree] solar_azimuth : numeric - Solar azimuth angle. [degree] + Solar azimuth angle. [|deg|] dni : numeric Direct Normal Irradiance. [W/m2] ghi : numeric @@ -298,7 +298,7 @@ def get_total_irradiance(surface_tilt, surface_azimuth, dhi : numeric Diffuse horizontal irradiance. [|wm2|] dni_extra : numeric, optional - Extraterrestrial direct normal irradiance. [Wm|^-2|] + Extraterrestrial direct normal irradiance. [|wm2|] airmass : numeric, optional Relative airmass (not adjusted for pressure). [unitless] albedo : numeric, default 0.25 From b2c54adb98dee45c4f4b5a6fabfc309b01c9316a Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:39:14 +0100 Subject: [PATCH 13/15] Merge remote-tracking branch 'upstream/main' into scientific_units_test --- docs/sphinx/source/contributing.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/sphinx/source/contributing.rst b/docs/sphinx/source/contributing.rst index b4df220906..c47c9498f8 100644 --- a/docs/sphinx/source/contributing.rst +++ b/docs/sphinx/source/contributing.rst @@ -68,12 +68,14 @@ into detail on each of these steps. Also see GitHub's `Set Up Git Requests `_. We strongly recommend using virtual environments for development. -Virtual environments make it trivial to switch between different -versions of software. This `astropy guide -`_ is a good reference for virtual environments. If -this is your first pull request, don't worry about using a virtual -environment. +Virtual environments make it easier to switch between different +versions of software. This `scientific-python.org guide +`_ +is a good reference for virtual environments. The pvlib-python `installation +user guide `_ also provides instructions on +setting up a virtual environment. If this is your first pull request, don't +worry about using a virtual environment. You must include documentation and unit tests for any new or improved code. We can provide help and advice on this after you start the pull From 35f958ed947273077005fdd360944adefa22e199 Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:42:46 +0100 Subject: [PATCH 14/15] Update conf.py had trouble with "merge remote-tracking..." to resolve conflicts so updated the conf.py file manually to match the file on main --- docs/sphinx/source/conf.py | 69 +++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index e3b0a33b55..efd29a6759 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -38,7 +38,7 @@ # use napoleon in lieu of numpydoc 2019-04-23 # If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' +# needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom @@ -70,7 +70,7 @@ source_suffix = '.rst' # The encoding of source files. -#source_encoding = 'utf-8-sig' +# source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' @@ -94,13 +94,13 @@ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -#language = None +# language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: -#today = '' +# today = '' # Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' +# today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -108,27 +108,27 @@ # The reST default role (used for this markup: `text`) to use for all # documents. -#default_role = None +# default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True +# add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). -#add_module_names = True +# add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. -#show_authors = False +# show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] +# modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False +# keep_warnings = False autosummary_generate = True @@ -183,10 +183,10 @@ # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +# html_title = None # A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None +# html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. @@ -195,7 +195,7 @@ # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. -#html_favicon = None +# html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, @@ -245,10 +245,10 @@ # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. -#html_use_opensearch = '' +# html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None +# html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'pvlib_pythondoc' @@ -266,16 +266,17 @@ def setup(app): # -- Options for LaTeX output --------------------------------------------- + latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', + # The paper size ('letterpaper' or 'a4paper'). + # 'papersize': 'letterpaper', -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', + # The font size ('10pt', '11pt' or '12pt'). + # 'pointsize': '10pt', -# Additional stuff for the LaTeX preamble. -# 'preamble': - } + # Additional stuff for the LaTeX preamble. + # 'preamble': +} # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, @@ -288,23 +289,23 @@ def setup(app): # The name of an image file (relative to this directory) to place at the top of # the title page. -#latex_logo = None +# latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. -#latex_use_parts = False +# latex_use_parts = False # If true, show page references after internal links. -#latex_show_pagerefs = False +# latex_show_pagerefs = False # If true, show URL addresses after external links. -#latex_show_urls = False +# latex_show_urls = False # Documents to append as an appendix to all manuals. -#latex_appendices = [] +# latex_appendices = [] # If false, no module index is generated. -#latex_domain_indices = True +# latex_domain_indices = True # extlinks alias extlinks = { @@ -329,7 +330,7 @@ def setup(app): ] # If true, show URL addresses after external links. -#man_show_urls = False +# man_show_urls = False # -- Options for Texinfo output ------------------------------------------- @@ -345,16 +346,16 @@ def setup(app): ] # Documents to append as an appendix to all manuals. -#texinfo_appendices = [] +# texinfo_appendices = [] # If false, no module index is generated. -#texinfo_domain_indices = True +# texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' +# texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False +# texinfo_no_detailmenu = False # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { From abdee2cdf53e6fbe9d9301d9bda8039d7ce59a27 Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Wed, 18 Sep 2024 18:44:26 +0100 Subject: [PATCH 15/15] Update conf.py --- docs/sphinx/source/conf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index 69df32b931..f4b9bf1454 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -495,8 +495,7 @@ def make_github_url(file_name): 'edit_page_url_template': '{{ make_github_url(file_name) }}', } -# list of abbreviations for typing out units with nonstandard formatting such -# as superscript +# list of abbreviations for typing out units with nonstandard formatting rst_prolog = """ .. |wm2| replace:: Wm⁻² .. |wm2nm1| replace:: Wm⁻²nm⁻¹