Skip to content

Conversation

@gmorales96
Copy link
Contributor

@gmorales96 gmorales96 commented Jan 13, 2026

Summary by CodeRabbit

  • New Features

    • Users can add pronouns to their profile.
    • User records now track blacklist validation status, deactivation timestamp, and terms-of-service agreement ID.
  • Chores

    • Package version bumped.
    • Validation dependency updated.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

Walkthrough

Adds four new optional fields to the User model: blacklist_validation_status (Optional[VerificationStatus]), pronouns (Optional[str]), deactivated_at (Optional[datetime]), and user_tos_agreements_id (Optional[str]). Updates User.update signature to accept blacklist_validation_status and propagates it into UserUpdateRequest and model_dump(). Bumps package version from 2.1.14 to 2.1.15. Updates requirements.txt to use cuenca-validations==2.1.24.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • alexviquez
  • rogelioLpz
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: adding new fields (blacklist_validation_status, pronouns, and two others) to the User class, matching the changeset.

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

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 32434b5 and cbe496d.

📒 Files selected for processing (1)
  • cuenca/resources/users.py
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

⚙️ CodeRabbit configuration file

**/*.py: Enforce Relative Imports for Internal Modules

Ensure 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:

  1. 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
  2. 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).
  3. If a module is outside the main module directories (for example, in /tests, /scripts, or any similarly placed directory), absolute imports are valid.
  4. External (third-party) libraries should be imported absolutely (e.g., import requests).

**/*.py:
Rule: Enforce Snake Case in Python Backend

  1. New or Modified Code: Use snake_case for all variables, functions, methods, and class attributes.
  2. 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 camelCase

Valid:

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.subtitle

Any direct use of camelCase in new or updated code outside of these exceptions should be flagged.

`*...

Files:

  • cuenca/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). (6)
  • GitHub Check: pytest (3.9)
  • GitHub Check: pytest (3.13)
  • GitHub Check: pytest (3.12)
  • GitHub Check: pytest (3.10)
  • GitHub Check: coverage
  • GitHub Check: pytest (3.11)
🔇 Additional comments (4)
cuenca/resources/users.py (4)

88-91: LGTM on new User model fields.

The new fields follow snake_case naming conventions and use appropriate types. The design correctly distinguishes between:

  • Updatable fields (blacklist_validation_status, pronouns) with corresponding update method parameters
  • Read-only server-controlled fields (deactivated_at, user_tos_agreements_id)

176-176: LGTM on update method signature.

The new parameter maintains backward compatibility with Optional typing and None default, consistent with other update parameters.


17-17: Import addition follows guidelines.

The VerificationStatus import from cuenca_validations.types is correctly added as an absolute import for an external library, which is the appropriate pattern. The import is available in cuenca-validations==2.1.24 (as specified in requirements.txt) and is already used consistently throughout the codebase.


199-199: LGTM on propagation to UserUpdateRequest.

The blacklist_validation_status is correctly passed to UserUpdateRequest, maintaining consistency with other parameters. The dependency cuenca-validations>=2.1.5 supports this field.


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

@codecov
Copy link

codecov bot commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7d026af) to head (cbe496d).
⚠️ Report is 1 commits behind head on main.

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     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cuenca/resources/users.py 100.00% <100.00%> (ø)
cuenca/version.py 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d026af...cbe496d. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7d026af and 041298f.

📒 Files selected for processing (3)
  • cuenca/resources/users.py
  • cuenca/version.py
  • requirements.txt
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

⚙️ CodeRabbit configuration file

**/*.py: Enforce Relative Imports for Internal Modules

Ensure 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:

  1. 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
  2. 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).
  3. If a module is outside the main module directories (for example, in /tests, /scripts, or any similarly placed directory), absolute imports are valid.
  4. External (third-party) libraries should be imported absolutely (e.g., import requests).

**/*.py:
Rule: Enforce Snake Case in Python Backend

  1. New or Modified Code: Use snake_case for all variables, functions, methods, and class attributes.
  2. 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 camelCase

Valid:

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.subtitle

Any direct use of camelCase in new or updated code outside of these exceptions should be flagged.

`*...

Files:

  • cuenca/version.py
  • cuenca/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-validations dev dependency. Ensure both are updated to stable versions before final release.

cuenca/resources/users.py (3)

17-17: LGTM!

The VerificationStatus import is correctly placed with other cuenca_validations.types imports.


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 pronouns and blacklist_validation_status are properly added to the method signature and correctly passed to UserUpdateRequest. The implementation follows the established pattern.

However, I was unable to verify that cuenca-validations==2.1.24.dev1 actually supports these fields due to a package installation timeout. Manual verification of the UserUpdateRequest schema 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
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 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 -V

Repository: 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.

@gmorales96 gmorales96 requested a review from rogelioLpz January 13, 2026 18:52
@gmorales96 gmorales96 merged commit 8132e1c into main Jan 13, 2026
23 of 39 checks passed
@gmorales96 gmorales96 deleted the update-blacklist-validation-status branch January 13, 2026 19:45
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.

3 participants