Skip to content

Conversation

@mr-yoo
Copy link
Collaborator

@mr-yoo mr-yoo commented Jan 25, 2026

Changes

CD Workflow (cd.yml)

  • Add explicit workflow permissions (contents:read, packages:write)
  • Enable full git history and tag fetching for correct version detection
  • Use environment variables for secure credential handling
  • Remove redundant setuptools-scm installation step

Test Infrastructure (conftest.py)

  • Fix use_cassette fixture to properly use vcr_config parameter
  • Update form_body_matcher to use strict equality instead of superset matching
  • Remove unnecessary debug logging from URI matcher
  • Improve VCR configuration for consistent test cassette matching

Prerequisites

Ensure PYPI_API_TOKEN is configured in repository secrets.

Testing

All existing tests pass with updated VCR configuration.

Problem:
- Naver API 'count' param drifts daily (days since fixed date)
- KRX date params (strtDd, endDd, etc.) cause match failures
- 7 cassettes recorded with stale values → tests failed

Solution:
1. Custom VCR matchers ignore volatile date/count parameters
   - uri_without_dates: strips IGNORED_DATE_KEYS from query
   - form_body_matcher: order-insensitive, ignores date keys
   - before_record_request: scrubs params before saving

2. Regenerated 7 time-sensitive cassettes with current baseline:
   - market/stock_ohlcv_by_date_*
   - index/portfolio_deposit_file_*
   - etf/{ticker,etn_ticker,elw_ticker}_list
- fetch full git history & tags, add version verification
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@4393bad). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #260   +/-   ##
=========================================
  Coverage          ?   74.49%           
=========================================
  Files             ?       32           
  Lines             ?     1992           
  Branches          ?        0           
=========================================
  Hits              ?     1484           
  Misses            ?      508           
  Partials          ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mr-yoo mr-yoo merged commit 96f91c4 into sharebook-kr:master Jan 25, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants