Skip to content

Conversation

@gmorales96
Copy link
Contributor

@gmorales96 gmorales96 commented Jan 9, 2026

Summary by CodeRabbit

  • New Features

    • Expanded bank registry to support two additional Mexican financial institutions: COOPDESARROLLO (bank code 90725) and Dep y Pag Dig (bank code 90729). The CLABE processing system now seamlessly recognizes and handles identification codes for these new banking partners.
  • Chores

    • Patch version updated to 2.1.8.

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 9, 2026

Walkthrough

This pull request adds two new bank code mappings to the CLABE library. The BANKS dictionary is extended with entries mapping code '725' to '90725' and '729' to '90729', while BANK_NAMES is updated with the corresponding bank identifiers '90725' → 'COOPDESARROLLO' and '90729' → 'Dep y Pag Dig'. Additionally, the package version is incremented from 2.1.7 to 2.1.8. No logic, control flow, or error handling changes are introduced.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • PR #177: Adds new bank code-to-name mappings to BANKS and BANK_NAMES dictionaries in clabe/banks.py
  • PR #183: Extends BANKS and BANK_NAMES dictionaries with additional bank code mappings
  • PR #178: Modifies BANKS and BANK_NAMES dictionaries while also bumping the package version number

Suggested labels

enhancement

Suggested reviewers

  • felipao-mx
  • rogelioLpz
🚥 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 accurately describes the main changes: adding two new bank mappings (COOPDESARROLLO and Dep y Pag Dig) to the BANKS and BANK_NAMES dictionaries.
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 docstrings

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

@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (485a019) to head (d394c43).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #186   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines           83        83           
=========================================
  Hits            83        83           
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 Δ
clabe/banks.py 100.00% <ø> (ø)
clabe/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 485a019...d394c43. 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 @clabe/banks.py:
- Around line 145-150: The BANK_NAMES mapping is not sorted alphabetically by
the bank name values and the provenance note "Downloaded 2022-10-18" may be
stale; reorder the entries in BANK_NAMES so the dict is sorted by the bank name
strings (values) in ascending alphabetical order while preserving correct code
keys (e.g., entries like '90725': 'COOPDESARROLLO', '90652': 'Credicapital',
etc.), and update the provenance/comment timestamp to the actual download date
(or remove it) wherever the "Downloaded 2022-10-18" note is defined.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 485a019 and d394c43.

📒 Files selected for processing (2)
  • clabe/banks.py
  • clabe/version.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:

  • clabe/version.py
  • clabe/banks.py
🔇 Additional comments (2)
clabe/version.py (1)

1-1: Version bump looks correct.

clabe/banks.py (1)

41-46: Bank codes are valid per Banxico sources. 725→90725 (COOPDESARROLLO) and 729→90729 (Dep y Pag Dig) correctly map to official Banxico institutions.

Comment on lines +145 to +150
'90725': 'COOPDESARROLLO',
'90652': 'Credicapital',
'90688': 'Crediclub',
'90680': 'Cristobal Colon',
'90723': 'Cuenca',
'90729': 'Dep y Pag Dig',
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

Keep BANK_NAMES “alphabetical by bank name” and update the “Downloaded 2022-10-18” note if it’s no longer accurate.

Proposed tweak (optional) to avoid stale provenance
-# 2022-10-18
+# Updated: 2026-01-09 (added 90725, 90729)

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In @clabe/banks.py around lines 145 - 150, The BANK_NAMES mapping is not sorted
alphabetically by the bank name values and the provenance note "Downloaded
2022-10-18" may be stale; reorder the entries in BANK_NAMES so the dict is
sorted by the bank name strings (values) in ascending alphabetical order while
preserving correct code keys (e.g., entries like '90725': 'COOPDESARROLLO',
'90652': 'Credicapital', etc.), and update the provenance/comment timestamp to
the actual download date (or remove it) wherever the "Downloaded 2022-10-18"
note is defined.

@gmorales96 gmorales96 merged commit eab3b10 into main Jan 9, 2026
15 checks passed
@gmorales96 gmorales96 deleted the add-coopdesarrollo-and-dep-y-pag-dig branch January 9, 2026 22:42
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