client.py 1.14 KB
Newer Older
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
36
37
38
39
40
41
import argparse
import os
from src.data import parse_and_clean_data, make_screenings
from src.data import make_clusters, make_dataset_full
from src.data import make_dataset_count, make_dataset_emb

def dir_path(string):
    if os.path.isdir(string):
        return string
    else:
        raise NotADirectoryError(string)

def parse_arguments():
    parser = argparse.ArgumentParser(description='A client for AIR')
    #parser.add_argument('--path', type=dir_path,
    #                help='path to data dictionary with raw files')
    return parser.parse_args()

def main():
    parsed_args = parse_arguments()
    #data_path = parsed_args.path
    print("Client started. Now parsing and cleaning data ...")
    parse_and_clean_data.main()
    
    print("Extracting screenings ...")
    make_screenings.main()
    
    print("Making clusters ...")
    make_clusters.main()
    
    print("Making full dataset ...")
    make_dataset_full.main()
    
    print("Making dataset with embedded ats ...")
    make_dataset_emb.main()
    
    print("Making dataset with one-hot encoded ats ...")
    make_dataset_count.main()
    
if __name__ == "__main__":
    main()