Uh oh!
There was an error while loading. Please reload this page.
docs+rename: unify naming and reconcile docs (closes #5) - #26
Conversation
The Flask extension class is renamed to RecostExtension to match the naming convention of RecostMiddleware (FastAPI) and the rest of the public surface. The old ReCost class remains importable as a thin subclass that emits a DeprecationWarning on construction. Refs #5
Adds a regression assertion so adding/removing built-in rules forces a corresponding docs update. Also corrects the stale '21 built-in provider rules' docstring. Refs #5
CLAUDE.md referenced EcoAPIHandle, EcoAPIConfig, EcoAPIMiddleware, and EcoAPI — none of which exist in the codebase. Replace with the actual class names (RecostHandle, RecostConfig, RecostMiddleware, RecostExtension). Correct the provider-rule count from '21+' to '34'. Refs #5
- Flask example switches to RecostExtension (with a note about the deprecated ReCost alias). - Config table swaps the stale 'flush_interval' (seconds, deprecated) for the canonical 'flush_interval_ms' (milliseconds), with a separate row marking the old form deprecated. - Adds previously-undocumented options: max_buckets, shutdown_flush_timeout_ms. Refs #5
Final review found four docstring/comment references to the old 'ReCost' spelling that the planned task list missed. They are all non-API surface (docstrings + module-level comments), but the PR's stated goal is a single brand spelling, so clean them up here. Touched: - recost/_init.py:83 (init() docstring) - recost/_transport.py:4 (module docstring) - recost/frameworks/fastapi.py:25 (RecostMiddleware docstring) - CLAUDE.md:3 (one-line project description) Refs #5
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Closes#5.
ReCost→RecostExtensionto match theconvention used by
RecostMiddleware(FastAPI). The oldReCostremainsimportable as a thin subclass that emits a
DeprecationWarningonconstruction, so external consumers don't break this release.
EcoAPI*names fromCLAUDE.md(
EcoAPIHandle,EcoAPIConfig,EcoAPIMiddleware,EcoAPI).flush_interval(seconds, deprecated) row in theREADME.mdconfig table withflush_interval_ms(canonical) plus aseparate deprecated row for
flush_interval.max_buckets,shutdown_flush_timeout_ms. Tightenson_errortoCallable[[Exception], None].len(BUILTIN_PROVIDERS) == 34via a regression test so futuredrift trips CI; corrects the stale "21 built-in" docstring.
Recost(sentence-case, no inner cap) as the singlebrand spelling across
recost/__init__.py,recost/_init.py,recost/_transport.py,recost/frameworks/fastapi.py, andCLAUDE.md.The only remaining
ReCostreferences are intentional: the deprecatedFlask alias class itself, its warning text, and the corresponding test +
deprecation notes in the README/CLAUDE.md.
Tests
TestRecostExtension::*— existing Flask tests, updated to the new name.TestReCostDeprecationAlias::test_old_name_still_constructs— provesthe deprecation alias emits a
DeprecationWarningcontaining"RecostExtension"on construction.TestReCostDeprecationAlias::test_old_name_is_subclass_or_alias_of_new—proves
isinstancechecks on the old name keep working.test_builtin_providers_count_is_pinned— pins the documented countof 34 built-in rules across 14 providers.
134 passed.Test plan
python -m pytest— 134 passedpython -m ruff check recost/frameworks/flask.py recost/__init__.py tests/test_flask.py tests/test_provider_registry.py— cleanpython -c "from flask import Flask; from recost.frameworks.flask import ReCost; ReCost(Flask(__name__), enabled=False)"— emits the expectedDeprecationWarningMigration
External consumers using
from recost.frameworks.flask import ReCostwill see a
DeprecationWarningbut no behavioral change. Switch tofrom recost.frameworks.flask import RecostExtensionbefore the nextmajor release.
Notes for reviewers
mypyerrors inrecost/frameworks/flask.py(_handle = Nonethen assignedRecostHandle) and pre-existing project-wideruffF401/F841 noise are tracked separately by issue 35 mypy strict errors — README claims strict-clean #2 and not addressed here.mainafter PR fix(aggregator): make Aggregator thread-safe (closes #1) #25 (aggregator thread-safety) merged; no file overlap.🤖 Generated with Claude Code