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

Revise the documentation #63

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

Changelog
=========

0.0.0 (2021-06-10)
------------------
++++++++++++++++++

Includ from CHANGELOG.rst
#########################

* First release on PyPI.
9 changes: 3 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ Overview

.. start-badges

.. list-table::
:stub-columns: 1

|workflow_pytests| |workflow_checks| |docs| |appveyor| |requires| |coveralls| |packaging|
|workflow_pytests| |workflow_checks| |docs| |requires| |coveralls| |packaging|
|version| |wheel| |supported-versions| |supported-implementations| |commits-since|

.. |docs| image:: https://readthedocs.org/projects/feedinlib/badge/?style=flat
Expand All @@ -31,9 +28,9 @@ Overview
:alt: Requirements Status
:target: https://requires.io/github/oemof/feedinlib/requirements/?branch=master

.. |coveralls| image:: https://coveralls.io/repos/oemof/feedinlib/badge.svg?branch=master&service=github
.. |coveralls| image:: https://coveralls.io/repos/github/oemof/feedinlib/badge.svg?branch=dev
:alt: Coverage Status
:target: https://coveralls.io/r/oemof/feedinlib
:target: https://coveralls.io/github/oemof/feedinlib?branch=dev

.. |version| image:: https://img.shields.io/pypi/v/feedinlib.svg
:alt: PyPI Package latest release
Expand Down
18 changes: 9 additions & 9 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _api:

#############
###
API
#############
###


Power plant classes
Expand Down Expand Up @@ -31,7 +31,7 @@ wind power feed-in, respectively, have been implemented.
feedinlib.models.WindpowerlibTurbineCluster

Weather data
====================
============

The feedinlib enables download of open_FRED weather data (local reanalysis data for Germany)
and ERA5 weather data (global reanalysis data for the whole world).
Expand All @@ -44,26 +44,26 @@ and ERA5 weather data (global reanalysis data for the whole world).
feedinlib.era5.get_era5_data_from_datespan_and_position

Tools
====================
=====

.. autosummary::
:toctree: temp/

feedinlib.models.get_power_plant_data

Abstract classes
====================
================

The feedinlib uses abstract classes for power plant and feed-in models that serve as blueprints
for classes that implement those models. This ensures that new models provide required
implementations that make it possible to easily exchange the model used in your calculation.
They are important for people who want to implement new power plant and model classes
They are important for people who want to implement new power plant and model classes
rather than for users.

.. autosummary::
:toctree: temp/

feedinlib.powerplants.Base
feedinlib.models.Base
feedinlib.models.PhotovoltaicModelBase
feedinlib.models.WindpowerModelBase
feedinlib.models.base.Base
feedinlib.models.base.PhotovoltaicModelBase
feedinlib.models.base.WindpowerModelBase
18 changes: 18 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
Changelog
=========

These are new features and improvements of note in each release

.. contents:: `Releases`
:depth: 1
:local:
:backlinks: top

.. include:: ../CHANGELOG.rst

.. include:: whatsnew/v0-1-0.rst
.. include:: whatsnew/v00012.rst
.. include:: whatsnew/v00011.rst
.. include:: whatsnew/v00010.rst
.. include:: whatsnew/v0009.rst
.. include:: whatsnew/v0008.rst
.. include:: whatsnew/v0007.rst
73 changes: 46 additions & 27 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,62 @@
import os

extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.coverage',
'sphinx.ext.doctest',
'sphinx.ext.extlinks',
'sphinx.ext.ifconfig',
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.coverage",
"sphinx.ext.doctest",
"sphinx.ext.extlinks",
"sphinx.ext.ifconfig",
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
]
source_suffix = '.rst'
master_doc = 'index'
project = 'feedinlib'
year = '2015-2021'
author = 'oemof developer group'
copyright = '{0}, {1}'.format(year, author)
version = release = '0.0.0'
source_suffix = ".rst"
master_doc = "index"
project = "feedinlib"
year = "2015-2021"
author = "oemof developer group"
copyright = "{0}, {1}".format(year, author)
version = release = "0.0.0"

pygments_style = 'trac'
templates_path = ['.']
pygments_style = "trac"
templates_path = ["_templates"]
extlinks = {
'issue': ('https://github.com/oemof/feedinlib/issues/%s', '#'),
'pr': ('https://github.com/oemof/feedinlib/pull/%s', 'PR #'),
"pandas": ("https://pandas.pydata.org/docs/reference/api/%s.html", ""),
"pvlib": (
"https://pvlib-python.readthedocs.io/en/stable/generated/%s.html#",
"",
),
"windpowerlib": (
"https://windpowerlib.readthedocs.io/en/stable/temp/%s.html#",
"",
),
# work around for wind turbine attributes
"wind_turbine": (
(
"https://windpowerlib.readthedocs.io/en/stable/temp/windpowerlib."
"wind_turbine.WindTurbine.html#%s"
),
"",
),
"shapely": (
"https://shapely.readthedocs.io/en/latest/manual.html#%s",
"shapely.",
),
"issue": ("https://github.com/oemof/feedinlib/issues/%s", "#"),
"pr": ("https://github.com/oemof/feedinlib/pull/%s", "PR #"),
}
# on_rtd is whether we are on readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
on_rtd = os.environ.get("READTHEDOCS", None) == "True"

if not on_rtd: # only set the theme if we're building docs locally
html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"

html_use_smartypants = True
html_last_updated_fmt = '%b %d, %Y'
html_last_updated_fmt = "%b %d, %Y"
html_split_index = False
html_sidebars = {
'**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'],
}
html_short_title = '%s-%s' % (project, version)
html_sidebars = {"**": ["searchbox.html", "globaltoc.html", "sourcelink.html"]}
html_short_title = "%s-%s" % (project, version)

napoleon_use_ivar = True
napoleon_use_rtype = False
Expand Down
6 changes: 0 additions & 6 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,3 @@
Examples
#############


.. toctree::
load_open_fred_weather_data
load_era5_weather_data
run_pvlib_model
run_windpowerlib_turbine_model
12 changes: 5 additions & 7 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
~~~~~~~~~~~~~~~~~~~~~~
Getting started
~~~~~~~~~~~~~~~~~~~~~~
.. include:: ../README.rst

The feedinlib is designed to calculate feed-in time series of photovoltaic and wind power plants.
It is part of the oemof group but works as a standalone application.
Expand Down Expand Up @@ -41,10 +39,10 @@ Examples and basic usage
The basic usage of the feedinlib is shown in the :ref:`examples_section_label` section.
The examples are provided as jupyter notebooks that you can download here:

* :download:`ERA5 weather data example <../example/load_era5_weather_data.ipynb>`
* :download:`open_FRED weather data example <../example/load_open_fred_weather_data.ipynb>`
* :download:`pvlib model example <../example/run_pvlib_model.ipynb>`
* :download:`windpowerlib model example <../example/run_windpowerlib_turbine_model.ipynb>`
* :download:`ERA5 weather data example <../examples/load_era5_weather_data.ipynb>`
* :download:`open_FRED weather data example <../examples/load_open_fred_weather_data.ipynb>`
* :download:`pvlib model example <../examples/run_pvlib_model.ipynb>`
* :download:`windpowerlib model example <../examples/run_windpowerlib_turbine_model.ipynb>`

Furthermore, you have to install the feedinlib with additional packages needed to run the notebooks, e.g. `jupyter`.

Expand Down
2 changes: 0 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Contents
.. toctree::
:maxdepth: 2

readme
getting_started
installation
usage
Expand All @@ -16,7 +15,6 @@ Contents
contributing
authors
changelog
whats_new

Indices and tables
==================
Expand Down
5 changes: 4 additions & 1 deletion docs/parameter_names.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Parameter Names
---------------

==================================================== ====== ================== ====== ================== ======
feedinlib windpowerlib pvlib
------------------------------------------------------------ -------------------------- --------------------------
Expand All @@ -10,4 +13,4 @@ roughness_length m roughness_length m
surface_normalized_global_downwelling_shortwave_flux W/m^2 ghi W/m^2
surface_diffuse_downwelling_shortwave_flux W/m^2 dhi W/m^2
surface_normalized_direct_downwelling_shortwave_flux W/m^2 dni W/m^2
==================================================== ====== ================== ====== ================== ======
==================================================== ====== ================== ====== ================== ======
1 change: 0 additions & 1 deletion docs/readme.rst

This file was deleted.

5 changes: 4 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
sphinx>=1.4
ipykernel
nbsphinx
psycopg2
psycopg2-binary
sphinx-rtd-theme
geopandas
xarray
cdsapi
pvlib
3 changes: 1 addition & 2 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
Usage
=====

To use feedinlib in a project::
To use feedinlib in a project:

import feedinlib
15 changes: 0 additions & 15 deletions docs/whats_new.rst

This file was deleted.

35 changes: 35 additions & 0 deletions docs/whatsnew/v0-1-0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
v0.1.0 ()
+++++++++

New features
############




Documentation
#############




Testing
#######



Bug fixes
#########




Other changes
#############



Contributors
############


File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def read(*names, **kwargs):
"pandas >= 1.0",
"xarray >= 0.12.0",
"descartes",
"SQLAlchemy < 1.4.0, >=1.3.0"
"SQLAlchemy < 1.4.0, >=1.3.0",
],
extras_require={
"dev": [
Expand All @@ -100,11 +100,9 @@ def read(*names, **kwargs):
"punch.py",
"pytest",
"sphinx_rtd_theme",
"open_FRED-cli"
],
"data-sources": [
"open_FRED-cli",
],
"data-sources": ["open_FRED-cli"],
"examples": ["jupyter", "matplotlib", "descartes"],
},
)
4 changes: 2 additions & 2 deletions src/feedinlib/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def feedin(self, weather, power_plant_parameters, **kwargs):

Returns
-------
feedin : :pandas:`pandas.Series<series>`
feedin : :pandas:`pandas.Series`
Series with power plant feed-in for specified time span in Watt.
If respective model does calculate AC and DC feed-in, AC feed-in
should be returned by default. `mode` parameter can be used to
Expand Down Expand Up @@ -222,7 +222,7 @@ def get_power_plant_data(dataset, **kwargs):
information.
* windpowerlib wind turbine dataset: 'oedb_turbine_library'

See :windpowerlib:`get_turbine_types <windpowerlib.wind_turbine.\
See :windpowerlib:`get_turbine_types <windpowerlib.data.\
get_turbine_types>` for further information.

**kwargs
Expand Down
Loading