Skip to content

Commit

Permalink
Merge branch 'release_branch'
Browse files Browse the repository at this point in the history
  • Loading branch information
SabineHaas committed Jan 17, 2019
2 parents b363c63 + 08204a3 commit 59876cc
Show file tree
Hide file tree
Showing 54 changed files with 6,946 additions and 1,030 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[run]
omit = tests/*
source = windpowerlib
8 changes: 7 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
Contributor Agreement
Fixes # .

Changes proposed in this pull request:
-
-
-

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ pip-delete-this-directory.txt

# Doc
doc/temp/
.doctrees
.buildinfo

# Unit test / coverage reports
htmlcov/
Expand Down Expand Up @@ -91,3 +93,6 @@ ENV/

# Rope project settings
.ropeproject

# tests
.pytest_cache
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
language: python

matrix:
include:
- python: 3.5
- python: 3.6
- python: 3.7
dist: xenial
sudo: true

# command to install dependencies
#before_install:
# - sudo apt-get install coinor-cbc

install:
- pip install .
- pip install coveralls sphinx nbformat pytest-cov jupyter

# command to run tests
script:
- coverage run --rcfile=.coveragerc --source windpowerlib -m py.test
- coverage report

after_success:
- coveralls
66 changes: 54 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
.. image:: https://travis-ci.org/wind-python/windpowerlib.svg?branch=dev
:target: https://travis-ci.org/wind-python/windpowerlib
.. image:: https://coveralls.io/repos/github/wind-python/windpowerlib/badge.svg?branch=dev
:target: https://coveralls.io/github/wind-python/windpowerlib?branch=dev

Introduction
=============

The windpowerlib is a library that provides a set of functions and classes to calculate the power output of wind turbines. It was originally part of the
`feedinlib <https://github.com/oemof/feedinlib>`_ (windpower and pv) but was taken out to build up a community concentrating on wind power models.
`feedinlib <https://github.com/oemof/feedinlib>`_ (windpower and photovoltaic) but was taken out to build up a community concentrating on wind power models.

For a quick start see the `Examples and basic usage <http://windpowerlib.readthedocs.io/en/stable/getting_started.html#examplereference-label>`_ section.

Expand All @@ -19,14 +24,16 @@ Go to the `download page <http://readthedocs.org/projects/windpowerlib/downloads
Installation
============

If you have a working Python3 environment, use pypi to install the latest windpowerlib version.
If you have a working Python 3 environment, use pypi to install the latest windpowerlib version. We highly recommend to use virtual environments.

::

pip3 install windpowerlib
pip install windpowerlib

The windpowerlib is designed for Python 3 and tested on Python >= 3.5.
Please see the `installation page <http://oemof.readthedocs.io/en/stable/installation_and_setup.html>`_ of the oemof documentation for complete instructions on how to install python and a virtual environment on your operating system.

So far, the windpowerlib is mainly tested on python 3.4 but seems to work down to 2.7.
Please see the `installation page <http://oemof.readthedocs.io/en/stable/installation_and_setup.html>`_ of the oemof documentation for complete instructions on how to install python on your operating system.
For retrieving power (coefficient) curves from the OpenEnergy Database (oedb) the python package requests will be installed with your windpowerlib installation. The windpowerlib was tested with requests version 2.20.1 but might work with lower versions.

Optional Packages
~~~~~~~~~~~~~~~~~
Expand All @@ -40,27 +47,62 @@ Matplotlib can be installed using pip3 though some Linux users reported that it
Examples and basic usage
=========================

The basic usage of the windpowerlib is shown `here <http://windpowerlib.readthedocs.io/en/stable/basic_example_notebook.html>`_. The presented example is available as jupyter notebook and python script. You can download them along with example weather data:
The basic usage of the windpowerlib is shown in the `modelchain_example <http://windpowerlib.readthedocs.io/en/stable/modelchain_example_notebook.html>`_. The presented example is available as jupyter notebook and python script. You can download them along with example weather data:

* `Python script <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/basic_example.py>`_
* `Jupyter notebook <https://raw.githubusercontent.com/wind-python/windpowerlib/features/revise_example/example/basic_example.ipynb>`_
* `ModelChain example (Python script) <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/modelchain_example.py>`_
* `ModelChain example (Jupyter notebook) <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/modelchain_example.ipynb>`_
* `Example data file <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/weather.csv>`_


To run the examples you first have to install the windpowerlib. To run the notebook you also need to install notebook using pip3. To launch jupyter notebook type ``jupyter notebook`` in terminal.
This will open a browser window. Navigate to the directory containing the notebook to open it. See the jupyter notebook quick start guide for more information on `how to install <http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/install.html>`_ and
`how to run <http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/execute.html>`_ jupyter notebooks.

Further functionalities, like the modelling of wind farms and wind turbine clusters, are shown in the `turbine_cluster_modelchain_example <http://windpowerlib.readthedocs.io/en/stable/turbine_cluster_modelchain_example_notebook.html>`_. As the ModelChain example it is available as jupyter notebook and as python script. The weather data in this example is the same as in the example above.

* `TurbineClusterModelChain example (Python script) <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/turbine_cluster_modelchain_example.py>`_
* `TurbineClusterModelChain example (Jupyter notebook) <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/turbine_cluster_modelchain_example.ipynb>`_

Contributing
==============

Clone/Fork: https://github.com/wind-python/windpowerlib
We are warmly welcoming all who want to contribute to the windpowerlib. If you are interested in wind models and want to help improving the existing model do not hesitate to contact us via github or email (windpowerlib@rl-institut.de).

If you are interested in wind models and want to help improve the existing model do not hesitate to contact us.
As the windpowerlib started with contributors from the `oemof developer group <https://github.com/orgs/oemof/teams/oemof-developer-group>`_ we use the same
Clone: https://github.com/wind-python/windpowerlib and install the cloned repository using pip:

.. code:: bash
pip install -e /path/to/the/repository
As the windpowerlib started with contributors from the `oemof developer group <https://github.com/orgs/oemof/teams/oemof-developer-group>`_ we use the same
`developer rules <http://oemof.readthedocs.io/en/stable/developing_oemof.html>`_.

**How to create a pull request:**

* `Fork <https://help.github.com/articles/fork-a-repo>`_ the windpowerlib repository to your own github account.
* Change, add or remove code.
* Commit your changes.
* Create a `pull request <https://guides.github.com/activities/hello-world/>`_ and describe what you will do and why.
* Wait for approval.

**Generally the following steps are required when changing, adding or removing code:**

* Add new tests if you have written new functions/classes.
* Add/change the documentation (new feature, API changes ...).
* Add a whatsnew entry and your name to Contributors.
* Check if all tests still work by simply executing pytest in your windpowerlib directory:

.. role:: bash(code)
:language: bash

.. code:: bash
pytest
Citing the windpowerlib
========================

We use the zenodo project to get a DOI for each version. `Search zenodo for the right citation of your windpowerlib version <https://zenodo.org/search?page=1&size=20&q=windpowerlib>`_.

License
============
Expand Down

0 comments on commit 59876cc

Please sign in to comment.