Changeset 5027


Ignore:
Timestamp:
Feb 12, 2008, 5:13:59 PM (16 years ago)
Author:
ole
Message:

Better output from IP audit

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/utilities/data_audit.py

    r5022 r5027  
    6262
    6363    # Identify data files
     64    all_files = 0
     65    ok_files = 0
    6466    first_time = True
    6567    all_files_accounted_for = True
     
    6870                                                directories_to_ignore,
    6971                                                files_to_ignore):
     72       
     73        all_files += 1
    7074       
    7175        filename = join(dirpath, datafile)
     
    98102
    99103            fid.close()
    100            
    101         if status != 'OK' or verbose is True:
     104
     105        if status == 'OK':
     106            ok_files += 1
     107        else:
     108            # Only print status if there is a problem (no news is good news)
    102109            if first_time is True:
    103110                # Print header
     
    110117                  %str(compute_checksum(filename)), status
    111118
     119
     120    if verbose is True:
     121        print
     122        print 'Audit result for %s:' %dirpath
     123        print 'Number of files in audited:  %d' %(all_files)
     124        print 'Number of files in verified: %d' %(ok_files)       
    112125
    113126
  • anuga_core/source/anuga/utilities/data_audit_wrapper.py

    r5018 r5027  
    1414
    1515# Ignore source code files
    16 extensions_to_ignore = ['.py','.c','.h', '.f', '.bat']
     16extensions_to_ignore = ['.py','.c', '.h', '.cpp', '.f', '.bat']
     17
     18# Ignore LaTeX documents
     19extensions_to_ignore += ['.tex', '.sty', '.cls', '.bib']
     20
     21# Ignore pdf and doc documents
     22extensions_to_ignore += ['.pdf', '.doc']
    1723
    1824# Ignore generated stuff
  • audit_all_data.py

    r5024 r5027  
    11from anuga.utilities.data_audit_wrapper import IP_verified
     2from os.path import join
    23
    34
    4 #if not IP_verified('anuga_core', verbose=True):
    5 #    print 'Not all files have been verified.'
    6    
    7 if not IP_verified('anuga_validation/okushiri_2005', verbose=False):
    8     print 'Not all files have been verified.'
     5# Roughly the same as what is being released
     6dirs_to_distribute = [join('anuga_core', 'source', 'anuga'),
     7                      'anuga_validation',
     8                      join('anuga_core', 'documentation', 'user_manual')]
    99
    1010
     11for dir in dirs_to_distribute:
     12    if not IP_verified(dir, verbose=True):
     13        print 'Not all files in %s have been verified.' %dir
     14
     15
     16
Note: See TracChangeset for help on using the changeset viewer.