Skip to content
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

Add data model for DTE Referencia #218

Merged
merged 4 commits into from
Apr 4, 2023

Conversation

yaselc
Copy link

@yaselc yaselc commented Apr 27, 2021

  • Add a new enum for 'Tipo de Documento'
  • Add DteXmlReferencia class.
  • Update DTE's parser
  • Add tests

Ref: https://cordada.aha.io/features/COMPCLDATA-221
Resolves: #217

@codecov-commenter
Copy link

codecov-commenter commented Apr 27, 2021

Codecov Report

Patch coverage: 99.09% and project coverage change: +0.95 🎉

Comparison is base (1f2bb22) 85.86% compared to head (3598071) 86.82%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #218      +/-   ##
===========================================
+ Coverage    85.86%   86.82%   +0.95%     
===========================================
  Files           34       34              
  Lines         2788     3005     +217     
  Branches       356      380      +24     
===========================================
+ Hits          2394     2609     +215     
- Misses         256      257       +1     
- Partials       138      139       +1     
Impacted Files Coverage Δ
cl_sii/dte/parse.py 85.00% <94.28%> (+2.46%) ⬆️
cl_sii/base/constants.py 100.00% <100.00%> (ø)
cl_sii/dte/constants.py 100.00% <100.00%> (ø)
cl_sii/dte/data_models.py 97.44% <100.00%> (+1.14%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yaselc yaselc force-pushed the feature/add-sii-dte-referencia branch 5 times, most recently from 44a1b3d to 884239f Compare April 30, 2021 23:06
@yaselc yaselc marked this pull request as ready for review April 30, 2021 23:08
cl_sii/dte/constants.py Outdated Show resolved Hide resolved
cl_sii/dte/constants.py Outdated Show resolved Hide resolved
cl_sii/dte/data_models.py Outdated Show resolved Hide resolved
cl_sii/dte/parse.py Outdated Show resolved Hide resolved
cl_sii/dte/parse.py Outdated Show resolved Hide resolved
@jtrh jtrh requested a review from jtrobles-cdd May 5, 2021 23:13
@jtrobles-cdd jtrobles-cdd removed the request for review from jtrh May 6, 2021 13:38
@yaselc yaselc assigned ycouce-cdd and unassigned yaselc May 17, 2021
@ycouce-cdd ycouce-cdd force-pushed the feature/add-sii-dte-referencia branch from 884239f to b7b9854 Compare May 24, 2021 17:40
cl_sii/dte/constants.py Outdated Show resolved Hide resolved
cl_sii/dte/data_models.py Outdated Show resolved Hide resolved
cl_sii/dte/data_models.py Show resolved Hide resolved
cl_sii/dte/data_models.py Outdated Show resolved Hide resolved
cl_sii/dte/data_models.py Outdated Show resolved Hide resolved
@jtrobles-cdd jtrobles-cdd added enhancement New feature or request and removed feature labels Feb 3, 2022
@jtrobles-cdd jtrobles-cdd marked this pull request as draft September 28, 2022 22:56
@svillegas-cdd svillegas-cdd marked this pull request as ready for review March 20, 2023 16:09
@svillegas-cdd svillegas-cdd requested a review from a team as a code owner March 20, 2023 16:09
Copy link
Contributor

@fpinto-cdd fpinto-cdd left a comment

Choose a reason for hiding this comment

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

Looks like the dataclass is already a Pydantic dataclass, so this line should be removed from the description of the second commit

Captura de pantalla 2023-03-22 133254

cl_sii/dte/parse.py Outdated Show resolved Hide resolved
tests/test_dte_data_models.py Outdated Show resolved Hide resolved
Copy link
Contributor

@fpinto-cdd fpinto-cdd left a comment

Choose a reason for hiding this comment

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

  • Let's change the title of this commit to "chore: Add Pydantic validators to data model DteXmlReferencia".
  • Let's change the marked word classes to validators.

Captura de pantalla 2023-03-22 173606

cl_sii/dte/data_models.py Show resolved Hide resolved
cl_sii/dte/data_models.py Show resolved Hide resolved
cl_sii/base/constants.py Outdated Show resolved Hide resolved
cl_sii/base/constants.py Outdated Show resolved Hide resolved
@reviewpad reviewpad bot mentioned this pull request Mar 30, 2023
9 tasks
@codeclimate
Copy link

codeclimate bot commented Mar 31, 2023

Code Climate has analyzed commit 3598071 and detected 0 issues on this pull request.

View more on Code Climate.

Copy link
Member

@jtrobles-cdd jtrobles-cdd left a comment

Choose a reason for hiding this comment

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

  • Can you change the commit type of "chore: Add Pydantic validators to data model DteXmlReferencia" from chore to feat(dte)?
  • In commit "feat(base): Add enum for 'Tipo de Documento'", can you use permalinks (with 8-character shortened hash) for the GitHub URLs?

@svillegas-cdd svillegas-cdd force-pushed the feature/add-sii-dte-referencia branch from 9d3d85d to 4b8ac01 Compare April 4, 2023 21:57
ycouce-cdd and others added 4 commits April 4, 2023 17:59
- Add the main enumerative for "Tipos de Documentos", sourced from
  the SII official documentation and XML schema for DTE.

Source:
    - from official document "FORMATO DOCUMENTOS TRIBUTARIOS ELECTRÓNICOS (2019-11-15)" (retrieved on 2020-01-30)
    (https://github.com/cl-sii-extraoficial/archivos-oficiales/blob/99b15aff/src/docs/dte/formato-dtes/2019-11-15-formato-dtes-v2.2.y.pdf)
    - from official schema ``SiiTypes_v10.xsd``, the XML type (enum) ``DocType``. (retrieved on 2021-03-25)
    (https://github.com/cl-sii-extraoficial/archivos-oficiales/blob/99b15aff/src/code/rtc/2019-12-12-schema_cesion/schema_cesion/SiiTypes_v10.xsd)

Ref: https://cordada.aha.io/features/COMPCLDATA-221
Ref: #217
- Add `DteXmlReferencia` class.
- Add constants.
- Add tests.

Ref: #217
Ref: https://cordada.aha.io/features/COMPCLDATA-221
- Add attribute "referencias" data model `DteXmlData`.
- Add parser for "referencias"
- Add tests

Ref: https://cordada.aha.io/features/COMPCLDATA-221
Ref: #217
* Refactored `DteXmlReferencia.__post_init__` validations to pyndantic validators
* Updated tests for pydantic validators

Ref: https://cordada.aha.io/features/COMPCLDATA-221
Ref: #217
@svillegas-cdd svillegas-cdd merged commit e76ead6 into develop Apr 4, 2023
19 checks passed
@svillegas-cdd svillegas-cdd deleted the feature/add-sii-dte-referencia branch April 4, 2023 22:14
@svillegas-cdd svillegas-cdd mentioned this pull request Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: dte enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dte: Create data model for "Referencia"
7 participants