Skip to content

Conversation

@svillegas-cdd
Copy link
Contributor

  • Implemented parse_taxpayer_provided_info to parse taxpayer-provided information from CTE HTML.
  • Added TaxpayerProvidedInfo and LegalRepresentative data models.
  • Created tests to validate parser functionality with sample HTML input.

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

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 implements a parser for the "Carpeta Tributaria Electrónica" (CTE) system to extract taxpayer-provided information from HTML documents. The implementation adds functionality to parse legal representatives, company formation details, and participation in existing companies from the CTE HTML structure.

  • Added data models for TaxpayerProvidedInfo and LegalRepresentative using Pydantic dataclasses
  • Implemented parse_taxpayer_provided_info function to extract structured data from CTE HTML
  • Created comprehensive test coverage with sample HTML data

Reviewed Changes

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

File Description
src/tests/test_data/sii-cte/cte_taxpayer_provided_info.html Sample HTML test data representing a CTE document with taxpayer information
src/tests/test_cte_parsers.py Unit tests validating the parser functionality with expected data structure
src/cl_sii/cte/parsers.py Main parser implementation using BeautifulSoup to extract taxpayer data
src/cl_sii/cte/data_models.py Pydantic dataclass definitions for structured taxpayer information

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 11, 2025

Codecov Report

❌ Patch coverage is 95.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.97%. Comparing base (4efa7f6) to head (871f662).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
src/cl_sii/cte/parsers.py 93.18% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #889      +/-   ##
===========================================
+ Coverage    88.87%   88.97%   +0.10%     
===========================================
  Files           38       40       +2     
  Lines         3505     3565      +60     
  Branches       345      355      +10     
===========================================
+ Hits          3115     3172      +57     
- Misses         239      240       +1     
- Partials       151      153       +2     

☔ 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 force-pushed the task/sc-16535-parse-informacion-provista-por-el-contribuyente-cte branch from f6f04b9 to b13710c Compare September 12, 2025 14:20
- Implemented `parse_taxpayer_provided_info` to parse taxpayer-provided information from CTE HTML.
- Added `TaxpayerProvidedInfo` and `LegalRepresentative` data models.
- Created tests to validate parser functionality with sample HTML input.

Ref: https://app.shortcut.com/cordada/story/16535/
@svillegas-cdd svillegas-cdd force-pushed the task/sc-16535-parse-informacion-provista-por-el-contribuyente-cte branch from b13710c to 871f662 Compare September 12, 2025 14:26
@sonarqubecloud
Copy link

@svillegas-cdd svillegas-cdd merged commit c5e0015 into develop Sep 12, 2025
21 checks passed
@svillegas-cdd svillegas-cdd deleted the task/sc-16535-parse-informacion-provista-por-el-contribuyente-cte branch September 12, 2025 14:28
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants