-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__main__.py
35 lines (21 loc) · 837 Bytes
/
__main__.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
35
import argparse
import logging
from Exemples.agents_exemples import run_agents_exemples
from Exemples.basic_exemples import run_basic_examples
logger: logging.Logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
formater = logging.Formatter("%(asctime)s %(levelname)-8s %(message)s")
console_handler = logging.StreamHandler()
console_handler.setFormatter(formater)
logger.addHandler(console_handler)
parser = argparse.ArgumentParser()
parser.add_argument("-e", "--exemple")
args: argparse.Namespace = parser.parse_args()
if __name__ == "__main__":
examples_logger: logging.Logger = logging.getLogger(__name__)
if args.exemple == "basic":
print(run_basic_examples().head(100))
elif args.exemple == "agents":
run_agents_exemples()
else:
print("please select an exemple to run")