-
Notifications
You must be signed in to change notification settings - Fork 0
/
draft_style.txt
35 lines (25 loc) · 1.25 KB
/
draft_style.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
% Maybe camelCase for functions and snake_case for variables?
%% Driver functions
% In order--
% add shebang '#!/usr/bin/env/python' at the top of all driver functions
% import python global libraries
% import project-specific libraries
- when importing project-specific libraries import project-specific libraries, import them as local_(name excluding nedc_mladp_)
% import NEDC libraries (do not shorten)
% all driver functions must import project-specific library nedc_mladp_fileio_tools
% all driver programs should start by parsing the parameter file from the command line and parsing ALL other arguments from the parameter file:
# set argument parsing
#
args_usage = "nedc_mladp_gen_feats.usage"
args_help = "nedc_mladp_gen_feats.help"
parameter_file = fileio_tools.parameters_only_args(args_usage,args_help)
# parse parameters
#
parsed_parameters = nedc_file_tools.load_parameters(parameter_file,"gen_feats")
# use the same name for the variable as the item parsed ex:
# windowsize = int(parsed_parameters['windowsize'])
param1 = parsed_parameters['param1']
param2 = cast(parsed_parameters['param2']
directory_example = parsed_parameters['directory_example']
if not directory_example.endswith("/"):
directory_example += "/"