1 | """Wrapper around data_audit. |
---|
2 | |
---|
3 | This wrapper is specific to ANUGA. |
---|
4 | |
---|
5 | This wrapper will run the |
---|
6 | |
---|
7 | Specify what extensions, directories and files should be ignored by |
---|
8 | the data_audit process. |
---|
9 | |
---|
10 | These will generally be specific to each software project. |
---|
11 | """ |
---|
12 | |
---|
13 | from data_audit import IP_verified as IP_engine |
---|
14 | |
---|
15 | # Ignore source code files |
---|
16 | extensions_to_ignore = ['.py','.c', '.h', '.cpp', '.f', '.bat'] |
---|
17 | |
---|
18 | # Ignore LaTeX documents |
---|
19 | extensions_to_ignore += ['.tex', '.sty', '.cls', '.bib'] |
---|
20 | |
---|
21 | # Ignore pdf and doc documents |
---|
22 | extensions_to_ignore += ['.pdf', '.doc'] |
---|
23 | |
---|
24 | # Ignore generated stuff |
---|
25 | extensions_to_ignore += ['.pyc', '.o', '.so', '~'] |
---|
26 | extensions_to_ignore += ['.aux', '.log', '.idx', 'ilg', '.ind', |
---|
27 | '.bbl', '.blg'] |
---|
28 | |
---|
29 | # Ignore license files themselves |
---|
30 | extensions_to_ignore += ['.lic'] |
---|
31 | |
---|
32 | |
---|
33 | # Ignore certain other files, |
---|
34 | files_to_ignore = ['README.txt', 'LICENSE.txt', 'Makefile', |
---|
35 | '.temp', 'SConstruct', 'SConscript'] |
---|
36 | |
---|
37 | # Ignore directories |
---|
38 | directories_to_ignore = ['.svn', 'misc', '.metadata'] |
---|
39 | directories_to_ignore += ['old_pyvolution_documentation'] |
---|
40 | |
---|
41 | |
---|
42 | |
---|
43 | def IP_verified(directory, verbose=False): |
---|
44 | |
---|
45 | result = IP_engine(directory, |
---|
46 | extensions_to_ignore, |
---|
47 | directories_to_ignore, |
---|
48 | files_to_ignore, |
---|
49 | verbose=verbose) |
---|
50 | return result |
---|
51 | |
---|