From 2a54c7e6033b917dccd2f6eff0f6152ec690ef2a Mon Sep 17 00:00:00 2001 From: cdeline Date: Sun, 13 Oct 2024 22:33:43 -0600 Subject: [PATCH] sphinx and requirements.txt updates --- docs/sphinx/source/conf.py | 19 +++++++++++-------- docs/sphinx/source/manualapi.rst | 2 ++ docs/sphinx/source/whatsnew/v0.4.3.rst | 22 +++++++++++----------- docs/sphinx/source/whatsnew/v0.4.4.rst | 20 ++++++++++---------- requirements.txt | 4 +++- 5 files changed, 37 insertions(+), 30 deletions(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index 03adb108..9a0318d5 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -112,7 +112,7 @@ def __getattr__(cls, name): # General information about the project. project = u'bifacial_radiance' -copyright = u'2019, NREL' +copyright = u'2024, NREL' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -145,10 +145,7 @@ def __getattr__(cls, name): # https://pydata-sphinx-theme.rtfd.io/en/latest/user_guide/configuring.html html_theme_options = { "github_url": "https://github.com/NREL/bifacial_radiance", - "sphinx-favicon": [ - {"rel": "icon", "sizes": "16x16", "href": "favicon-16x16.png"}, - {"rel": "icon", "sizes": "32x32", "href": "favicon-32x32.png"}, - ], + "icon_links": [ { "name": "StackOverflow", @@ -163,9 +160,15 @@ def __getattr__(cls, name): ], #"use_edit_page_button": True, "show_toc_level": 1, - "footer_start": ["copyright", "sphinx-version", "sidebar-ethical-ads"], - #"left_sidebar_end": [], + #"footer_start": ["copyright"], + #"footer_center": ["sphinx-version"], } +# Add favicons from extension sphinx_favicon +favicons = [ + {"rel": "icon", "sizes": "16x16", "href": "favicon-16x16.png"}, + {"rel": "icon", "sizes": "32x32", "href": "favicon-32x32.png"}, +] + # The name of an image file (relative to this directory) to place at the top # of the sidebar. @@ -196,7 +199,7 @@ def __getattr__(cls, name): 'tutorials/6 - Exploring Trackerdict Structure': '_images/bifacial_radiance.png', 'tutorials/7 - Multiple Scene Objects':'_images/MultipleSceneObject_AnalysingSceneObj2_Row1_Module4.PNG', 'tutorials/8 - Electrical Mismatch Method':'_images/Mismatch_Definition_Example.PNG', - 'tutorials/9 - Torquetube Shading':'_images/tutorials_9_-_Torquetube_Shading_23_1.png', + 'tutorials/9 - Torquetube Shading':'_images/tutorials_9_-_Torquetube_Shading_24_1.png', 'tutorials/11 - AgriPV Systems': '_images/AgriPV_2.PNG', 'tutorials/13 - Modeling Modules with Glass': '_images/Glass_tilted_reflection.PNG', 'tutorials/14 - Cement Racking Albedo Improvements': '_images/Pavers.PNG', diff --git a/docs/sphinx/source/manualapi.rst b/docs/sphinx/source/manualapi.rst index ff11ff57..49e29d13 100644 --- a/docs/sphinx/source/manualapi.rst +++ b/docs/sphinx/source/manualapi.rst @@ -129,6 +129,8 @@ Mismatch :toctree: generated/ :caption: Mismatch Analysis + mismatch.mad_fn + mismatch.mismatch_fit2 mismatch.analysisIrradianceandPowerMismatch Support diff --git a/docs/sphinx/source/whatsnew/v0.4.3.rst b/docs/sphinx/source/whatsnew/v0.4.3.rst index 2d497647..b2084f60 100644 --- a/docs/sphinx/source/whatsnew/v0.4.3.rst +++ b/docs/sphinx/source/whatsnew/v0.4.3.rst @@ -2,34 +2,34 @@ v0.4.3 (Aug 27 2024) ------------------------ -Bugfix Release ... +Bugfix Release API Changes ~~~~~~~~~~~~ -* A new function can now be called to compile results and report out final irradiance and performance data: :func:`bifacial_radiance.RadianceObj.compileResults`. (This is a temporary function soon to be deprecated) +* A new function can now be called to compile results and report out final irradiance and performance data: ``RadianceObj.compileResults``. (This is a temporary function soon to be deprecated) * Multiple modules and rows can now be selected in a single analysis scan. ``modWanted`` and ``rowWanted`` inputs in :py:class:`~bifacial_radiance.RadianceObj.analysis1axis` can now be a list, to select multiple rows and modules for scans. (:issue:`405`)(:pull:`408`) -* To support multiple modules and row scans for 1axis simulations, outputs like Wm2Front are now stored in ``trackerdict``.``Results`` (:issue:`405`)(:pull:`408`) -* :func:`.mismatch.mad_fn` has new functionality and input parameter `axis`. If a 2D matrix or dataframe is passed in as data, MAD is calculated along the row (default) or along the columns by passing 'axis=1' -* :func:`bifacial_radiance.mismatch.mismatch_fit3` has been deprecated in favour of :func:`bifacial_radiance.mismatch.mismatch_fit2` which has a greater agreement with anual energy yield data (:issue:`520`) +* To support multiple modules and row scans for 1axis simulations, outputs like Wm2Front are now stored in ``trackerdict.Results`` (:issue:`405`)(:pull:`408`) +* ``mismatch.mismatch.mad_fn`` has new functionality and input parameter ``axis``. If a 2D matrix or dataframe is passed in as data, MAD is calculated along the row (default) or along the columns by passing 'axis=1' +* ``mismatch.mismatch_fit3`` has been deprecated in favour of ``mismatch.mismatch_fit2`` which has a greater agreement with anual energy yield data (:issue:`520`) Enhancements ~~~~~~~~~~~~ -* Added :func:`bifacial_radiance.mismatch.mismatch_fit2`, similar to :func:`bifacial_radiance.mismatch.mismatch_fit3`, with the recommended coefficients of the original publication. (:pull:`520`) +* Added ``mismatch.mismatch_fit2``, similar to ``mismatch.mismatch_fit3``, with the recommended coefficients of the original publication. (:pull:`520`) * Including `pyRadiance` as a requirement to help streamline RADIANCE installation and calls in a future release. (:pull:`532`) Bug fixes ~~~~~~~~~ -* Fixed error passing all of `sceneDict` into :func:`~bifacial_radiance.RadianceObj.makeScene1axis`. (:issue:`502`) -* Fixed Pandas 2.0 errors by re-factoring :func:`.mismatch.mad_fn` (:issue:`449`) +* Fixed error passing all of ``sceneDict`` into py:class:`~bifacial_radiance.RadianceObj.makeScene1axis`. (:issue:`502`) +* Fixed Pandas 2.0 errors by re-factoring py:class:`bifacial_radiance.mismatch.mad_fn` (:issue:`449`) * Switch from un-supported Versioneer to setuptools_scm (:issue:`519`) * Numpy 2.0 compatibility bug (:issue:`521`) -* Fixed bug in :func:`bifacial_radiance.mismatch.mismatch_fit3` where the function was not returning the correct values. It has also been deprecated in favour of :func:`bifacial_radiance.mismatch.mismatch_fit2` which has a greater agreement with anual energy yield data (:issue:`520`) +* Fixed bug in ``mismatch.mismatch_fit3`` where the function was not returning the correct values. It has also been deprecated in favour of ``mismatch.mismatch_fit2`` which has a greater agreement with anual energy yield data (:issue:`520`) * Updated Github Actions to use Node20: checkout@v4, setup-python@v5, coactions/setup-xvfb, setup-buildx-action@v3 (:pull:`517`) * Updated Github Actions to make Coveralls fail silently if it has an internal server error (:pull:`517`) * Fix PerformanceWarning and SettingWithCopyWarning (:issue:`515`) * Switch from Versioneer to setuptools_scm (:pull:`522`) -* Enable `coerce_year`=None if the TMYfile is all the same year (:issue:`526`) +* Enable ``coerce_year=None`` if the TMYfile is all the same year (:issue:`526`) Documentation ~~~~~~~~~~~~~~ @@ -37,7 +37,7 @@ Documentation * Updates to example notebooks * Reduce number of digits in makeScene .rad file titles. (:pull:`503`) * Reduce number of digits saved to files in \results (:pull:`534`) -* In the sceneDict reported in the trackerdict, save both `clearance_height` and `hub_height` parameters. (:pull:`503`) +* In the sceneDict reported in the trackerdict, save both ``clearance_height`` and ``hub_height`` parameters. (:pull:`503`) Contributors ~~~~~~~~~~~~ diff --git a/docs/sphinx/source/whatsnew/v0.4.4.rst b/docs/sphinx/source/whatsnew/v0.4.4.rst index 198beb94..77928926 100644 --- a/docs/sphinx/source/whatsnew/v0.4.4.rst +++ b/docs/sphinx/source/whatsnew/v0.4.4.rst @@ -1,14 +1,14 @@ .. _whatsnew_0440: -v0.4.4 (XX / XX / 2024) ------------------------- -Bugfix Release ... +v0.4.4 (October / XX / 2024) +---------------------------- +Bugfix Release with important updates to correct the indexing of trackerdict and gendaylit1axis API Changes ~~~~~~~~~~~~ -* New input parameter to :py:class:`~bifacial_radiance.ModuleObj and :py:func:`~bifacial_radiance.RadianceObj.makeModule`: `glassEdge`. If :py:class:`~bifacial_radiance.RadianceObj.makeModule` `glass` = True, then this extends the glass past the absorber edge by this total amount (half in each x and y direction). Default 10mm. -* Module glass thickness can be changed. In :py:func:`~bifacial_radiance.RadianceObj.makeModule`, if `glass` = True, then setting the `z` parameter will indicate the total (front + back) glass thickness with the 1mm absorber in the middle. The default is z = 10mm. +* New input parameter to :py:class:`~bifacial_radiance.ModuleObj and :py:func:`~bifacial_radiance.RadianceObj.makeModule`: ``glassEdge``. If :py:class:`~bifacial_radiance.RadianceObj.makeModule` ``glass`` = True, then this extends the glass past the absorber edge by this total amount (half in each x and y direction). Default 10mm. +* Module glass thickness can be changed. In :py:func:`~bifacial_radiance.RadianceObj.makeModule`, if ``glass`` = True, then setting the ``z`` parameter will indicate the total (front + back) glass thickness with the 1mm absorber in the middle. The default is z = 10mm. Enhancements ~~~~~~~~~~~~ @@ -17,15 +17,15 @@ Enhancements Deprecations ~~~~~~~~~~~~~~ -* .ini files loaded with :py:func:`bifacial_radiance.load.readconfigurationinputfile` use `azimuth` key instead of `axis_azimuth` (:issue:`438`)(:pull:`551`) -* :py:func:`bifacial_radiance.load.deepcleanResult` is now deprecated in favor of :py:func:`~bifacial_radiance.load.cleanResult` (:issue:`556`) +* .ini files loaded with :py:func:`bifacial_radiance.load.readconfigurationinputfile` use ``azimuth`` key instead of ``axis_azimuth`` (:issue:`438`)(:pull:`551`) +* :py:func:`bifacial_radiance.load.deepcleanResult` is now deprecated in favor of :py:func:`~bifacial_radiance.load.cleanResult` and will be removed to its own example notebook in a future release (:issue:`556`) * :py:func:`bifacial_radiance.mismatch.analysisIrradianceandPowerMismatch` is being removed to its own example notebook in a future release. (:issue:`556`) Bug fixes ~~~~~~~~~ * Fixed a major error with indexing the irradiance conditions with :py:func:`~bifacial_radiance.RadianceObj.gendaylit1axis`. This could result in the trackerdict entry being mismatched from the metdata resource. (:issue:`441`) * versioning with setuptools_scm- set fallback_version to bifirad v0.4.3 to prevent crashes if git is not present (:issue:`535`)(:pull:`539`) -* :py:func:`bifacial_radiance.load.readconfigurationinputfile` now properly handles loading moduleObj parameters from .ini files: `glass`, `glassEdge`, `frameParamsDict`, `omegaParamsDict` (:pull:`551`) +* :py:func:`bifacial_radiance.load.readconfigurationinputfile` now properly handles loading moduleObj parameters from .ini files: ``glass``, ``glassEdge``, ``frameParamsDict``, ``omegaParamsDict`` (:pull:`551`) * Fixed a leap year bug in :py:func:`~bifacial_radiance.RadianceObj.readWeatherFile` that crashed if epwfiles are loaded that include leap year data (like Feb. 28 2020). (:issue:`552`) * Bug fix in :py:func:`bifacial_radiance.load.cleanResult` that wouldn't work with files created when front and rear scan are different lengths. (:issue:`419`) * GUI bug fixes where the sensorsy was not loading correctly, module .rad file was not being re-written, and an invalid default timestamp is used. @@ -33,8 +33,8 @@ Bug fixes Documentation ~~~~~~~~~~~~~~ -* No longer provide a warning message when both `hub_height` and `clearance_height` are passed to :py:func:`~bifacial_radiance.AnalysisObj.moduleAnalysis` (:pull:`540`) -* More useful __repr__ output in :py:class:`~bifacial_radiance.AnalysisObj and :py:class:`~bifacial_radiance.MetObj (:issue:`471`) +* No longer provide a warning message when both ``hub_height`` and ``clearance_height`` are passed to :py:func:`~bifacial_radiance.AnalysisObj.moduleAnalysis` (:pull:`540`) +* More useful ``__repr__`` output in :py:class:`~bifacial_radiance.AnalysisObj` and :py:class:`~bifacial_radiance.MetObj` (:issue:`471`) Contributors ~~~~~~~~~~~~ diff --git a/requirements.txt b/requirements.txt index 77b53b66..62530087 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,7 +21,9 @@ pytest-cov==4.0.0 python-dateutil==2.8.2 pytz==2021.3 six==1.16.0 +sphinx == 7.3.7 +pydata-sphinx-theme == 0.15.4 sphinx-autoapi==1.8.4 -sphinx-rtd-theme==1.0.0 +sphinx-rtd-theme==3.0.1 requests future