Improve README examples by adding types - closes #1233#1240
Conversation
WalkthroughREADME code examples are updated with explicit type hints, added imports, and psycopg replaces psycopg2 for connection examples. A new Towncrier docs fragment and configuration entry are added for documentation changelog items. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
🔇 Additional comments (6)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README.rst (1)
297-297: Update SQLAlchemy dialect to match psycopg v3.The connection string uses the
psycopg2dialect (postgresql+psycopg2://), which is inconsistent with the importedpsycopg(version 3). For psycopg v3, SQLAlchemy uses thepsycopgdialect.Apply this diff:
-connection = f'postgresql+psycopg2://{postgresql.info.user}:@{postgresql.info.host}:{postgresql.info.port}/{postgresql.info.dbname}' +connection = f'postgresql+psycopg://{postgresql.info.user}:@{postgresql.info.host}:{postgresql.info.port}/{postgresql.info.dbname}'Note: This issue also appears on lines 502 and 515.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
README.rst(11 hunks)newsfragments/1233.docs.rst(1 hunks)pyproject.toml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: postgresql_18 / postgres (3.14)
- GitHub Check: postgresql_18 / postgres (3.11)
- GitHub Check: postgresql_18 / postgres (pypy-3.11)
- GitHub Check: postgresql_18 / postgres (3.13)
🔇 Additional comments (5)
newsfragments/1233.docs.rst (1)
1-1: LGTM!The changelog fragment accurately describes the improvements made to the README examples.
pyproject.toml (1)
116-118: LGTM!The new documentation fragment configuration is correctly defined and follows the same pattern as existing fragments.
README.rst (3)
310-319: LGTM!The type annotations for the
userfixture are correct and clear.
322-332: LGTM!The test function signature with type annotations is correct and demonstrates proper typing for test functions.
435-447: LGTM!The type annotations and imports for the PostgreSQL Docker test are correct.
Chore that needs to be done:
pipenv run towncrier create [issue_number].[type].rstTypes are defined in the pyproject.toml, issue_number either from issue tracker or the Pull request number
Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.