How to install¶
Installation using conda¶
After having downloaded and installed anaconda, open a terminal (or the Anaconda Prompt on windows) and install straditize from the conda-forge channel. You can choose: We recommend to install straditize into its own environment via:
$ conda create -n straditize -c conda-forge straditize
and then activate this environment via:
$ conda activate straditize
In that way you do not mess up your base environment. Nevertheless you can also install it into an existing environment via:
$ conda install -c conda-forge straditize
In the same terminal, now type
straditize to start the software.
The latest master branch on github is always available under the
label on the chilipp channel. Just type:
$ conda install -c chilipp/label/master straditize
to install the latest version from the master branch. Note that you then have to add the conda-forge channel to your default channels via:
$ conda config --add channels conda-forge
Installation using pip¶
If you do not want to use conda for managing your python packages and already
have python3 installed on your computer, you can also
use the python package manager
pip. To be on the safe side, make sure you
have the Dependencies installed. If so, open a terminal and install it
$ pip install straditize
To open the software, type
straditize in the same terminal.
Installation from source¶
git clone https://github.com/Chilipp/straditize.git
and install it via:
pip install . # or python setup.py install, but pip is recommended
from your terminal. To open the software, type
straditize in the same
straditize has been tested for python>=3.6. Furthermore the package is built upon multiple other packages, mainly
psyplot-gui>1.2.0: The graphical user interface for psyplot
PyQt5: Pythons Qt bindings that are required by psyplot-gui (note that PyQt4 is not supported!)
matplotlib>=2.0: The python visualiation package
pillow: for reading and writing images
scikit-image: For image recognition features
openpyxl: For exports to Excel files
netCDF4: A library for saving and storing netCDF files.
Running the tests¶
$ python setup.py test
or install pytest by yourself and run
Alternatively you can build the recipe in the conda-recipe directory via
$ conda build conda-recipe
which will also run the test suite.
Running the entire test suite in one single process (such as
python setup.py test) might be quite memory consumptive because it involves the creation and closing of many PyQt widgets and unfortunately some memory is leaked from one test to another. Therefore we recommend to split the tests into multiple processes, e.g.:
# run the test suite but ignore some modules python setup.py test -a '--ignore=tests/widgets/test_selection_toolbar.py --ignore=tests/widgets/test_samples_table.py --ignore=tests/widgets/test_beginner.py --ignore=tests/widgets/test_hoya_del_castillo.py' # run the tests for the previously ignored modules python setup.py test -a 'tests/widgets/test_selection_toolbar.py tests/widgets/test_samples_table.py' python setup.py test -a 'tests/widgets/test_beginner.py' python setup.py test -a 'tests/widgets/test_hoya_del_castillo.py'
or equivalently with py.test instead of python setup.py test -a. Note that conda build conda-recipe already splits the session into multiple processes.
Nevertheless, you should expect about ~180 tests to be ran and a total memory usage of about 3 to 4GB RAM.
Building the docs¶
The online documentation is accessible as PDF, HTML and Epub under https://straditize.readthedocs.io or https://straditize.rtfd.io. Thanks to the free services by readthedocs.org, the online documentation is build automatically after each commit to the github repository.
To build the docs locally on your machine, check out the github repository and
install the requirements in
'docs/environment.yml' and the
sphinx_rtd_theme package. The easiest way to do this is via anaconda by
$ conda env create -f docs/environment.yml $ conda activate straditize_docs $ conda install sphinx_rtd_theme
Then build the docs via:
$ cd docs $ make html # or `make pdf` for a PDF version compiled with Latex
Updating the software depends on how you installed it on your system.
Updating via conda¶
If you installed straditize via conda (see Installation using conda), you can update it via:
$ conda update -c chilipp straditize
Updating via pip¶
If you installed it via
pip (see Installation using pip), you can update it
$ pip install -U straditize
Anyway, if you may want to remove the psyplot configuration files. If you did
not specify anything else (see
the configuration files for psyplot are located in the user home directory.
Under linux and OSX, this is
$HOME/.config/psyplot. On other platforms it
is in the
.psyplot directory in the user home.
Uninstallation via conda¶
If you installed straditize via conda, simply run:
conda uninstall straditize