package: move code into src layout and add PyPI publish workflow

This commit is contained in:
2026-01-04 15:36:02 +03:00
parent f7ceacd07e
commit ebfb6e0492
12 changed files with 133 additions and 37 deletions

View File

@@ -1,8 +1,20 @@
"""Config loading tests (ruff: ignore E402 for sys.path adjustment)."""
# ruff: noqa: E402
import os
import sys
import unittest
from pathlib import Path
from unittest.mock import patch
from config import load_config
ROOT = Path(__file__).resolve().parents[1]
SRC = ROOT / "src"
for path in (SRC, ROOT):
if str(path) not in sys.path:
sys.path.insert(0, str(path))
from ctfd_mcp.config import load_config
def _load_with_env(env: dict[str, str]):