Skip to content

Conversation

@glarrain
Copy link
Contributor

@glarrain glarrain commented Apr 5, 2019

glarrain added 19 commits April 4, 2019 21:26
For code related to "contribuyente" (tax payer).

Just constants for the moment.
For code related to "dte" (Documento Tributario Electrónico).

Just an enum and constants for the moment.
Utils for dealing with timezone-aware datetime objects.

Test have not been implemented.
Custom marshmallow field `CustomMarshmallowDateField`.

Test have not been implemented.
Useful for dealing with SII RCV ("Registro de Compras y Ventas").
Its main feature is the function `process_rcv_csv_file`.

Test have not been implemented.
"lxml is a Pythonic, mature binding for the libxml2 and libxslt
libraries. It provides safe and convenient access to these libraries
using the ElementTree API."

https://lxml.de/
https://github.com/lxml/lxml
"XML bomb protection for Python stdlib modules".

https://github.com/tiran/defusedxml
Add helper functions (plus some related exception classes).

- `parse_untrusted_xml`: handles the numerous issues and concerns
  related to parsing untrusted XML data.
- `read_xml_schema`: instantiate an XML schema object from a file.
- `validate_xml_doc`: validate an XML document against an XML schema.

Sources of files in 'test_data/xml/attacks':
- https://en.wikipedia.org/wiki/Billion_laughs_attack#Code_example
- https://pypi.org/project/defusedxml/#billion-laughs-exponential-entity-expansion
- https://pypi.org/project/defusedxml/#external-entity-expansion-remote
- https://pypi.org/project/defusedxml/#quadratic-blowup-entity-expansion

Some tests have not been implemented.
Include the following 'dataclasses' (and some related validators):
- `DteNaturalKey`
- `DteDataL0`
- `DteDataL1`
- `DteDataL2`

Tests have not been implemented.
Code for parsing DTE data from representation as XML document
(support for other representations may be added later on).

Main function is `parse_dte_xml`, and the helpers are `clean_dte_xml`
and `validate_dte_xml`.

Tests have not been implemented.
@glarrain glarrain self-assigned this Apr 5, 2019
@glarrain glarrain merged commit 0d7630d into master Apr 5, 2019
@glarrain glarrain added the kind: release Release label May 8, 2019
@glarrain glarrain changed the title Release Release v0.3.0 May 8, 2019
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