diff --git a/src/hyperstitionstud_io/config/__init__.py b/src/hyperstitionstud_io/config/__init__.py index f3e11f4..366bccc 100644 --- a/src/hyperstitionstud_io/config/__init__.py +++ b/src/hyperstitionstud_io/config/__init__.py @@ -13,7 +13,7 @@ from dataclasses import dataclass, field from pathlib import Path from typing import Any -CORE_REPO_ROOT = Path(__file__).resolve().parents[2] +CORE_REPO_ROOT = Path(__file__).resolve().parents[3] WORKSPACE_ROOT = CORE_REPO_ROOT.parent USER_WORKSPACE_TOML = Path.home() / ".config" / "hyperstitionstud.io" / "workspace.toml" @@ -78,6 +78,7 @@ def load_workspace_config( candidates.append(Path(env_p)) candidates.extend([ ws_root / "workspace.toml", + Path.cwd() / "workspace.toml", USER_WORKSPACE_TOML, Path("/workspace/workspace.toml"), ]) diff --git a/tests/test_core_suite.py b/tests/test_core_suite.py index cf9d6c4..df01f9b 100644 --- a/tests/test_core_suite.py +++ b/tests/test_core_suite.py @@ -11,8 +11,13 @@ Tests: from __future__ import annotations import json +import sys from pathlib import Path +_SRC_DIR = Path(__file__).resolve().parents[1] / "src" +if _SRC_DIR.is_dir() and str(_SRC_DIR) not in sys.path: + sys.path.insert(0, str(_SRC_DIR)) + from hyperstitionstud_io.ciphers import ( assert_zero_d_filter, compute_aq,