Conversation
WalkthroughDocumentation in README.md is significantly reduced and reformatted. In code, RequestsFetcher now uses the instance timeout (self._timeout) when creating httpx.AsyncClient instead of an undefined local variable. No public APIs change. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
README.md(1 hunks)market_research/fetchers.py(1 hunks)
🔇 Additional comments (3)
market_research/fetchers.py (1)
58-58: Critical bug fix: correct use of instance timeout.This change fixes a critical bug by using the instance variable
self._timeout(initialized in__init__at line 35) instead of an undefined local variable. This prevents aNameErrorat runtime and ensures the configured timeout is properly applied to the HTTP client.README.md (2)
54-54: LGTM!The documentation clarification about test module behavior is clear and helpful for users who may not have the optional scientific dependencies installed.
69-69: LGTM!The reformatted description improves readability by clearly listing the pluggable scoring modules and their configuration options.
| ``` | ||
|
|
||
| - `scripts/switch6_refresh.py` accepts `--refresh-every <minutes>` to loop continuously�ideal for cron/Task Scheduler. | ||
| - `scripts/switch6_refresh.py` accepts `--refresh-every <seconds>` to loop continuously—ideal for cron/Task Scheduler. |
There was a problem hiding this comment.
🧩 Analysis chain
Verify the time unit change for the refresh script.
The documentation now indicates that --refresh-every accepts seconds instead of minutes. Please confirm that the actual implementation in scripts/switch6_refresh.py has been updated to match this documentation, as this is a user-facing parameter change.
Run the following script to verify the parameter implementation:
🏁 Script executed:
#!/bin/bash
# Description: Verify the refresh-every parameter unit in the script.
# Expected: Documentation should confirm whether the parameter uses seconds or minutes.
# Search for the refresh-every parameter definition and usage
rg -n -A5 -B5 'refresh.?every' --type=pyLength of output: 1651
Fix time-unit mismatch for --refresh-every.
The README entry at line 47 should reflect that --refresh-every is in minutes (per the script’s help text), or adjust the parser and loop logic if you intend it to be seconds.
🤖 Prompt for AI Agents
In README.md around line 47, the README states that scripts/switch6_refresh.py
accepts --refresh-every <seconds> but the script's help text uses minutes;
either update the README to say "<minutes>" (or "minutes") to match the script,
or change the script's argument parser and loop logic to treat the flag as
seconds. Fix by aligning the unit: if keeping minutes, update README text to
mention minutes and ensure any examples use minutes; if preferring seconds,
update the argparse help string, convert the parsed value to seconds where the
loop sleeps, and adjust tests/docs accordingly.
Summary by CodeRabbit