README.md 1.53 KB
Newer Older
Justin Reid's avatar
Justin Reid committed
1
# NCML Transform Utility Demo
Justin Reid's avatar
Justin Reid committed
2
3

This file contains the code that is used in this NetCDF ISO XML generator. Although implemented for the command
Justin Reid's avatar
Justin Reid committed
4
5
line the core class that performs the transformation can be adapted to any interface. This wraps the **ncgen**, **ncdump**,
and **xsltproc** utilities, so be sure that these are installed on your system before using!
Justin Reid's avatar
Justin Reid committed
6

Justin Reid's avatar
Justin Reid committed
7
## Useage
Justin Reid's avatar
Justin Reid committed
8

9
```bash
10
ncmltransform.py --in_netcdf <nc_file_path> --xsl_file <xsl_file_path> [--out_path <out_path>, default=<user home>]
11
```
Justin Reid's avatar
Justin Reid committed
12

Justin Reid's avatar
Justin Reid committed
13
## Build Steps
Justin Reid's avatar
Justin Reid committed
14

15
In order to fully install the utility you will either need root privileges or set up a **virtualenv**. Otherwise in order
16
to run the tool you will need to type `python` and then the path to the **ncmltransform.py** script. The intended install
Justin Reid's avatar
Justin Reid committed
17
18
19
steps are as follows:

1. Clone this repository from GitLab
20
21
2. Optional but recommended. Setup a virtualenv by using the command `virtualenv --system-site-packages <venv_name>`.
This creates a virtualenv directory named `<venv_name>` and from there use the source utility by giving the command
22
`source <path to venv_name>/bin/activate`. This activates the virtualenv and makes you able to install python modules
Justin Reid's avatar
Justin Reid committed
23
in your own user account without affecting the global environment, or requiring root privileges.
24
3. run `python setup.py nosetests --all-modules`. This runs the unit testing suite and sees if there are any issues.
25
4. run `setup.py install` to install the utility. The utility can now be called from the command line without the need
26
to type `python`, but the **.py** extension will still be there.