Changeset 5068 for nappy


Ignore:
Timestamp:
06/03/09 09:23:55 (10 years ago)
Author:
spascoe
Message:

I'm branching to experiment with making nappy a distutils package that
can be eggified.

Location:
nappy/branches/nappy-eggable
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • nappy/branches/nappy-eggable/nappy/unit_tests/test_1010_to_1020.py

    r3525 r5068  
    33import nappy.nc_interface.na_to_nc 
    44import nappy.nc_interface.nc_to_na 
    5 import cdms 
    6  
    7  
    8  
     5import cdms2 as cdms 
    96 
    107print "Converting NAFile to NC file 1010.na" 
    11 ncfile = "../../test_outputs/1010.nc" 
    12 nafile = "../../data_files/1010.na" 
     8ncfile = os.path.join(os.path.dirname(__file__), "../../test_outputs/1010.nc") 
     9nafile = os.path.join(os.path.dirname(__file__), "../../data_files/1010.na") 
     10ncOutFile = os.path.join(os.path.dirname(__file__), "../../test_outputs/1010_edited_for_1020.nc") 
    1311 
    1412n = nappy.nc_interface.na_to_nc.NAToNC(nafile) 
     
    1816p_new = f('pressure', altitude=(10,85)) 
    1917o_new = f('ozone_concentration', altitude=slice(0,16,4)) 
    20 out_file = cdms.open("../../test_outputs/1010_edited_for_1020.nc", "w") 
     18out_file = cdms.open(ncOutFile, "w") 
    2119out_file.write(p_new) 
    2220out_file.write(o_new) 
     
    2624print "Outfile written:", ncfile 
    2725 
    28 out_dir = "../../test_outputs" 
     26out_dir = os.path.join(os.path.dirname(__file__), '../../test_outputs') 
    2927 
    3028ffi_in, ffi_out = (1010, 1020) 
  • nappy/branches/nappy-eggable/nappy/unit_tests/test_2010_to_2110.py

    r3524 r5068  
    33import os 
    44 
    5 in_dir = "../../test_outputs" 
    6 out_dir = "../../test_outputs" 
    7 in_dir = out_dir 
    85 
     6in_dir = out_dir = os.path.join(os.path.dirname(__file__), "../../test_outputs") 
    97 
    108ffi_in, ffi_out = (2010, 2110) 
  • nappy/branches/nappy-eggable/nappy/unit_tests/test_2010_to_2310.py

    r3524 r5068  
    33import os 
    44 
    5 in_dir = "../../test_outputs" 
    6 out_dir = "../../test_outputs" 
    7 in_dir = out_dir 
     5in_dir = out_dir = os.path.join(os.path.dirname(__file__), "../../test_outputs") 
    86 
    97 
  • nappy/branches/nappy-eggable/nappy/utils/parse_config.py

    r3988 r5068  
    1111import os 
    1212 
     13_here = os.path.dirname(__file__) 
     14 
    1315# Global variables 
    14 base_dir = os.environ.get("NAPPY_BASE_DIR", ".." + os.path.sep + "..") 
     16base_dir = os.environ.get("NAPPY_BASE_DIR", os.path.join(_here, '..')) 
    1517config_file = os.path.join(base_dir, "nappy.ini") 
    1618config_dict = None 
Note: See TracChangeset for help on using the changeset viewer.