-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathINSTALL.txt
136 lines (89 loc) · 3.34 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
=======
Install
=======
::
pip install numpy && pip install .
It is of note that numpy must be installed before the rest of the packages.
Some required packages will not install concurrently with numpy. This is the
basic installation. If you need to perform any kind of operation on netCDF,
KML, etc you will need to install with extras. Please see Deploying.
Dependencies
============
Dependencies are listed in setup.py. Don't worry about them. Read this first to
find out whether you need all of them.
Dependency tree
---------------
All nodes are python packages except those marked as libraries.
* libcchdo
- geoalchemy
+ SQLAlchemy
+ MySQL-python (optional if you have downloaded a cached database)
* MySQL (library)
- netCDF4 (optional) for netCDF file manipulation
+ numpy
+ netCDF >=3.0 (library)
* HDF5 (library, needed to write netCDF 4 files)
- cdecimal (optional but highly recommended) provides a HUGE speed boost
- coverage (optional) only needed for test coverage
- lxml (optional) used to generate HTML for csv_view
+ lxml (library)
- docutils (optional) used to check ReStructuredText format.
- oauth2 (optional) used for downloading Bitbucket wiki content
- paramiko (optional) used for data directory manipulation
- scipy (optional) needed for interpolation and scientific math
- PIL (optional) needed for image processing plot thumbnails
- matplotlib (optional) needed for plotting
+ geos (library)
- basemap (optional) needed for plotting maps
- pykml (optional) used to write KML documents.
External Libraries
------------------
You need to install these yourself based on your operating system.
* MySQL
* netCDF4
- HDF5 - library needed by netCDF 4 to write files
* libgeos
Using pip
=========
You'll want to install pip (package manager for Python).
Developing
----------
When developing, you want to be able to edit and run code without reinstalling.
`pip` will allow you to do this by installing the package as editable::
pip install --editable .
or
::
pip install -e .
Again, if you wish to use any special functions, please see Deploying.
Deploying
---------
If you do not want any optional packages you can simply run pip install::
pip install .
If you do want extras, you can find them under `extras_require`. Only
`pip>=1.2.0` understands this command.
::
# Install all extras
pip install .[all]
# Install only extras that are specified
pip install .[speed,netcdf,plot,merge]
# Install extras with code in editable mode
pip install -e .[all]
Managed deployment
------------------
The included script libcchdo/scripts/hydro-vm is able to manage simultaneous
deployment of multiple versions of libcchdo. Follow these steps to install
hydro-vm properly
::
# Install the script
$ SCRIPT_NAME="hydro-vm"
$ cp libcchdo/scripts/${SCRIPT_NAME} "${CCHDO_BINS}"
$ sudo chown admin "${CCHDO_BINS}/${SCRIPT_NAME}"
$ sudo chmod 755 "${CCHDO_BINS}/${SCRIPT_NAME}"
# Add the script to the path
$ CCHDO_BINS="/usr/local/cchdo/bin"
$ echo "${CCHDO_BINS}" >> /etc/paths.d/cchdo
# Automatically upgrade the main installation to the latest on git master
$ alias as="sudo -u"
$ as admin hydro-vm install
# Install specific git commits as deployment_name
# as admin hydro-vm install <commit> <deployment_name>