From 04ef4d777d986dd59f5344587fc820d321f68fab Mon Sep 17 00:00:00 2001 From: dave <dave@dtu.dk> Date: Fri, 25 Nov 2016 13:36:22 +0100 Subject: [PATCH] docs: update install, move dependencies to developer guide --- docs/developer-guide.md | 46 ++++++++++++++++++++++++++----------- docs/install.md | 51 +++++++++++++---------------------------- 2 files changed, 48 insertions(+), 49 deletions(-) diff --git a/docs/developer-guide.md b/docs/developer-guide.md index ab781f24..1bfedf61 100644 --- a/docs/developer-guide.md +++ b/docs/developer-guide.md @@ -1,6 +1,7 @@ # 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 @@ -9,18 +10,18 @@ Thank you for your interest in developing wetb. This guide details how to contri - [Install Python](#Install-Python) - [Install dependencies](#Install-dependencies) - [Get wetb](#Get-wetb) -- [Install wetb](#Install-wetb) +- [Install wetb](#Install-wetb) - [Contributions](#Contributions) - [Upload contributions](#Upload-contributions) - [Make and upload wheels](#Make-and-upload-wheels) - - ## 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 @@ -49,15 +50,18 @@ rights on your computer. * 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). -* 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 -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 -* 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 root environment. You can always create additional environments using other @@ -87,7 +91,7 @@ use ```deactivate``` to deactivate the environment. ### 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: ``` @@ -96,7 +100,7 @@ different versions on your system. Creating environments is as easy as: >> conda create -n py35 python=3.5 ``` -* These environments can be activated as follows: +These environments can be activated as follows: ``` >> activate py27 @@ -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/ use ```deactivate``` to deactivate the environment. - + ## 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: ``` @@ -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 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: - Create a feature branch, branch away from master - Write tests and code - 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 - 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 diff --git a/docs/install.md b/docs/install.md index fdf6505d..4d86e376 100644 --- a/docs/install.md +++ b/docs/install.md @@ -1,23 +1,27 @@ -# 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 -c https://conda.anaconda.org/conda-forge pyscaffold pytest-cov ``` -Now you can install ```wetb``` with ```pip```. However, we would like that -conda keeps track of the dependencies, so we'll tell ```pip``` not to check them: +Now you can install ```wetb``` with ```pip``` (there is no ```conda``` package +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 ``` -# Updating ```wetb``` using Anaconda +## Update conda and ```wetb``` ``` conda update --all @@ -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 -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. 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). @@ -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)). -# 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 This project has been set up using PyScaffold 2.5. For details and usage -- GitLab