Developer guide

Thank you for your interest in developing wetb. This guide details how to contribute to wetb in a way that is efficient for everyone.

Contents

Fork project

We prefer that you make your contributions in your own fork of the project, make your changes and make a merge request.

The project can be forked to your own user account via the <Fork> button on the frontpage

Requirements

Command line

This guide will use the command line (aka command prompt) frequently. You can launch a Windows terminal as follows: press Start> and type "cmd" + <Enter>. A link to the command prompt should be visible now.

In case you want an alternative, more capable windows terminal, you could consider using ConEmu (this is optional).

ConEmu-Maximus5 is a Windows console emulator with tabs, which presents multiple consoles and simple GUI applications as one customizable GUI window with various features.

Git

Install Python

For all platforms we recommend that you download and install the Anaconda - a professional grade, full blown scientific Python distribution.

Installing Anaconda, activate root environment

Note: The Python 2.7 or Python 3.5 choice of Anaconda only affects the root environment. You can always create additional environments using other Python versions, see below.

>> conda update --all
>> activate

and your terminal will do something like:

C:\Users\> activate
[Anaconda3] C:\Users\>

note that the name of the environment is now a prefix before the current path.

use deactivate to deactivate the environment.

Optionally, create other independent Anaconda environments

>> conda create -n py27 python=2.7
>> conda create -n py34 python=3.4
>> conda create -n py35 python=3.5
>> activate py27
>> activate py34
>> activate py35

The Python distribution in use will now be located in e.g. <path_to_anaconda>/env/py35/

use deactivate to deactivate the environment.

Install dependencies

Install the necessary Python dependencies using the conda package manager:

>> conda install setuptools_scm future h5py pytables pytest nose sphinx
>> conda install scipy pandas matplotlib cython xlrd coverage xlwt openpyxl psutil
>> conda install -c https://conda.anaconda.org/conda-forge pyscaffold pytest-cov

Get wetb

Copy the https - link on the front page of your fork of wetb

>> git clone <https-link>

or via tortoise-git:

Install wetb

>> cd WindEnergyToolbox
>> pip install -e . --no-deps

Contributions

If you make a change in the toolbox, that others can benefit from please make a merge request.

If you can, please submit a merge request with the fix or improvements including tests.

The workflow to make a merge request is as follows:

Upload contributions

To be written

Make and upload wheels

>> conda install --channel https://conda.anaconda.org/pbrod twine