Skip to content
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

Documentation refinements #14

Merged
merged 33 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
598ba39
Start small
adriesse Oct 31, 2024
a847c98
Module titles
adriesse Oct 31, 2024
28389ed
A little more this time
adriesse Oct 31, 2024
f75fa20
Getting back to work!
adriesse Jan 27, 2025
ac2f7a5
Moving right along.
adriesse Jan 27, 2025
d995fee
Don't stop now.
adriesse Jan 27, 2025
5a5faeb
You couldn't stop me if you tried.
adriesse Jan 27, 2025
212053c
Merge branch 'main' into docu
adriesse Jan 27, 2025
b9c6ed1
More
adriesse Jan 27, 2025
75b0aa9
Revert conf.py
adriesse Jan 27, 2025
85dd13f
Move examples and more
adriesse Jan 27, 2025
1b3aad2
Incremental improvements
adriesse Jan 27, 2025
9e4898e
New readme for pypi
adriesse Jan 27, 2025
791abcd
Get back nav bar?
adriesse Jan 27, 2025
a426c2f
More
adriesse Jan 27, 2025
e1d502c
More
adriesse Jan 27, 2025
ed5fe02
More
adriesse Jan 27, 2025
d452213
More
adriesse Jan 27, 2025
7f1ea57
Reduce toctree
adriesse Jan 28, 2025
97a5666
Hide toc
adriesse Jan 28, 2025
d3521db
matplotlib not optional
adriesse Jan 28, 2025
af5a782
Rearrange dependencies
adriesse Jan 28, 2025
baae0ba
Update copyrights
adriesse Jan 28, 2025
0b3bed9
Hide partly now?
adriesse Jan 28, 2025
f181574
Remove hidden again
adriesse Jan 28, 2025
9998996
Add note
adriesse Jan 28, 2025
3ff5ad3
Development
adriesse Jan 28, 2025
01e33e8
Apply suggestions from code review
adriesse Jan 28, 2025
cf3a927
Hide TOC; new logo
adriesse Jan 28, 2025
bc494f6
Logo
adriesse Jan 28, 2025
4aa0324
Remove toc heading
adriesse Jan 28, 2025
640234b
Changelog changes
adriesse Jan 28, 2025
970f730
Simplify user guide
adriesse Jan 28, 2025
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ Useful tools for photovoltaics and beyond!

Latest news
-----------
2024-02-13: More proof that these tools are useful! The module efficiency functions were put to good use in [this new study by Lelia Deville and her colleagues][101]:
2024-02-13: More proof that these tools are useful! The module efficiency functions were put to good use in [this new study by Lelia Deville and her colleagues][101]:

[101]: https://doi.org/10.1002/pip.3763


Copyright
---------

Copyright (c) 2019-2020 Anton Driesse, PV Performance Labs.
Copyright (c) 2019-2025 Anton Driesse, PV Performance Labs.


License
Expand Down
22 changes: 22 additions & 0 deletions README_PYPI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# PV Performance Labs Tools for Python

*Useful tools for photovoltaics and beyond!*

This package, ``pvpltools``, makes available a collection of useful
software components and functions created by Anton Driesse of PV Performance Labs.
Many were developed in the context of consulting or research projects,
sometimes as a necessity, and sometimes just to make life easier.

The aim of this package is to make life easier for people facing similar needs
and thereby, in a small way, support the accelerated deployment of photovoltaic power systems.

The current version of this package is found in the github repository
adriesse marked this conversation as resolved.
Show resolved Hide resolved
`pvplabs/pvpltools <https://github.com/pvplabs/pvpltools>`_ .
Prior to 2024, the code was made available in
`adriesse/pvpltools-python <https://github.com/adriesse/pvpltools-python>`_ .
This older repository will remain in place, but will not be updated.

``pvpltools`` is compatible with and complementary to
`pvlib python <https://pvlib-python.readthedocs.io>`_.
echedey-ls marked this conversation as resolved.
Show resolved Hide resolved


8 changes: 6 additions & 2 deletions docs/api_reference/dataplusmeta.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

.. currentmodule:: pvpltools

Data + Metadata manipulation utils
==================================
=======================
DataPlusMeta data files
=======================

Utities to combine columnar data and relevant metadata in a single text
file using a standard layout.

.. autosummary::
:toctree: generated/
Expand Down
20 changes: 18 additions & 2 deletions docs/api_reference/iec61853.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,24 @@

.. currentmodule:: pvpltools

IEC61853 Utils
==============
Energy rating (IEC 61853)
=========================

This module implements the energy rating calculations
described in standard IEC 61853.

The four main calculation steps are:

1. Calculate the angle-of-incidence correction using the functions:
- martin_ruiz()
- martin_ruiz_diffuse()
2. Evaluate the spectral factor using the functions:
- convert_to_banded()
- calc_spectral_factor()
3. Estimate the operating temperature using the function:
- faiman()
4. Determine the module efficiency using the class:
- BilinearInterpolator()
adriesse marked this conversation as resolved.
Show resolved Hide resolved

.. autosummary::
:toctree: generated/
Expand Down
7 changes: 3 additions & 4 deletions docs/api_reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ API Reference
=============

.. toctree::
:maxdepth: 2
:caption: Contents:
:maxdepth: 1

dataplusmeta
iec61853
module_efficiency
power_conversion
iec61853
dataplusmeta
13 changes: 11 additions & 2 deletions docs/api_reference/module_efficiency.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@

.. currentmodule:: pvpltools

Module efficiency modelling
===========================
====================
PV module efficiency
====================

This module contains implementations of several PV module efficiency models.

These models have a common purpose, which is to predict the efficiency at
maximum power point as a function of the main operating conditions:
effective irradiance and module temperature.

A function to fit any of these models to measurements is also provided.

.. autosummary::
:toctree: generated/
Expand Down
4 changes: 4 additions & 0 deletions docs/api_reference/power_conversion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
Power conversion
================

This module provides useful functions related to power conversion for
PV systems, including a flexible implementation of the ADR power loss
model, also known as the ADR inverter model.

.. autosummary::
:toctree: generated/

Expand Down
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "pvpltools"
copyright = "2024, Anton Driesse"
copyright = "2019-2025, Anton Driesse"
author = "Anton Driesse"

version = pvpltools.__version__
Expand Down Expand Up @@ -72,6 +72,8 @@
sphinx_gallery_conf = {
"examples_dirs": "../examples",
"gallery_dirs": "_autogenerated_examples",
# 'subsection_order': ['../examples/module_efficiency',
# '../examples/dataplusmeta'],
"filename_pattern": r"\.py",
# directory where function/class granular galleries are stored
'backreferences_dir': 'api_reference/generated/gallery_backreferences',
Expand Down
9 changes: 6 additions & 3 deletions docs/contribute/contributing.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
How to contribute
=================

Thanks for considering contributing to the project! We welcome contributions from
everyone. Please read the following guidelines before contributing, and in case
of any questions, don't hesitate to reach out.
If you would like to contribute to this project,
please consider creating an issue on github first,
or contact the maintainer(s) by email to discuss.

We try to follow the guidelines below ourselves
and would expect the same from you!

.. contents::
:local:
Expand Down
36 changes: 32 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,38 @@
pvpltools documentation
=======================
PV Performance Labs Tools for Python
=====================================

Welcome to pvpltools documentation!
*Useful tools for photovoltaics and beyond!*

This package, ``pvpltools``, makes available a collection of useful
software components and functions created by Anton Driesse of PV Performance Labs.
Many were developed in the context of consulting or research projects,
sometimes out of necessity, and sometimes just to make life easier.

The aim of this package is to make life easier for other people facing similar needs
and thereby, in a small way, support the accelerated deployment of photovoltaic power systems.

The current version of this package is found in the github repository
`pvplabs/pvpltools <https://github.com/pvplabs/pvpltools>`_ .
adriesse marked this conversation as resolved.
Show resolved Hide resolved
Prior to 2024, the code was made available in
`adriesse/pvpltools-python <https://github.com/adriesse/pvpltools-python>`_ .
This older repository will remain in place, but will not be updated.

``pvpltools`` is compatible with and complementary to
`pvlib python <https://pvlib-python.readthedocs.io>`_.

adriesse marked this conversation as resolved.
Show resolved Hide resolved

License
-------

`GPL-3.0 <https://github.com/pvplabs/pvpltools/blob/main/LICENSE>`_.
Feel free to let us know if that causes any problems!


Table of contents
-----------------

.. toctree::
:maxdepth: 2
:maxdepth: 1

adriesse marked this conversation as resolved.
Show resolved Hide resolved
user_guide/index
api_reference/index
Expand Down
10 changes: 9 additions & 1 deletion docs/user_guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@
User Guide
==========

Currently, there are four groups of functions related to the topics:

- PV module efficiency: modeling efficiency as a function of irradiance and temperature
- power conversion: efficiency losses in inverters, but not limited to inverters
- energy rating: the (evolving) IEC-61853 method for rating PV modules
- DataPlusMeta: read and write columnar data together with important metadata in a human-readable text file

adriesse marked this conversation as resolved.
Show resolved Hide resolved

.. toctree::
:maxdepth: 2

installation
quick-overview
installation
7 changes: 6 additions & 1 deletion docs/user_guide/installation.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
Installation
============

``pvpltools`` needs some commonly used packages like ``numpy``, ``scipy`` and ``pandas``.
Some functions also depend on ``pvlib`` or ``ruamel.yaml``.
The examples use ``matplotlib`` and ``openpyxl`` (indirectly).


To install ``pvpltools`` from PyPI, run:

.. code-block:: bash

pip install -U pvpltools
pip install pvpltools
adriesse marked this conversation as resolved.
Show resolved Hide resolved
12 changes: 7 additions & 5 deletions docs/user_guide/quick-overview.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Quick overview
==============

This project aims to allow for easy access to useful tools for photovoltaics.
It is a collection of utilities created by PV Performance Labs.
Users are encouraged to contribute to the project by submitting issues or pull
requests, so please, don't hesitate to reach out!
Currently, there are four groups of functions related to the topics:

- PV module efficiency: modeling efficiency as a function of irradiance and temperature
- power conversion: efficiency losses in inverters, but not limited to inverters
- energy rating: the (evolving) IEC-61853 method for rating PV modules
- DataPlusMeta: read and write columnar data together with important metadata in a human-readable text file
adriesse marked this conversation as resolved.
Show resolved Hide resolved


.. @Anton TODO, add more content as desired. Update index.rst with filenames.
37 changes: 27 additions & 10 deletions docs/whatsnews/0.0.0-pre-PyPI-release.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,39 @@
Updates prior to the first PyPI release
========================================

----


----

Historical notes
================

News items prior to the first PyPI release.

2024-02-13
^^^^^^^^^^

* More proof that these tools are useful!
The module efficiency functions were put to good use in
`this new study by Lelia Deville and her colleagues
<https://doi.org/10.1002/pip.3763>`_.


2021-10-17
----------
^^^^^^^^^^

* New module ``power_conversion``, which introduces a function for calculating the ADR inverter model coefficients and more.

2021-08-11
----------
^^^^^^^^^^

* The IEC 61853 spectral factor function has a new option ``integration_limit``. Explanations are provided in the doc string.
* The IEC 61853 spectral factor function has a new option ``integration_limit``. Explanations are provided in the doc string.

2020-12-02
----------
^^^^^^^^^^

* Seven models and a model fitting function are now available, and the example code shows how to fit them to data and calculate rms error for comparisons. And of course there are nice graphs:

- The new module ``module_efficiency.py`` now contains functions for:
* The new module ``module_efficiency.py`` contains functions for:
- the new ADR model
- HEY
- MotherPV
Expand All @@ -27,7 +44,7 @@ Updates prior to the first PyPI release
- fitting any of the models to measurements

2020-02-29
----------
^^^^^^^^^^

- The main building blocks for the Energy Rating calculation are complete.
- A higher level function of example script may be coming some day.
* The main building blocks for the Energy Rating calculation are complete.
* A higher level function of example script may be coming some day.
8 changes: 3 additions & 5 deletions docs/whatsnews/0.1.0.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
v0.1.0
======

2024-15-01
v0.1.0 (2025-02-01)
===================

* First official release of the project on PyPI.
* Documentation published on readthedocs.org.

.. note:: Feedback and contributions are welcome!
2 changes: 1 addition & 1 deletion docs/whatsnews/0.1.0a.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v0.1.0a1 - v0.1.0a2
v0.1.0a1 - v0.1.0a3
===================

- First alpha releases of the package through PyPI.
1 change: 0 additions & 1 deletion docs/whatsnews/_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
Changelog
=========

.. include:: _next_release.rst
.. include:: 0.1.0.rst
.. include:: 0.1.0a.rst
.. include:: 0.0.0-pre-PyPI-release.rst
5 changes: 5 additions & 0 deletions examples/300_module_efficiency/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PV Module Efficiency
--------------------

Using functions in the
:py:mod:`pvpltools.module_efficiency` submodule.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Module efficiency models
========================

Primer on the :py:mod:`pvpltools.module_efficiency` submodule.
Fit seven models to sample measurements and find the best one.
"""

from pvpltools.module_efficiency import (
Expand Down
5 changes: 5 additions & 0 deletions examples/800_dataplusmeta/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DataPlusMeta files:
------------------

Using functions in the
:py:mod:`pvpltools.dataplusmeta` submodule.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""
Using DataPlusMeta to read IEC 61853-1 matrix measurements
==========================================================
Using DataPlusMeta files
========================

This script demonstrates reading IEC 61853-1 matrix measurements
stored in the DataPlusMeta format.
Read a matrix of efficiency measurements and associated meta data.

Copyright (c) 2019-2020 Anton Driesse, PV Performance Labs.
"""
Expand Down
3 changes: 2 additions & 1 deletion examples/README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Example Gallery
===============

Here you will find examples on how to use the library. Feel free to contribute!
Here you will find examples that demonstrate what various functions
can do, and how to use them.
5 changes: 0 additions & 5 deletions examples/dataplusmeta/README.rst

This file was deleted.

5 changes: 0 additions & 5 deletions examples/module_efficiency/README.rst

This file was deleted.

Loading
Loading