[K-006] krx: O(N) API 호출 동작 문서화 (#288)#296
Merged
Merged
Conversation
…_by_day Add a reStructuredText warning block to the docstring explaining that this method makes one pykrx API call per calendar day (O(N_days)). Also add a runtime logger.warning when the date range exceeds 90 days so callers see the cost at debug-level logging. Closes #288
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
_fetch_market_valuation_by_day메서드가 날짜 범위의 모든 달력 날짜마다 별도의 pykrx API를 호출하는 O(N) 동작을 문서화합니다.변경 내용
adapter.py —
_fetch_market_valuation_by_day.. warning::블록 추가: 호출 횟수가 O(N_days)임을 명시하고, 주말/공휴일에도 API 호출이 발생함을 안내logger.warning추가: 날짜 범위가 90일 초과 시 "KRX market_valuation: N일 → API N회 호출 예정" 경고 출력 (로거를 켠 사용자에게 비용 가시화)검증
ruff check통과mypy통과pytest tests/unit/providers/krx/→ 37/37 통과Closes #288