Changeset 5068


Ignore:
Timestamp:
Feb 20, 2008, 5:24:45 PM (16 years ago)
Author:
ole
Message:

Refactored dirs to distribute into separate module and updated create and audit scripts.

Files:
1 added
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • audit_distribution.py

    r5064 r5068  
     1"""Audit the directories flagged for released
     2
     3This module forms an easy way to audit data files in the repository without
     4running create_distribution.
     5
     6The benefit is that license files can be tested before being checked in.
     7
     8Note: This script will work on all data whether it is part of the
     9repository or not. Before creating a license file for a data file it is a good idea to see if it is part of the repository or not (in which case there is no need). This can be done using svn status or by deleting the offending area and do a fresh svn update.
     10
     11Ole Nielsen, GA 2008
     12"""
     13
     14
    115from anuga.utilities.data_audit_wrapper import IP_verified
    216from os.path import join
    317
     18from dirs_to_distribute import dirmap
     19#print dirmap
    420
    5 # Roughly the same as what is being released
    6 dirs_to_distribute = [join('anuga_core', 'source', 'anuga'),
    7                       'anuga_validation',
    8                       join('anuga_core', 'documentation', 'user_manual')]
    9 
    10 # Individual segments
    11 #dirs_to_distribute = ['anuga_validation']
    12 #dirs_to_distribute = [join('anuga_core', 'documentation', 'user_manual')]
    13 #dirs_to_distribute = [join('anuga_core', 'source', 'anuga')]
    14 
    15 
    16 
    17 for dir in dirs_to_distribute:
     21for dir in dirmap:
    1822    if not IP_verified(dir, verbose=True):
    1923        pass
  • create_distribution.py

    r5064 r5068  
    2222
    2323from os import sep, system
    24 from string import join
     24from os.path import join
    2525from tempfile import mktemp
    2626from sys import platform, stdout
     
    3030from anuga.config import major_revision
    3131
     32from dirs_to_distribute import dirmap
    3233from anuga.utilities.data_audit_wrapper import IP_verified
    3334
     
    7475system(s)
    7576
    76 #--------------------------------
    77 # Get the ANUGA core source files
    78 #--------------------------------
    79 s = 'svn export -r %d --quiet anuga_core/source/anuga %s/anuga' %(svn_revision,
    80                                                                   distro_dir)
    81 print s
    82 system(s)
     77
     78#---------------------------------------------------
     79# Get the ANUGA directories flagged for distribution
     80#---------------------------------------------------
     81
     82for source in dirmap:
     83   
     84    destination = join(distro_dir, dirmap[source])
     85    s = 'svn export -r %d --quiet %s %s' %(svn_revision,
     86                                           source,
     87                                           destination)
     88
     89    print s
     90    system(s)
     91
     92
    8393
    8494#-----------------------------
    8595# Get validation_files as well
    8696#-----------------------------
    87 s = 'mkdir %s/anuga_validation' %distro_dir
    88 system(s)
    89 
    90 s = 'svn export -r %d --quiet anuga_validation/okushiri_2005 %s/anuga_validation/okushiri'\
    91     %(svn_revision, distro_dir)
    92 print s
    93 system(s)
     97#s = 'mkdir %s/anuga_validation' %distro_dir
     98#system(s)
     99#
     100#s = 'svn export -r %d --quiet anuga_validation/okushiri_2005 %s/anuga_validation/okushiri'\
     101#    %(svn_revision, distro_dir)
     102#print s
     103#system(s)
    94104
    95105#s = 'svn export -r %d --quiet anuga_validation/solitary_waves %s/anuga_validation/solitary_waves'\
    96106#    %(svn_revision, distro_dir)
    97107#print s
    98 #system(s)
    99 
    100 s = 'svn export -r %d --quiet anuga_validation/automated_validation_tests %s/anuga_validation/automated_validation_tests'\
    101     %(svn_revision, distro_dir)
    102 print s
    103 system(s)
     108#syst
     109
     110#s = 'svn export -r %d --quiet anuga_validation/automated_validation_tests %s/anuga_validation/automated_validation_tests'\
     111#    %(svn_revision, distro_dir)
     112#print s
     113#system(s)
    104114
    105115# FIXME: Other validations in here as they appear!
     
    109119# Get demos from user manual
    110120#---------------------------
    111 s = 'svn export -r %d --quiet anuga_core/documentation/user_manual/demos %s/anuga_demos'\
    112     %(svn_revision, distro_dir)
    113 print s
    114 system(s)
     121#s = 'svn export -r %d --quiet anuga_core/documentation/user_manual/demos %s/anuga_demos'\
     122#    %(svn_revision, distro_dir)
     123#print s
     124#system(s)
     125
    115126
    116127
Note: See TracChangeset for help on using the changeset viewer.