Changeset 9701


Ignore:
Timestamp:
Feb 28, 2015, 9:49:07 PM (9 years ago)
Author:
steve
Message:

Updating get_revision_number

Location:
trunk/anuga_core
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/.travis.yml

    r9689 r9701  
    44env:
    55  matrix:
     6    - PYTHON_VERSION="2.7"  PARALLEL="openmpi"  DISTRIB="conda"
     7    - PYTHON_VERSION="2.7"  PARALLEL="openmpi"  DISTRIB="ubuntu"
    68    - PYTHON_VERSION="2.7"  PARALLEL="mpich2"  DISTRIB="conda"
    79    - PYTHON_VERSION="2.7"  PARALLEL="mpich2"  DISTRIB="ubuntu" COVERAGE="--coverage"
  • trunk/anuga_core/anuga/parallel/tests/test_parallel_boyd_box_operator.py

    r9695 r9701  
    355355
    356356
    357     finalize()
    358    
    359 
     357        finalize()
     358   
     359
  • trunk/anuga_core/anuga/utilities/plot_utils.py

    r9696 r9701  
    950950    import scipy.spatial
    951951    import anuga
    952     from anuga.utilities import plot_utils as util
     952    #from anuga.utilities import plot_utils as util
    953953    import os
    954954   
     
    991991        if(verbose):
    992992            print 'Reading sww File ...'
    993         p2=util.get_centroids(swwFile, velocity_extrapolation, timeSlices=myTimeStep,
     993        p2=get_centroids(swwFile, velocity_extrapolation, timeSlices=myTimeStep,
    994994                              minimum_allowed_height=min_allowed_height)
    995995        xllcorner=p2.xllcorner
  • trunk/anuga_core/anuga/utilities/system_tools.py

    r9697 r9701  
    193193def get_revision_number():
    194194    """Get the (svn) revision number of this repository copy.
    195     """
    196     from  anuga.revision import revision_info
    197     return process_revision_info(revision_info)
    198 
    199 
     195    If svn not available just return 0
     196    """
     197    try:
     198        from  anuga.revision import revision_info
     199        return process_revision_info(revision_info)
     200    except:
     201        return 0
     202   
     203   
    200204def process_revision_info(revision_info):
    201205
  • trunk/anuga_core/anuga/utilities/tests/test_system_tools.py

    r9696 r9701  
    468468
    469469        x = get_revision_number()
    470 
    471         try:
    472             y = x.split('.')
    473             assert int(y[0])
    474             assert int(y[1])
    475             assert int(y[2])
    476         except:
    477             assert int(x)
     470       
     471        assert int(x) >= 0
    478472
    479473################################################################################
  • trunk/anuga_core/examples/cairns/export_results_to_qgis.py

    r9209 r9701  
    3232Make_Geotif(swwFile=name+'.sww',
    3333             output_quantities=['stage'],
    34              myTimeStep=0,
     34             myTimeStep=[0],
    3535             CellSize=1000.0,
    3636             lower_left=None, upper_right=None,
  • trunk/anuga_core/tools/install_packages.sh

    r9693 r9701  
    4848    # provided versions
    4949    conda create -n anuga_env --yes python=$PYTHON_VERSION pip numpy scipy netcdf4 \
    50         nose matplotlib gdal geos
     50        nose matplotlib
    5151    source activate anuga_env
     52
     53    # python 2.6 doesn't have argparse by default
     54    if [[ "$PYTHON_VERSION" == "2.6" ]]; then conda install --yes argparse; fi
    5255
    5356    if [[ "$PYTHON_VERSION" == "2.7" ]]; then
    5457        conda install --yes -c pingucarsti gdal
     58    fi
     59
     60    if [[ "$PYTHON_VERSION" == "2.6" ]]; then
     61        conda install --yes  gdal geos
    5562    fi
    5663
     
    5966    # Install more software to deal with geographical projections
    6067    pip install pyproj
    61 
    62     # python 2.6 doesn't have argparse by default
    63     if [[ "$PYTHON_VERSION" == "2.6" ]]; then conda install --yes argparse; fi
    64    
    6568   
    6669    # Install pypar if parallel set
    67         if [[ "$PARALLEL" == "mpich2" || "$PARALLEL" == "openmpi" ]]; then
     70    if [[ "$PARALLEL" == "mpich2" || "$PARALLEL" == "openmpi" ]]; then
    6871        git clone https://github.com/daleroberts/pypar;
    6972        pushd pypar;
    7073        python setup.py install;
    7174        popd;
    72         fi
     75    fi
    7376       
    7477    # Useful for debugging any issues with conda
Note: See TracChangeset for help on using the changeset viewer.