Skip to content

Conversation

@juliolmuller
Copy link
Collaborator

@juliolmuller juliolmuller commented Dec 29, 2025

Summary by CodeRabbit

  • Chores

    • Updated internal dependencies across multiple packages with tightened version constraints for improved compatibility and stability
  • Documentation

    • Updated README and CHANGELOG files with dependency migration details

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

@juliolmuller juliolmuller requested a review from a team as a code owner December 29, 2025 13:31
@juliolmuller juliolmuller added the enhancement New feature or request label Dec 29, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 29, 2025

📝 Walkthrough

Walkthrough

This PR systematically migrates dependency packages across the monorepo from deprecated libraries (cnpj-cd and cpf-cd) to their newer counterparts (cnpj-dv and cpf-dv), updating dependency declarations, imports, changelogs, and documentation across multiple packages.

Changes

Cohort / File(s) Summary
CNPJ Package Changelogs
packages/cnpj-gen/CHANGELOG.md, packages/cnpj-val/CHANGELOG.md
Added 1.0.2 section documenting migration from cnpj-cd to cnpj-dv; updated prior version entries to reference cnpj-dv
CNPJ Package Dependencies
packages/cnpj-gen/pyproject.toml, packages/cnpj-val/pyproject.toml
Updated dependency from cnpj-cd>=1.0.1 to cnpj-dv>=1.0.0,<2.0.0 with tightened version constraints
CNPJ Package Imports
packages/cnpj-gen/src/cnpj_gen/cnpj_generator.py, packages/cnpj-val/src/cnpj_val/cnpj_validator.py
Changed import source from cnpj_cd to cnpj_dv
CPF Package Changelogs
packages/cpf-gen/CHANGELOG.md, packages/cpf-val/CHANGELOG.md
Added 1.0.1 section documenting migration from cpf-cd to cpf-dv
CPF Package Dependencies
packages/cpf-gen/pyproject.toml, packages/cpf-val/pyproject.toml
Updated dependency from cpf-cd>=1.0.0 to cpf-dv>=1.0.0,<2.0.0
CPF Package Imports
packages/cpf-gen/src/cpf_gen/cpf_generator.py, packages/cpf-val/src/cpf_val/cpf_validator.py
Changed import source from cpf_cd to cpf_dv
CPF Package Documentation
packages/cpf-gen/README.md, packages/cpf-val/README.md
Updated dependency references in documentation from cpf-cd to cpf-dv
Root Configuration
requirements.txt
Updated root dependencies from cnpj-cd>=1.0.1 to cnpj-dv>=1.0.0 and cpf-cd>=1.0.0 to cpf-dv>=1.0.0

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 Hoppy migrations, old to new!
cd says goodbye, dv comes through,
Imports updated, clean and bright,
Dependencies locked just right,
Changelog hops forward with delight! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: migrating from CD (check digit) packages to DV (digit validation) packages across the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/update-cd-to-dv

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
Contributor

@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: 0

🧹 Nitpick comments (3)
requirements.txt (1)

1-1: Consider the version constraint for cnpj-dv.

The dependency changed from cnpj-cd>=1.0.1 to cnpj-dv>=1.0.0, which lowers the minimum version requirement. This might be intentional if cnpj-dv 1.0.0 is the first stable release, but verify this aligns with your compatibility requirements.

Additionally, consider adding upper version bounds (e.g., cnpj-dv>=1.0.0,<2.0.0) for consistency with the constraints in packages/cnpj-gen/pyproject.toml.

packages/cnpj-gen/CHANGELOG.md (1)

3-10: Consider whether this warrants a minor version bump.

The changelog documents the migration from cnpj-cd to cnpj-dv as version 1.0.2 (patch). However, since this changes the dependency requirements for consumers who might have cnpj-cd but not cnpj-dv, consider whether this should be a minor version bump (1.1.0) instead.

According to semantic versioning, a patch version should be for backward-compatible bug fixes. While the API hasn't changed, the dependency change could affect installation and compatibility.

packages/cnpj-val/CHANGELOG.md (1)

3-10: Consider whether this warrants a minor version bump.

Similar to cnpj-gen, this dependency migration is documented as a patch version (1.0.2). Consider whether changing dependency requirements warrants a minor version bump (1.1.0) instead, as downstream consumers will need to have cnpj-dv available.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2fe8218 and 7fb0a84.

📒 Files selected for processing (15)
  • packages/cnpj-gen/CHANGELOG.md
  • packages/cnpj-gen/pyproject.toml
  • packages/cnpj-gen/src/cnpj_gen/cnpj_generator.py
  • packages/cnpj-val/CHANGELOG.md
  • packages/cnpj-val/pyproject.toml
  • packages/cnpj-val/src/cnpj_val/cnpj_validator.py
  • packages/cpf-gen/CHANGELOG.md
  • packages/cpf-gen/README.md
  • packages/cpf-gen/pyproject.toml
  • packages/cpf-gen/src/cpf_gen/cpf_generator.py
  • packages/cpf-val/CHANGELOG.md
  • packages/cpf-val/README.md
  • packages/cpf-val/pyproject.toml
  • packages/cpf-val/src/cpf_val/cpf_validator.py
  • requirements.txt
🧰 Additional context used
🧬 Code graph analysis (3)
packages/cnpj-val/src/cnpj_val/cnpj_validator.py (1)
packages/cnpj-dv/src/cnpj_dv/cnpj_check_digits.py (1)
  • CnpjCheckDigits (13-147)
packages/cpf-gen/src/cpf_gen/cpf_generator.py (1)
packages/cpf-dv/src/cpf_dv/cpf_check_digits.py (1)
  • CpfCheckDigits (14-154)
packages/cnpj-gen/src/cnpj_gen/cnpj_generator.py (1)
packages/cnpj-dv/src/cnpj_dv/cnpj_check_digits.py (1)
  • CnpjCheckDigits (13-147)
🔇 Additional comments (16)
packages/cpf-val/CHANGELOG.md (1)

3-10: LGTM! Clear migration documentation.

The changelog entry properly documents the dependency migration from cpf-cd to cpf-dv with clear version information.

packages/cpf-gen/CHANGELOG.md (1)

3-10: LGTM! Consistent migration documentation.

The changelog entry consistently documents the dependency migration, matching the pattern used across other packages.

packages/cpf-val/pyproject.toml (1)

37-37: LGTM! Consistent dependency migration.

The dependency update to cpf-dv with version constraint >=1.0.0,<2.0.0 is consistent with other packages in this migration.

packages/cnpj-val/src/cnpj_val/cnpj_validator.py (1)

1-1: LGTM! Import correctly updated for dependency migration.

The import statement has been properly updated from cnpj_cd to cnpj_dv. The CnpjCheckDigits class interface remains unchanged, ensuring compatibility.

packages/cpf-val/src/cpf_val/cpf_validator.py (1)

1-1: LGTM! Import correctly updated for dependency migration.

The import statement has been properly updated from cpf_cd to cpf_dv, maintaining the same CpfCheckDigits class interface.

packages/cpf-gen/README.md (2)

137-137: LGTM! Documentation correctly updated.

The features list has been updated to reference cpf-dv instead of cpf-cd.


225-225: LGTM! Dependencies section updated.

The dependencies section correctly lists cpf-dv as the check digit calculation dependency.

packages/cpf-gen/pyproject.toml (1)

38-38: Package verified on PyPI with appropriate version constraints.

The cpf-dv package is published and available on PyPI (version 1.0.0, stable, not yanked). The version constraint >=1.0.0,<2.0.0 correctly allows the current stable version while preventing breaking changes from future major versions. The dependency migration is sound.

packages/cnpj-val/pyproject.toml (1)

37-37: The cnpj-dv package is published on PyPI and available. Version 1.0.0 is currently available, and the constraint cnpj-dv>=1.0.0,<2.0.0 correctly allows this version with flexibility for future major releases. The dependency specification is sound.

packages/cnpj-gen/src/cnpj_gen/cnpj_generator.py (1)

3-3: LGTM - Import migration is consistent.

The import change from cnpj_cd to cnpj_dv is consistent with the broader migration effort. The CnpjCheckDigits API usage remains unchanged, ensuring backward compatibility.

packages/cpf-val/README.md (1)

92-92: LGTM - Documentation correctly updated.

The README documentation has been properly updated to reflect the migration from cpf-cd to cpf-dv, ensuring consistency with the actual dependency changes.

Also applies to: 144-144

requirements.txt (1)

1-1: Verify package versions are published and compatible.

Ensure the specified versions of cnpj-dv and cpf-dv are available on PyPI and provide the same API as the previous cnpj-cd and cpf-cd packages.

Also applies to: 6-6

packages/cnpj-gen/pyproject.toml (1)

38-38: LGTM - Good use of version constraints.

The dependency migration from cnpj-cd>=1.0.1 to cnpj-dv>=1.0.0,<2.0.0 is well-structured. The addition of the upper bound <2.0.0 follows semantic versioning best practices and helps prevent unexpected breaking changes from major version updates.

packages/cnpj-gen/CHANGELOG.md (1)

3-30: LGTM - Changelog is thorough and consistent.

The changelog clearly documents the migration, including dropped and added dependencies. The historical entries (1.0.1 and 1.0.0) have also been updated to reference cnpj-dv for consistency.

packages/cnpj-val/CHANGELOG.md (1)

3-30: LGTM - Changelog comprehensively documents the migration.

The changelog effectively documents the migration from cnpj-cd to cnpj-dv, with clear sections for dropped and added dependencies. Historical entries are also updated for consistency.

packages/cpf-gen/src/cpf_gen/cpf_generator.py (1)

3-3: Migration to cpf-dv is complete.

All references to the old cpf_cd package have been removed from the codebase. The new cpf-dv package is properly configured as a local monorepo package with correct version constraints (≥1.0.0, <2.0.0) in cpf-gen's dependencies.

@juliolmuller juliolmuller merged commit 5359ad1 into main Dec 29, 2025
12 checks passed
@juliolmuller juliolmuller deleted the refactor/update-cd-to-dv branch December 29, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants