-
Notifications
You must be signed in to change notification settings - Fork 14
Add blacklist_validation_status and pronouns fields to User class #434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds four new optional fields to the User model: Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.py⚙️ CodeRabbit configuration file
Files:
⏰ 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). (6)
🔇 Additional comments (4)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #434 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 54 54
Lines 1186 1190 +4
=========================================
+ Hits 1186 1190 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @requirements.txt:
- Line 2: The requirements pin uses a pre-release version
cuenca-validations==2.1.24.dev1; update this dependency entry to the latest
stable release by replacing that version with cuenca-validations==2.1.23 in the
requirements.txt so the project depends on a non-dev release before merging.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
cuenca/resources/users.pycuenca/version.pyrequirements.txt
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py
⚙️ CodeRabbit configuration file
**/*.py: Enforce Relative Imports for Internal ModulesEnsure that any imports referencing internal modules use relative paths. However, if modules reside in the main module directories (for example /src or /library_or_app_name) —and relative imports are not feasible—absolute imports are acceptable. Additionally, if a module is located outside the main module structure (for example, in /tests or /scripts at a similar level), absolute imports are also valid.
Examples and Guidelines:
- If a module is in the same folder or a subfolder of the current file, use relative imports. For instance: from .some_module import SomeClass
- If the module is located under /src or /library_or_app_name and cannot be imported relatively, absolute imports are allowed (e.g., from library_or_app_name.utilities import helper_method).
- If a module is outside the main module directories (for example, in /tests, /scripts, or any similarly placed directory), absolute imports are valid.
- External (third-party) libraries should be imported absolutely (e.g., import requests).
**/*.py:
Rule: Enforce Snake Case in Python Backend
- New or Modified Code: Use snake_case for all variables, functions, methods, and class attributes.
- Exceptions (Pydantic models for API responses):
- Primary fields must be snake_case.
- If older clients expect camelCase, create a computed or alias field that references the snake_case field.
- Mark any camelCase fields as deprecated or transitional.
Examples
Invalid:
class CardConfiguration(BaseModel): title: str subTitle: str # ❌ Modified or new field in camelCaseValid:
class CardConfiguration(BaseModel): title: str subtitle: str # ✅ snake_case for new/modified field @computed_field def subTitle(self) -> str: # camelCase allowed only for compatibility return self.subtitleAny direct use of camelCase in new or updated code outside of these exceptions should be flagged.
`*...
Files:
cuenca/version.pycuenca/resources/users.py
⏰ 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). (1)
- GitHub Check: pytest (3.9)
🔇 Additional comments (4)
cuenca/version.py (1)
1-1: LGTM - Version bump appropriate for new features.The dev version suffix aligns with the
cuenca-validationsdev dependency. Ensure both are updated to stable versions before final release.cuenca/resources/users.py (3)
17-17: LGTM!The
VerificationStatusimport is correctly placed with othercuenca_validations.typesimports.
88-89: LGTM!New fields follow snake_case convention and are properly typed as
Optional. The placement after identity-related fields is logical.
173-198: Code implementation is correct; external dependency verification needed.Both
pronounsandblacklist_validation_statusare properly added to the method signature and correctly passed toUserUpdateRequest. The implementation follows the established pattern.However, I was unable to verify that
cuenca-validations==2.1.24.dev1actually supports these fields due to a package installation timeout. Manual verification of theUserUpdateRequestschema in that version is required to confirm field support.
requirements.txt
Outdated
| @@ -1,3 +1,3 @@ | |||
| requests==2.32.3 | |||
| cuenca-validations==2.1.19 | |||
| cuenca-validations==2.1.24.dev1 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
cuenca-validations 2.1.24 PyPI versions
💡 Result:
I checked PyPI on January 13, 2026 — there is no cuenca-validations 2.1.24 release. The latest published version on PyPI is 2.1.23. [1][2]
Sources:
- PyPI project page (release history shows 2.1.23). [1]
- Safety DB / package info (latest listed v2.1.23). [2]
🏁 Script executed:
#!/bin/bash
# Check cuenca-validations versions on PyPI
curl -s https://pypi.org/pypi/cuenca-validations/json | jq -r '.releases | keys[]' | grep -E '^2\.1\.(19|2[0-4])' | sort -VRepository: cuenca-mx/cuenca-python
Length of output: 137
Update to stable version before release.
cuenca-validations==2.1.24.dev1 is a pre-release version. The latest stable version available is 2.1.23. Update the dependency to a stable release before merging to main.
🤖 Prompt for AI Agents
In @requirements.txt at line 2, The requirements pin uses a pre-release version
cuenca-validations==2.1.24.dev1; update this dependency entry to the latest
stable release by replacing that version with cuenca-validations==2.1.23 in the
requirements.txt so the project depends on a non-dev release before merging.
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.