-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.py
More file actions
43 lines (30 loc) · 1013 Bytes
/
constants.py
File metadata and controls
43 lines (30 loc) · 1013 Bytes
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
42
43
import enum
import logging
import os
import typing as t
from pathlib import Path
logger = logging.getLogger(__name__)
TMP_DIR = ".cache"
PROGRAMDATA_DIR = os.environ.get("PROGRAMDATA", "C:/ProgramData")
# The config files will be used in order, with the first one having the highest priority
KNOWN_CONFIG_FILES: t.List[str] = [
"./local/clabe.yml",
"./clabe.yml",
str(Path(PROGRAMDATA_DIR) / "clabe.yml"),
]
for i, p in enumerate(KNOWN_CONFIG_FILES):
if Path(p).exists():
logger.debug(f"Found config file: {p} with rank priority {i}")
class ByAnimalFiles(enum.StrEnum):
"""
Enum for file types associated with animals in the experiment.
Defines the standard file types that can be associated with individual
animals/subjects in behavior experiments.
Example:
```python
# Use the task logic file type
filename = f"{ByAnimalFiles.TASK_LOGIC}.json"
```
"""
TASK_LOGIC = "task_logic"
TRAINER_STATE = "trainer_state"