-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathctgen.py
34 lines (25 loc) · 967 Bytes
/
ctgen.py
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
#!/usr/bin/env python3
import logging
import click
from pathlib import Path
from dotenv import find_dotenv, load_dotenv
from src.cli import evaluate, predict, make_dataset
@click.group()
def main():
""" Runs data processing scripts to turn raw data from (../raw) into
cleaned data ready to be analyzed (saved in ../processed).
"""
pass
main.add_command(evaluate)
main.add_command(predict)
main.add_command(make_dataset)
if __name__ == '__main__':
log_fmt = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
logging.basicConfig(level=logging.INFO, format=log_fmt)
logging.getLogger('allennlp').setLevel(logging.WARNING)
# not used in this stub but often useful for finding various files
project_dir = Path(__file__).resolve().parents[2]
# find .env automagically by walking up directories until it's found, then
# load up the .env entries as environment variables
load_dotenv(find_dotenv())
main()