Skip to content

Commit 3030f20

Browse files
committed
Added conda installation functionality and updated associated
documentation.
1 parent e55f259 commit 3030f20

18 files changed

Lines changed: 274 additions & 37 deletions

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/.project
22
/.pydevproject
33
/GlabTop2/test/dem25m.map
4-
/GlabTop2/test/glacid25m.map
4+
/GlabTop2/test/glacid25m.map
5+
/.settings/

GlabTop2/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#-Authorship information-########################################################################################################################
2121
__author__ = 'Wilco Terink'
2222
__copyright__ = 'Wilco Terink'
23-
__version__ = '2.0.0'
24-
__date__ ='June 2018'
23+
__version__ = '2.0.1'
24+
__date__ ='July 2019'
2525
#################################################################################################################################################
2626

2727
import math, time, sys, getopt, os
@@ -299,7 +299,7 @@ def main(argv=None):
299299

300300
tic = time.clock()
301301
print('\nGlabTop2-py is developed by Wilco Terink\n')
302-
print('Version 2.0.0\n')
302+
print('Version 2.0.1\n')
303303
glabtop = GlabTop2(cfgfile)
304304
glabtop.run()
305305

README.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,19 @@ Reference documentation can be found `here <https://glabtop2-py.readthedocs.io/e
1313
Installation
1414
------------
1515

16-
GlabTop2-py can be installed via pip::
16+
GlabTop2-py can be installed via Anaconda::
17+
18+
conda install -c WilcoTerink GlabTop2-py
19+
20+
or via pip::
1721

1822
pip install GlabTop2-py
1923
2024
2125
Run GlabTop2-py
2226
---------------
2327

24-
After installation via pip, the tool can be executed by::
28+
After installation via Anaconda or pip, the tool can be executed by::
2529

2630
python -m GlabTop2.main -i config.cfg
2731

conda/meta.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{% set name = "GlabTop2-py" %}
2+
{% set version = "2.0.1" %}
3+
{% set sha256 = "f92203125b16d1ccd5c832db3170b0b6f7179d902d9645f7be2bee1f577dee87" %}
4+
5+
# sha256 is the prefered checksum -- you can get it for a file with:
6+
# `openssl sha256 <file name>`.
7+
# You may need the openssl package, available on conda-forge
8+
# `conda install openssl -c conda-forge``
9+
10+
package:
11+
name: {{ name|lower }}
12+
version: {{ version }}
13+
14+
source:
15+
fn: {{ name }}-{{ version }}.tar.gz
16+
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
17+
# If getting the source from GitHub remove the line above
18+
# uncomment the line below and modify as needed
19+
# url: https://github.com/simplejson/{{ name }}/archive/{{ version }}.tar.gz
20+
sha256: {{ sha256 }}
21+
22+
build:
23+
# Uncomment the following line if the package is pure python and the recipe is exactly the same for all platforms.
24+
# It is okay if the dependencies are not built for all platforms/versions, although selectors are still not allowed.
25+
# See https://conda-forge.org/docs/meta.html#building-noarch-packages for more details.
26+
noarch: python
27+
number: 0
28+
# If the installation is complex, or different between Unix and Windows, use separate bld.bat and build.sh files instead of this key.
29+
# By default, the package will be built for the Python versions supported by conda-forge and for all major OSs.
30+
# Add the line "skip: True # [py<35]" (for example) to limit to Python 3.5 and newer, or "skip: True # [not win]" to limit to Windows.
31+
script: python -m pip install --no-deps --ignore-installed .
32+
33+
requirements:
34+
build:
35+
- python
36+
- setuptools
37+
run:
38+
- python
39+
- pandas
40+
- numpy
41+
- simpledbf
42+
- scipy
43+
44+
test:
45+
imports:
46+
- GlabTop2
47+
48+
about:
49+
home: https://github.com/WilcoTerink/GlabTop2-py
50+
license: GNU General Public License v3 (GPL-3.0)
51+
license_family: GPL
52+
summary: GlabTop2 (Glacier bed Topography) model
53+
description: "Repository for the GlabTop2 model\r\n=============================================================\r\n\r\nThe documentation can be found here: https://glabtop2-py.readthedocs.io/en/latest/.\r\
54+
\n"
55+
doc_url: ''
56+
dev_url: ''
1.88 KB
Binary file not shown.
10.8 KB
Binary file not shown.
516 Bytes
Binary file not shown.

docs/build/html/_sources/installation.rst.txt

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,72 @@ Installation
1313
GlabTop2-py was developed using PCRaster version 4.2.1 and Python 3.6 (both 64 bits).
1414

1515

16-
This page describes how you can install GlabTop2-py. There are two ways of installing GlabTop2-py:
16+
This page describes how you can install GlabTop2-py. There are three ways of installing GlabTop2-py:
1717

18-
1. Install via :ref:`pip <installation_pip>`::
18+
1. Install via :ref:`Anaconda <installation_anaconda>`::
19+
20+
conda install -c WilcoTerink GlabTop2-py
21+
22+
2. Install via :ref:`pip <installation_pip>`::
1923
2024
pip install GlabTop2-py
2125
2226
2. Downloading the source code from the `GlabTop2-py GitHub repository <https://github.com/WilcoTerink/GlabTop2-py>`_
2327

2428
Each of these installation methods is described in detail in the sections below. The recommended installation is the
25-
**pip** method.
29+
**Anaconda** method.
30+
31+
32+
.. _anaconda:
33+
34+
Anaconda
35+
--------
36+
37+
About Anaconda
38+
^^^^^^^^^^^^^^
39+
40+
Anaconda is the world's most popular Python/R data science platform. The open-source Anaconda distribution is the easiest way
41+
to perform Python/R data science and machine learning on Linux, Windows, and Mac OS X. With over 11 million users worldwide, it
42+
is the industry standard for developing, testing, and training on a single machine, enabling individual data scientists to:
43+
44+
+ Quickly download 1,500+ Python/R data science packages
45+
+ Manage libraries, dependencies, and environments with Conda
46+
+ Develop and train machine learning and deep learning models with scikit-learn, TensorFlow, and Theano
47+
+ Analyze data with scalability and performance with Dask, NumPy, pandas, and Numba
48+
+ Visualize results with Matplotlib, Bokeh, Datashader, and Holoviews
49+
50+
More information about the Anaconda distribution can be found `here <https://www.anaconda.com/distribution/>`_.
51+
52+
Download Anaconda
53+
^^^^^^^^^^^^^^^^^
54+
55+
It is strongly recommended to use the Anaconda Python distribution to install and manage all your Python packages. The reason for
56+
this is because Anaconda checks for dependencies, installs missing dependencies or updates old depencies if required. Use the link below to
57+
download Anaconda Python:
58+
59+
+ `Python <https://repo.anaconda.com/archive/Anaconda3-2019.03-Windows-x86_64.exe>`_
60+
61+
By default this installs Python version 3.7. Momentarily, PCRaster only works with Python version 3.6. Therefore, you need to downgrade the Python installation using::
62+
63+
conda install python=3.6
64+
65+
.. _installation_anaconda:
66+
67+
Install GlabTop2-py using Anaconda
68+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
69+
70+
Once you have PCRaster and Anaconda installed you can easily install GlabTop2-py via the command prompt::
71+
72+
conda install -c WilcoTerink GlabTop2-py
73+
74+
The command above will always install the most recent GlabTop2-py release. Upgrading an already installed GlabTop2-py distribution
75+
to the most recent release can be achieved by::
76+
77+
conda update -c WilcoTerink GlabTop2-py
78+
79+
After you have installed GlabTop2-py, the package resides under::
80+
81+
PATH-TO-YOUR-ANACONDA-INSTALLATION\Lib\site-packages\GlabTop2
2682

2783

2884
.. _pip:
@@ -70,7 +126,7 @@ Alternatively, you can download GlabTop2-py from my GitHub repository:
70126
You can download the release you want, and extract the contents to a folder on your hard drive.
71127
GlabTop2-py can then be run from inside this folder.
72128

73-
Installation by this method, however, is not recommended because it does not check for the dependencies that are required to run GlabTop2-py, whereas the :ref:`pip <pip>`
129+
Installation by this method, however, is not recommended because it does not check for the dependencies that are required to run GlabTop2-py, whereas the :ref:`Anaconda <anaconda>`
74130
installation method does.
75131

76132

docs/build/html/_sources/running.rst.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ Running GlabTop2-py
77
This section describes how you can run GlabTop2-py. How-to run the tool depends on the way you have installed
88
GlabTop2-py:
99

10-
1. Installation via :ref:`pip <installation_pip>`
10+
1. Installation via :ref:`Anaconda <installation_anaconda>` or :ref:`pip <installation_pip>`
1111

1212
2. Installation using the download from the :ref:`GitHub repository <installation_github>`
1313

1414
See ONE of the sections below for how-to run GlabTop2-py depending on the chosen installation method.
1515

16-
Run via pip installation
17-
------------------------
16+
Run via Anaconda or pip installation
17+
------------------------------------
1818

19-
If you have installed GlabTop2-py via pip, then you can run GlabTop2-py from any location
19+
If you have installed GlabTop2-py via Anaconda or pip, then you can run GlabTop2-py from any location
2020
on your PC; i.e. you do not need to refer to the physical address where the GlabTop2-py source code resides.
2121
This is an advantage, because you do not need to copy all the source code files everytime you start
2222
a new project.

docs/build/html/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,13 @@ <h1>Contents<a class="headerlink" href="#contents" title="Permalink to this head
170170
</ul>
171171
</li>
172172
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a><ul>
173+
<li class="toctree-l2"><a class="reference internal" href="installation.html#anaconda">Anaconda</a></li>
173174
<li class="toctree-l2"><a class="reference internal" href="installation.html#pip">pip</a></li>
174175
<li class="toctree-l2"><a class="reference internal" href="installation.html#download-from-github-repository">Download from GitHub repository</a></li>
175176
</ul>
176177
</li>
177178
<li class="toctree-l1"><a class="reference internal" href="running.html">Running GlabTop2-py</a><ul>
178-
<li class="toctree-l2"><a class="reference internal" href="running.html#run-via-pip-installation">Run via pip installation</a></li>
179+
<li class="toctree-l2"><a class="reference internal" href="running.html#run-via-anaconda-or-pip-installation">Run via Anaconda or pip installation</a></li>
179180
<li class="toctree-l2"><a class="reference internal" href="running.html#run-via-the-github-download-installation">Run via the GitHub download installation</a></li>
180181
</ul>
181182
</li>

0 commit comments

Comments
 (0)