Skip to content

Conversation

@svillegas-cdd
Copy link
Contributor

  • Updated iva_no_retenido to be optional in RcDetalleEntry and its variants.
  • Adjusted CSV parser to handle cases where iva_no_retenido is missing or None.
  • Updated tests to reflect changes in iva_no_retenido handling.

Ref: https://app.shortcut.com/cordada/story/16600/

@svillegas-cdd svillegas-cdd self-assigned this Sep 15, 2025
@svillegas-cdd svillegas-cdd added bug Something isn't working component: rcv labels Sep 15, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR makes the iva_no_retenido field optional across RCV data models and CSV parsers to handle cases where this field may be missing or null in the data source.

  • Made iva_no_retenido field optional in data models by changing type from int to Optional[int]
  • Updated CSV parser functions to use .get() method instead of direct key access for iva_no_retenido
  • Updated test data to use None instead of 0 for iva_no_retenido to reflect the optional nature

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/cl_sii/rcv/data_models.py Changed iva_no_retenido field type from int to Optional[int] in base data model
src/cl_sii/rcv/parse_csv.py Updated CSV parser functions to handle optional iva_no_retenido field using .get() method
src/tests/test_rcv_data_models.py Updated test case to use None instead of 0 for iva_no_retenido field

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Sep 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.97%. Comparing base (c5e0015) to head (b471dfc).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #891   +/-   ##
========================================
  Coverage    88.97%   88.97%           
========================================
  Files           40       40           
  Lines         3565     3565           
  Branches       355      355           
========================================
  Hits          3172     3172           
  Misses         240      240           
  Partials       153      153           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Updated `iva_no_retenido` to be optional in `RcDetalleEntry` and its variants.
- Adjusted CSV parser to handle cases where `iva_no_retenido` is missing or `None`.
- Updated tests to reflect changes in `iva_no_retenido` handling.

Ref: https://app.shortcut.com/cordada/story/16600/
@svillegas-cdd svillegas-cdd force-pushed the task/sc-16600--validation-error-for-RcRegistroDetalleEntry branch from 448250f to b471dfc Compare September 15, 2025 14:39
@svillegas-cdd svillegas-cdd marked this pull request as ready for review September 15, 2025 14:39
@svillegas-cdd svillegas-cdd requested a review from a team as a code owner September 15, 2025 14:39
@sonarqubecloud
Copy link

@svillegas-cdd svillegas-cdd merged commit f943840 into develop Sep 15, 2025
23 checks passed
@svillegas-cdd svillegas-cdd deleted the task/sc-16600--validation-error-for-RcRegistroDetalleEntry branch September 15, 2025 15:09
@svillegas-cdd svillegas-cdd mentioned this pull request Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working component: rcv

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants