-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
35 lines (28 loc) · 1.04 KB
/
__init__.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
from pathlib import Path
from tyr.problems.model import FolderAbstractDomain
from .aaai_2025 import *
from .cpaior_num_2025 import *
from .cpaior_sym_2025 import *
def is_domain_dir(p: Path) -> bool:
return p.is_dir() and not p.name.startswith("__") and not p.name.startswith(".")
for paper in (Path(__file__).parent).iterdir():
if is_domain_dir(paper):
for dom in (paper / "domains").iterdir():
if is_domain_dir(dom):
register = True
for file in dom.iterdir():
if file.name == "__init__.py":
register = False
break
if not register:
continue
name = (
(paper.name.title() + dom.name.title() + "Domain")
.replace("-", "")
.replace("_", "")
)
globals()[name] = type(
name,
(FolderAbstractDomain,),
{"folder": dom},
)