Skip to content

Conversation

@svillegas-cdd
Copy link
Contributor

  • Add a new DocumentoReferencias type to encapsulate the tipo_documento_referencia and folio_documento_referencia fields.
  • This change enhances the data model by allowing multiple references to be stored in a structured format, improving the parsing and validation processes.

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

@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.86%. Comparing base (ff413a6) to head (cf8519d).
⚠️ Report is 32 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #961      +/-   ##
===========================================
+ Coverage    88.79%   88.86%   +0.06%     
===========================================
  Files           40       40              
  Lines         3767     3789      +22     
  Branches       390      397       +7     
===========================================
+ Hits          3345     3367      +22     
  Misses         267      267              
  Partials       155      155              

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

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 refactors the data model for RCV (Registro de Compra y Venta) to improve handling of document references. Instead of storing document reference information in two separate fields (tipo_documento_referencia and folio_documento_referencia), the code now uses a single structured field that can hold multiple references.

Key changes:

  • Introduced a new DocumentoReferencias TypedDict to encapsulate document reference data
  • Replaced two separate fields with a single documento_referencias list field in RvDetalleEntry
  • Added parsing logic to handle multiple document references from hyphen-separated folio values (e.g., "10370-10371")

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/cl_sii/rcv/data_models.py Added DocumentoReferencias TypedDict and updated RvDetalleEntry to use documento_referencias field instead of separate tipo/folio fields
src/cl_sii/rcv/parse_csv.py Updated CSV schema and added _parse_rv_documento_referencias function to parse and transform document references during CSV parsing
src/tests/test_rcv_parse_csv.py Updated test expectations to use new documento_referencias field structure and added new test case for multiple document references
src/tests/test_rcv_data_models.py Updated test fixture to use new documento_referencias field
src/tests/test_data/sii-rcv/RCV-venta-multiple-dte-referencias.csv Added test data file with examples of multiple document references in hyphen-separated format

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@svillegas-cdd svillegas-cdd force-pushed the task/sc-17694-errors-parsing-rcv-mas-de-una-referencia branch 3 times, most recently from 9af700e to 85a5e52 Compare December 24, 2025 12:18
- Add a new DocumentoReferencias type to encapsulate the
tipo_documento_referencia and folio_documento_referencia fields.
- This change enhances the data model by allowing multiple
references to be stored in a structured format, improving
the parsing and validation processes.

Ref: https://app.shortcut.com/cordada/story/17694/
@svillegas-cdd svillegas-cdd force-pushed the task/sc-17694-errors-parsing-rcv-mas-de-una-referencia branch from 85a5e52 to cf8519d Compare December 24, 2025 12:18
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
15.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants