feat(tkeg): tkeg BOM 자재관리 서비스 초기 세팅 (api + web + docker-compose)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
48
tkeg/api/app/services/test_instrument_classifier.py
Normal file
48
tkeg/api/app/services/test_instrument_classifier.py
Normal file
@@ -0,0 +1,48 @@
|
||||
"""
|
||||
INSTRUMENT 간단 테스트
|
||||
"""
|
||||
|
||||
from .instrument_classifier import classify_instrument
|
||||
|
||||
def test_instrument_classification():
|
||||
"""간단한 계기류 테스트"""
|
||||
|
||||
test_cases = [
|
||||
{
|
||||
"name": "압력 게이지",
|
||||
"dat_file": "PG_001",
|
||||
"description": "PRESSURE GAUGE, 0-100 PSI, 1/4 NPT",
|
||||
"main_nom": "1/4\""
|
||||
},
|
||||
{
|
||||
"name": "온도 트랜스미터",
|
||||
"dat_file": "TT_001",
|
||||
"description": "TEMPERATURE TRANSMITTER, 4-20mA, 0-200°C",
|
||||
"main_nom": "1/2\""
|
||||
},
|
||||
{
|
||||
"name": "유량계",
|
||||
"dat_file": "FM_001",
|
||||
"description": "FLOW METER, MAGNETIC TYPE",
|
||||
"main_nom": "3\""
|
||||
}
|
||||
]
|
||||
|
||||
print("🔧 INSTRUMENT 간단 테스트\n")
|
||||
|
||||
for i, test in enumerate(test_cases, 1):
|
||||
result = classify_instrument(
|
||||
test["dat_file"],
|
||||
test["description"],
|
||||
test["main_nom"]
|
||||
)
|
||||
|
||||
print(f"테스트 {i}: {test['name']}")
|
||||
print(f" 계기타입: {result['instrument_type']['type']}")
|
||||
print(f" 측정범위: {result['measurement_info']['range']} {result['measurement_info']['unit']}")
|
||||
print(f" 연결사이즈: {result['size_info']['connection_size']}")
|
||||
print(f" 구매정보: {result['purchase_info']['category']}")
|
||||
print()
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_instrument_classification()
|
||||
Reference in New Issue
Block a user