refs #741 #742: reorganize repository by application

This commit is contained in:
devmrko
2026-08-03 10:20:36 +09:00
parent 2e44ed0b97
commit e9d50e6a32
445 changed files with 1523 additions and 1885 deletions

11
tests/README.md Normal file
View File

@@ -0,0 +1,11 @@
# 저장소 구조 검증
이 폴더는 특정 애플리케이션의 단위 테스트가 아니라 저장소 전체의 폴더 경계와 경로
규칙을 검증한다.
```bash
python3 -m unittest discover -s tests -p 'test_*.py'
```
애플리케이션 기능 테스트는 각각 `vpd-backoffice/src/test`
`ai-web-agent-console/tests`에 둔다.

View File

@@ -0,0 +1,58 @@
from pathlib import Path
import unittest
ROOT = Path(__file__).resolve().parents[1]
class RepositoryLayoutTest(unittest.TestCase):
def test_application_boundaries_are_explicit(self) -> None:
for relative in (
"vpd-backoffice/pom.xml",
"vpd-backoffice/src/main",
"ai-web-agent-console/app.py",
"ai-web-agent-console/ai_web_agent_console",
"dds-backoffice/pom.xml",
"database/adb",
"deploy/vpd-backoffice",
"deploy/ai-web-agent-console",
):
self.assertTrue((ROOT / relative).exists(), relative)
def test_ambiguous_legacy_roots_are_absent(self) -> None:
for relative in (
"pom.xml",
"src",
"sql",
"poc4_active_source_20260714",
):
self.assertFalse((ROOT / relative).exists(), relative)
def test_console_has_one_named_python_package(self) -> None:
console = ROOT / "ai-web-agent-console"
self.assertFalse((console / "src").exists())
self.assertFalse((console / "apps").exists())
self.assertTrue((console / "ai_web_agent_console" / "__init__.py").is_file())
source = "\n".join(
path.read_text(encoding="utf-8")
for path in (console / "ai_web_agent_console").glob("*.py")
)
source += (console / "app.py").read_text(encoding="utf-8")
for forbidden in (
"from src.",
"src.poc3",
"src.poc4",
"src.agent_console",
"apps/poc4",
):
self.assertNotIn(forbidden, source)
def test_vpd_backoffice_packages_database_sql(self) -> None:
pom = (ROOT / "vpd-backoffice" / "pom.xml").read_text(encoding="utf-8")
self.assertIn("<directory>../database/adb</directory>", pom)
self.assertNotIn("<directory>sql/adb</directory>", pom)
if __name__ == "__main__":
unittest.main()