-
Notifications
You must be signed in to change notification settings - Fork 12
cte: Add parser for "Carpeta Tributaria Electrónica" #889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cte: Add parser for "Carpeta Tributaria Electrónica" #889
Conversation
There was a problem hiding this 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
TaxpayerProvidedInfoandLegalRepresentativeusing Pydantic dataclasses - Implemented
parse_taxpayer_provided_infofunction 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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
f6f04b9 to
b13710c
Compare
- 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/
b13710c to
871f662
Compare
|



parse_taxpayer_provided_infoto parse taxpayer-provided information from CTE HTML.TaxpayerProvidedInfoandLegalRepresentativedata models.Ref: https://app.shortcut.com/cordada/story/16535/