Skip to content

Conversation

svillegas-cdd
Copy link
Contributor

@svillegas-cdd svillegas-cdd commented Aug 28, 2025

chore: Add TypeVar for RCV CSV parser typing

This was causing an issue en FD CL DATA that the functions were expecting a RcvDetalleEntry instead of a subclass

feat: Update "RCV Ventas" update preprocessing logic

  • Implemented test for parse_rcv_venta_csv_file ensuring correct CSV parsing.
  • Updated _RcvCsvRowSchemaBase.preprocess to handle empty and "-" values correctly.

This is to set as null the empty strings

- Implemented test for `parse_rcv_venta_csv_file` ensuring correct CSV parsing.
- Updated `_RcvCsvRowSchemaBase.preprocess` to handle empty and "-" values correctly.
@svillegas-cdd svillegas-cdd self-assigned this Aug 28, 2025
@svillegas-cdd svillegas-cdd requested a review from a team as a code owner August 28, 2025 19:08
Copy link

@Copilot 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 updates RCV CSV typing and preprocessing logic. It adds a TypeVar for better type safety in RCV CSV parser functions and improves the preprocessing of empty values in RCV Ventas CSV files.

  • Added TypeVar RcvDetalleEntryType to resolve typing issues with RCV CSV parser functions
  • Updated preprocessing logic to handle empty strings and "-" values more accurately
  • Implemented comprehensive test for parse_rcv_venta_csv_file function

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/cl_sii/rcv/parse_csv.py Added TypeVar for generic typing and updated preprocessing logic to handle empty values
src/tests/test_rcv_parse_csv.py Added comprehensive test implementation for RCV venta CSV file parsing
Comments suppressed due to low confidence (1)

src/cl_sii/rcv/parse_csv.py:1

  • [nitpick] The condition logic is difficult to read with the split boolean expression. Consider restructuring this as separate conditions or extracting the field type check into a helper variable for better readability.
"""

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

Copy link

Copy link

codecov bot commented Aug 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.54%. Comparing base (d08463a) to head (c65bd6a).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #867   +/-   ##
========================================
  Coverage    88.54%   88.54%           
========================================
  Files           38       38           
  Lines         3483     3484    +1     
  Branches       340      340           
========================================
+ Hits          3084     3085    +1     
  Misses         248      248           
  Partials       151      151           

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

@svillegas-cdd svillegas-cdd merged commit f416948 into develop Sep 2, 2025
21 checks passed
@svillegas-cdd svillegas-cdd deleted the task/sii-rcv-parser-udaptes branch September 2, 2025 13:36
@svillegas-cdd svillegas-cdd mentioned this pull request Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants