-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathdata_and_knowledge.py
More file actions
35 lines (26 loc) · 927 Bytes
/
data_and_knowledge.py
File metadata and controls
35 lines (26 loc) · 927 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
from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING
from dotenv import load_dotenv
import yaml
if TYPE_CHECKING:
from openssa.core.programming.hierarchical.plan import HTPDict
load_dotenv()
EXPERT_KNOWLEDGE_FILE_PATH: Path = Path(__file__).parent / 'expert-knowledge.txt'
with open(file=EXPERT_KNOWLEDGE_FILE_PATH,
buffering=-1,
encoding='utf-8',
errors='strict',
newline=None,
closefd=True,
opener=None) as f:
EXPERT_KNOWLEDGE: str = f.read()
EXPERT_PROGRAM_SPACE_FILE_PATH: Path = Path(__file__).parent / 'expert-program-space.yml'
with open(file=EXPERT_PROGRAM_SPACE_FILE_PATH,
buffering=-1,
encoding='utf-8',
errors='strict',
newline=None,
closefd=True,
opener=None) as f:
EXPERT_PROGRAM_SPACE: dict[str, HTPDict] = yaml.safe_load(stream=f)