Skip to content
Snippets Groups Projects
Commit 04ef4d77 authored by David Verelst's avatar David Verelst
Browse files

docs: update install, move dependencies to developer guide

parent e008d6f4
No related branches found
No related tags found
No related merge requests found
Pipeline #
# Developer guide # 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. 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 ## Contents
...@@ -9,18 +10,18 @@ Thank you for your interest in developing wetb. This guide details how to contri ...@@ -9,18 +10,18 @@ Thank you for your interest in developing wetb. This guide details how to contri
- [Install Python](#Install-Python) - [Install Python](#Install-Python)
- [Install dependencies](#Install-dependencies) - [Install dependencies](#Install-dependencies)
- [Get wetb](#Get-wetb) - [Get wetb](#Get-wetb)
- [Install wetb](#Install-wetb) - [Install wetb](#Install-wetb)
- [Contributions](#Contributions) - [Contributions](#Contributions)
- [Upload contributions](#Upload-contributions) - [Upload contributions](#Upload-contributions)
- [Make and upload wheels](#Make-and-upload-wheels) - [Make and upload wheels](#Make-and-upload-wheels)
## Fork project ## Fork project
We prefer that you make your contributions in your own fork of the project, [make your changes](#Contributions) and [make a merge request](#Upload contributions). We prefer that you make your contributions in your own fork of the project,
[make your changes](#Contributions) and [make a merge request](#Upload contributions).
The project can be forked to your own user account via the \<Fork\> button on the [frontpage](https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox) The project can be forked to your own user account via the \<Fork\> button on
the [frontpage](https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox)
## Requirements ## Requirements
...@@ -49,15 +50,18 @@ rights on your computer. ...@@ -49,15 +50,18 @@ rights on your computer.
* Git comes with a simple GUI, but there are more and different options available * Git comes with a simple GUI, but there are more and different options available
if you are not happy with it, see [here](https://git-scm.com/downloads/guis). if you are not happy with it, see [here](https://git-scm.com/downloads/guis).
* On windows we highly recommend [tortoisegit](https://tortoisegit.org/). It is a gui integrated into the windows explorer. * On windows we highly recommend [tortoisegit](https://tortoisegit.org/). It
is a gui integrated into the windows explorer.
## Install Python ## Install Python
For all platforms we recommend that you download and install the Anaconda - a professional grade, full blown scientific Python distribution. 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 ### Installing Anaconda, activate root environment
* Download and install Anaconda (Python 3.5 version, 64 bit installer is recommended) from <https://www.continuum.io/downloads> * Download and install Anaconda (Python 3.5 version, 64 bit installer is
recommended) from <https://www.continuum.io/downloads>
> Note: The Python 2.7 or Python 3.5 choice of Anaconda only affects the > 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 root environment. You can always create additional environments using other
...@@ -87,7 +91,7 @@ use ```deactivate``` to deactivate the environment. ...@@ -87,7 +91,7 @@ use ```deactivate``` to deactivate the environment.
### Optionally, create other independent Anaconda environments ### Optionally, create other independent Anaconda environments
* By using environments you can manage different Python installations with By using environments you can manage different Python installations with
different versions on your system. Creating environments is as easy as: different versions on your system. Creating environments is as easy as:
``` ```
...@@ -96,7 +100,7 @@ different versions on your system. Creating environments is as easy as: ...@@ -96,7 +100,7 @@ different versions on your system. Creating environments is as easy as:
>> conda create -n py35 python=3.5 >> conda create -n py35 python=3.5
``` ```
* These environments can be activated as follows: These environments can be activated as follows:
``` ```
>> activate py27 >> activate py27
...@@ -107,10 +111,24 @@ different versions on your system. Creating environments is as easy as: ...@@ -107,10 +111,24 @@ different versions on your system. Creating environments is as easy as:
The Python distribution in use will now be located in e.g. \<path_to_anaconda\>/env/py35/ The Python distribution in use will now be located in e.g. \<path_to_anaconda\>/env/py35/
use ```deactivate``` to deactivate the environment. use ```deactivate``` to deactivate the environment.
## Install dependencies ## Install dependencies
- [numpy](http://www.numpy.org/)
- [cython](http://cython.org/)
- [scipy](http://scipy.org/scipylib/)
- [pandas](http://pandas.pydata.org/)
- xlrd and xlwt from [python-excel](http://www.python-excel.org/)
- [openpyxl](http://openpyxl.readthedocs.org/en/default/)
- [h5py](http://www.h5py.org/)
- [matplotlib](http://matplotlib.org/)
- [pytables](http://www.pytables.org/)
- [pyscaffold](http://pyscaffold.readthedocs.org/en/)
- pytest, pytest-cov
- six, [future](http://python-future.org/index.html)
- [parimeko](http://www.paramiko.org/)
Install the necessary Python dependencies using the conda package manager: Install the necessary Python dependencies using the conda package manager:
``` ```
...@@ -143,14 +161,14 @@ or via tortoise-git: ...@@ -143,14 +161,14 @@ or via tortoise-git:
If you make a change in the toolbox, that others can benefit from please make a merge request. 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. 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: The workflow to make a merge request is as follows:
- Create a feature branch, branch away from master - Create a feature branch, branch away from master
- Write tests and code - Write tests and code
- Push the commit(s) to your fork - Push the commit(s) to your fork
- Submit a merge request (MR) to the master branch of - Submit a merge request (MR) to the master branch of
- Link any relevant issues in the merge request description and leave a comment on them with a link back to the MR - Link any relevant issues in the merge request description and leave a comment on them with a link back to the MR
- Your tests should run as fast as possible, and if it uses test files, these files should be as small as possible. - Your tests should run as fast as possible, and if it uses test files, these files should be as small as possible.
- Please keep the change in a single MR as small as possible. Split the functionality if you can - Please keep the change in a single MR as small as possible. Split the functionality if you can
......
# Installation using Anaconda (Windows/Mac/Linux) # Anaconda (Windows/Mac/Linux)
Install the necessary Python dependencies using the conda package manager: ## Installation
Install the necessary Python dependencies using the ```conda``` package manager:
``` ```
conda install setuptools_scm future h5py pytables pytest nose sphinx conda install setuptools_scm future h5py pytables pytest nose sphinx blosc
conda install scipy pandas matplotlib cython xlrd coverage xlwt openpyxl psutil conda install scipy pandas matplotlib cython xlrd coverage xlwt openpyxl psutil
conda install -c https://conda.anaconda.org/conda-forge pyscaffold pytest-cov conda install -c https://conda.anaconda.org/conda-forge pyscaffold pytest-cov
``` ```
Now you can install ```wetb``` with ```pip```. However, we would like that Now you can install ```wetb``` with ```pip``` (there is no ```conda``` package
conda keeps track of the dependencies, so we'll tell ```pip``` not to check them: available yet, see [issue 21](toolbox/WindEnergyToolbox#21)).
Since we prefer that ```conda``` manages and installs all dependencies we
expclicitally tell ```pip``` to only install ```wetb``` and nothing more:
``` ```
pip install wetb --upgrade --no-deps pip install wetb --upgrade --no-deps
``` ```
# Updating ```wetb``` using Anaconda ## Update conda and ```wetb```
``` ```
conda update --all conda update --all
...@@ -26,14 +30,18 @@ pip install wetb --upgrade --no-deps ...@@ -26,14 +30,18 @@ pip install wetb --upgrade --no-deps
``` ```
# Installation using pip # Pip (Windows/Mac/Linux)
## Installation and update
```
pip install --upgrade wetb
```
# Works with Python 2 and Python 3 # Works with Python 2 and Python 3
This module is tested for Python 2 and 3 compatibility, and works on both This module is tested for Python 2.7 and 3.4+ compatibility, and works on both
Windows and Linux. Testing for Mac is on the way, but in theory it should work. Windows and Linux. Testing for Mac is on the way, but in theory it should work.
Python 2 and 3 compatibility is achieved with a single code base with the help Python 2 and 3 compatibility is achieved with a single code base with the help
of the Python module [future](http://python-future.org/index.html). of the Python module [future](http://python-future.org/index.html).
...@@ -50,33 +58,6 @@ in Python 2.7 by default. You can also write code that is compatible with both ...@@ -50,33 +58,6 @@ in Python 2.7 by default. You can also write code that is compatible with both
[issue 1](https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/issues/1)). [issue 1](https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/issues/1)).
# Dependencies
* [numpy](http://www.numpy.org/)
* [cython](http://cython.org/)
* [scipy](http://scipy.org/scipylib/)
* [pandas](http://pandas.pydata.org/)
* xlrd and xlwt from [python-excel](http://www.python-excel.org/)
* [openpyxl](http://openpyxl.readthedocs.org/en/default/)
* h5py
* [matplotlib](http://matplotlib.org/)
* [pytables](http://www.pytables.org/)
* [pyscaffold](http://pyscaffold.readthedocs.org/en/)
* pytest, pytest-cov
* six, [future](http://python-future.org/index.html)
# Note # Note
This project has been set up using PyScaffold 2.5. For details and usage This project has been set up using PyScaffold 2.5. For details and usage
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment