Changeset 5347 for nappy


Ignore:
Timestamp:
28/05/09 11:00:39 (10 years ago)
Author:
astephen
Message:

Updated tests and scripts.

Location:
nappy/trunk/nappy/script
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • nappy/trunk/nappy/script/na2nc.py

    r5149 r5347  
    123123if __name__ == "__main__": 
    124124 
    125     print nappy.__file__ 
    126125    args=sys.argv[1:] 
    127126    na2nc(args) 
  • nappy/trunk/nappy/script/nc2csv.py

    r5156 r5347  
    4040# Imports from python standard library 
    4141import sys 
     42import getopt 
    4243 
    4344# Import from nappy package 
    44 from nc2na import * 
     45import nc2na 
     46 
     47# Uses nc2na(...) directly 
     48 
    4549 
    4650 
     
    5256 
    5357    args.extend(["-d", ","]) 
    54     nc2na(args) 
     58    nc2na.nc2na(args) 
  • nappy/trunk/nappy/script/nc2na.py

    r5156 r5347  
    128128    nc_file = arg_dict["nc_file"] 
    129129    del arg_dict["nc_file"] 
    130     print arg_dict 
    131130    na_files = apply(nappy.convertNCToNA, [nc_file], arg_dict) 
    132131 
  • nappy/trunk/nappy/script/run_cmd_line_tests.py

    r5345 r5347  
    1717 
    1818 
    19 import os, commands 
     19import os 
    2020 
    2121import sys 
     
    3636        continue 
    3737    print "Running: ", test 
    38     output = commands.getoutput("python " + test)  
    39     continue 
    40     ol = output.split("\n") 
    41     for i in ol: 
    42         if i.find("DeprecationWarning") > -1: continue 
    43         print i 
     38    os.system(test)  
  • nappy/trunk/nappy/script/tests-nc2csv.py.txt

    r5346 r5347  
    1 nc2na.py ../../test_outputs/ 
    2 nc2na.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc.na 
    3 nc2na.py -i ../../test_outputs/1010.nc -o ../../test_outputs/1010-from-nc.na 
    4 nc2na.py -i ../../test_outputs/2010.nc -o ../../test_outputs/2010-from-nc.na 
    5 nc2na.py -i ../../test_outputs/3010.nc -o ../../test_outputs/3010-from-nc.na 
    6 nc2na.py -i ../../test_outputs/4010.nc -o ../../test_outputs/4010-from-nc.na 
    7  
    8 nc2na.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-excludes.na -e "Ascent Rate" 
    9 nc2na.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-overwrite.na --overwrite-metadata=ONAME,"See line 2 - my favourite org." 
    10 nc2na.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-as-padded-ints.na -f "%03d" 
    11 nc2na.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-csv.na -s , 
    12 nc2na.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-no-header.na --no-header 
    13 nc2na.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-annotated.na --annotated 
    14 nc2na.py -i ../../test_outputs/1001.nc --names-only 
    15  
    16 #    nc2na.py [-v <var_list>] [--ffi=<ffi>] [-f <float_format>] 
    17 #             [-s <delimiter>] [-l <limit_ffi_1001_rows>] 
    18 #             [-e <exclude_vars>] [--overwrite-metadata=<key1>,<value1>[,<key2>,<value2>[...]]] 
    19 #             [--names-only] 
    20 #             -i <nc_file> [-o <na_file>] 
    21  
     1nc2csv.py ../../test_outputs/ 
     2nc2csv.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc.csv 
     3nc2csv.py -i ../../test_outputs/1010.nc -o ../../test_outputs/1010-from-nc.csv 
     4nc2csv.py -i ../../test_outputs/2010.nc -o ../../test_outputs/2010-from-nc.csv 
     5nc2csv.py -i ../../test_outputs/3010.nc -o ../../test_outputs/3010-from-nc.csv 
     6nc2csv.py -i ../../test_outputs/4010.nc -o ../../test_outputs/4010-from-nc.csv 
     7nc2csv.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-excludes.csv -e "Ascent Rate" 
     8nc2csv.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-overwrite.csv --overwrite-metadata=ONAME,"See line 2 - my favourite org." 
     9nc2csv.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-as-padded-ints.csv -f "%03d" 
     10nc2csv.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-csv.csv -d , 
     11nc2csv.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-no-header.csv --no-header 
     12nc2csv.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-annotated.csv --annotated 
     13nc2csv.py -i ../../test_outputs/1001.nc --names-only 
  • nappy/trunk/nappy/script/tests-nc2na.py.txt

    r5346 r5347  
    55nc2na.py -i ../../test_outputs/3010.nc -o ../../test_outputs/3010-from-nc.na 
    66nc2na.py -i ../../test_outputs/4010.nc -o ../../test_outputs/4010-from-nc.na 
    7  
    87nc2na.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-excludes.na -e "Ascent Rate" 
    98nc2na.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-overwrite.na --overwrite-metadata=ONAME,"See line 2 - my favourite org." 
    109nc2na.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-as-padded-ints.na -f "%03d" 
    11 nc2na.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-csv.na -s , 
     10nc2na.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-csv.na -d , 
    1211nc2na.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-no-header.na --no-header 
    1312nc2na.py -i ../../test_outputs/1001.nc -o ../../test_outputs/1001-from-nc-annotated.na --annotated 
    1413nc2na.py -i ../../test_outputs/1001.nc --names-only 
    15  
    16 #    nc2na.py [-v <var_list>] [--ffi=<ffi>] [-f <float_format>] 
    17 #             [-s <delimiter>] [-l <limit_ffi_1001_rows>] 
    18 #             [-e <exclude_vars>] [--overwrite-metadata=<key1>,<value1>[,<key2>,<value2>[...]]] 
    19 #             [--names-only] 
    20 #             -i <nc_file> [-o <na_file>] 
    21  
Note: See TracChangeset for help on using the changeset viewer.