Skip to content

Docs: rewrite for 4.0, add migration guide, update CLAUDE.md#61

Merged
gmr merged 5 commits into
mainfrom
feature/cleanup
Apr 3, 2026
Merged

Docs: rewrite for 4.0, add migration guide, update CLAUDE.md#61
gmr merged 5 commits into
mainfrom
feature/cleanup

Conversation

@gmr
Copy link
Copy Markdown
Owner

@gmr gmr commented Apr 3, 2026

Summary

  • Rewrite all docs for 4.0: async API, TransactionConsumer, configuration accuracy
  • Delete 6 stale RST files never migrated to mkdocs
  • Add comprehensive 3.x → 4.0 migration guide
  • Update README with current features, extras, and TransactionConsumer example
  • Update CLAUDE.md with architecture overview and corrected lint suppression notes

Test plan

  • mkdocs build succeeds with no warnings
  • All 208 tests pass
  • Pre-commit hooks pass
  • Review migration guide for completeness against 3.x API

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Async consumer framework (asyncio), TransactionConsumer for concurrent processing
    • Avro datum serialization with file/HTTP schema registries
    • YAML and TOML configuration support
    • Prometheus metrics support
  • Documentation

    • Added migration guide for 3.x→4.0
    • Reworked README, consumer how‑tos, configuration, and API docs with examples and updated lifecycle/metrics guidance

gmr and others added 4 commits April 3, 2026 11:54
- Delete 6 stale RST files never migrated to mkdocs
- Rewrite all examples to use async def process(self)
- Add TransactionConsumer docs with ProcessingContext usage
- Migrate exception semantics, message type validation, drop/retry
  behavior from consumer.rst into consumer_howto.md
- Fix configuration docs: schema_registry at app level, confirm not
  publisher_confirmation, add missing connection/consumer fields
- Merge CLI docs into configuration.md with corrected flags
- Fix API reference: rejected.measurement.Measurement, add Message,
  ProcessingContext, Result, PublishedMessage, GarbageCollectorMixin
- Add content type handling table, lifecycle hooks, custom metrics

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace InfluxDB mention with Prometheus
- Add async, TransactionConsumer, TOML, Avro to feature list
- Add missing optional extras: prometheus, sentry
- Add Python version badge
- Add TransactionConsumer example

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Covers all breaking changes: Tornado removal, async methods,
SmartConsumer/PublishingConsumer removal, module reorganization,
Pydantic models, testing framework changes, config changes,
removed APIs, pickle removal, and Prometheus addition.

Includes a quick migration checklist for easy reference.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add process model and message flow documentation
- Add key module responsibilities
- Add single-test run command
- Remove stale Tornado gen.Return reference
- Correct lint suppression notes for consumer.py and process.py

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 12e037fe-7afe-48f0-9043-26b6ff289da1

📥 Commits

Reviewing files that changed from the base of the PR and between 6a7561a and db3373c.

📒 Files selected for processing (1)
  • docs/consumer_howto.md

📝 Walkthrough

Walkthrough

This pull request comprehensively updates documentation across the rejected library to reflect version 4.0 changes, including new async consumer patterns, TransactionConsumer for concurrent processing, Avro schema registry support, YAML/TOML configuration, and an added migration guide from 3.x to 4.0. CLAUDE.md and mkdocs navigation were also updated.

Changes

Cohort / File(s) Summary
Top-level docs & README
README.md, docs/index.md, mkdocs.yml
Updated feature list and quick-start examples to emphasize asyncio-based async consumers, TransactionConsumer concurrency, Avro schema registry support, and YAML/TOML configuration; added nav entry for migrating.md.
Configuration & API docs
docs/configuration.md, docs/api.md
Major restructuring of configuration docs (YAML/TOML, schema_registry, connection/consumer option tables, logging/correlation ID, Prometheus) and expanded API reference with explicit members, new models (Message, ProcessingContext, Result), exceptions namespace, testing docs, and GarbageCollectorMixin.
Consumer how‑to & examples
docs/consumer_howto.md, docs/consumer.rst (removed)
Converted examples and lifecycle docs to async (async def), added TransactionConsumer with ProcessingContext and concurrent processing guidance, expanded publishing, content-type handling, custom metrics, and garbage-collector guidance; legacy consumer.rst content removed.
Migration & developer docs
docs/migrating.md, CLAUDE.md
Added a comprehensive migration guide (3.x → 4.0) covering Python 3.11+, Tornado→asyncio migration, lifecycle/signature changes, module/API mapping, testing changes, and a developer-focused CLAUDE.md with architecture/process model notes.
Removed Sphinx/legacy pages
docs/api_consumer.rst, docs/api_data.rst, docs/api_testing.rst, docs/cli.rst, docs/example_config.rst
Removed several legacy Sphinx-based API/CLI/config pages; content consolidated into updated Markdown docs and reorganized API reference.
Docs/testing examples & helpers
docs/api_testing.rst (removed), docs/consumer_howto.md
Testing docs updated to reflect AsyncTestCase → IsolatedAsyncioTestCase, async test functions, renamed helpers (create_message → create_context), and added member-level testing docs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 Pages hopped from branch to main,
Async tunnels cleared the lane,
Schemas carried, configs spun,
From three to four we bound and run,
A carrot-map for every run! 🥕📜

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main changes: documentation rewrite for version 4.0, addition of a migration guide, and updates to CLAUDE.md.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/cleanup

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/consumer_howto.md (1)

189-195: Document additional ProcessingContext fields for completeness.

The ProcessingContext documentation lists key fields but omits two fields shown in the code:

  • result -- the Result enum indicating message disposition
  • received_at -- timestamp when the message was received (useful for latency tracking)

Consider adding these to provide a complete reference.

📝 Suggested addition
 The `ProcessingContext` provides:
 
 - `ctx.message` -- the `Message` model with all AMQP properties
 - `ctx.channel` -- the pika channel for the connection
 - `ctx.connection` -- the connection object
 - `ctx.measurement` -- per-message `Measurement` for custom metrics
 - `ctx.raw_body` -- the original bytes before decoding
+- `ctx.result` -- the `Result` enum indicating message disposition (set by framework)
+- `ctx.received_at` -- timestamp when the message was received (monotonic clock)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/consumer_howto.md` around lines 189 - 195, Update the ProcessingContext
documentation to include the two missing fields shown in code: add `result` (the
Result enum indicating message disposition such as ACK/NACK/REQUEUE) and
`received_at` (timestamp when the message was received, useful for
latency/metric calculations), ensuring the descriptions mirror the existing
bullet style (e.g., `ctx.result` -- Result enum indicating message disposition;
`ctx.received_at` -- datetime/timestamp when the message was received).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/consumer_howto.md`:
- Around line 189-195: Update the ProcessingContext documentation to include the
two missing fields shown in code: add `result` (the Result enum indicating
message disposition such as ACK/NACK/REQUEUE) and `received_at` (timestamp when
the message was received, useful for latency/metric calculations), ensuring the
descriptions mirror the existing bullet style (e.g., `ctx.result` -- Result enum
indicating message disposition; `ctx.received_at` -- datetime/timestamp when the
message was received).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 26f9b51a-2872-4bff-8ac9-5d9559d6ba7f

📥 Commits

Reviewing files that changed from the base of the PR and between f581ab9 and 6a7561a.

📒 Files selected for processing (14)
  • CLAUDE.md
  • README.md
  • docs/api.md
  • docs/api_consumer.rst
  • docs/api_data.rst
  • docs/api_testing.rst
  • docs/cli.rst
  • docs/configuration.md
  • docs/consumer.rst
  • docs/consumer_howto.md
  • docs/example_config.rst
  • docs/index.md
  • docs/migrating.md
  • mkdocs.yml
💤 Files with no reviewable changes (6)
  • docs/api_consumer.rst
  • docs/api_data.rst
  • docs/api_testing.rst
  • docs/cli.rst
  • docs/example_config.rst
  • docs/consumer.rst

Add the two missing ProcessingContext fields to the consumer howto
documentation: result (Result enum for message disposition) and
received_at (monotonic timestamp for latency tracking).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gmr gmr merged commit 217013b into main Apr 3, 2026
5 checks passed
@gmr gmr deleted the feature/cleanup branch April 3, 2026 17:39
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.

1 participant