Skip to content

Commit

Permalink
Releasing v20.5
Browse files Browse the repository at this point in the history
  • Loading branch information
tefra committed May 2, 2020
1 parent 34552b3 commit 7afe278
Show file tree
Hide file tree
Showing 11 changed files with 226 additions and 132 deletions.
11 changes: 11 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
20.5 (2020-05-02)
-------------------
- Updated codegen cli to accept multiple definitions or directories as argument.
- Update ClassBuilder to recursively search for anonymous types.
- Updated XmlParser to be thread-safe.
- Added performance tweaks on XmlParser.
- Added parser config to fail or not on unknown properties.
- Fixed primitive types being marked as forward references.
- Fixed nested restrictions on xs:simpleType.
- Fixed ClassAnalyzer to recover/ignore missing types.

20.4.2 (2020-04-21)
-------------------
- Added support for abstract xsi:types in XmlParser.
Expand Down
22 changes: 11 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ Features

-------

.. image:: https://github.com/tefra/xsdata/raw/master/docs/_static/demo.gif
.. image:: https://github.com/tefra/xsdata/raw/master/docs/_static/demo.svg

Check the documentation `test suites <https://xsdata.readthedocs.io/>`_ or our `W3C XML Schema 1.1 <https://github.com/tefra/xsdata-w3c-tests>`_ test runner and the `samples repo <https://github.com/tefra/xsdata-samples>`_ for more ✨✨✨


Changelog: 20.4.2
-----------------
- Added support for abstract xsi:types in XmlParser.
- Added cache for event names in XmlParser.
- Added sanitization for generated module names.
- Fixed not flattening abstract extension.
- Fixed extension name conflicts between simple and complex types.
- Fixed possible memory leak in CodeWriter.
- Fixed looping variables twice to find next node in XmlParser.
- Fixed CodeWriter adding unnecessary new lines.
Changelog: 20.5 (2020-05-02)
----------------------------
- Updated codegen cli to accept multiple definitions or directories as argument.
- Update ClassBuilder to recursively search for anonymous types.
- Updated XmlParser to be thread-safe.
- Added performance tweaks on XmlParser.
- Added parser config to fail or not on unknown properties.
- Fixed primitive types being marked as forward references.
- Fixed nested restrictions on xs:simpleType.
- Fixed ClassAnalyzer to recover/ignore missing types.
Binary file removed docs/_static/demo.gif
Binary file not shown.
177 changes: 177 additions & 0 deletions docs/_static/demo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/codegen.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ You can pass a list of definitions or a directory which includes the xml schemas
want to process.


.. code-block:: console
$ xsdata amadeus/schemas --package amadeus.models
$ xsdata air_v48_0/AirReqRsp.xsd rail_v48_0/RailReqRsp.xsd --package travelport.models
.. warning::

The generator works only with local files, if the given schema includes other
Expand Down
15 changes: 13 additions & 2 deletions docs/dataclasses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,18 +228,29 @@ data.
The parser internally depends on lxml's iterparse event stream to bind the raw input
data to dataclasses and primitive types.

The parser also accepts optionally a custom config instance.

.. code-block:: python
>>> from xsdata.formats.dataclass.parsers import XmlParser
>>> from xsdata.formats.dataclass.parsers.config import ParserConfig
>>> parser = XmlParser()
>>> config = ParserConfig(fail_on_unknown_properties=True)
>>> parser = XmlParser(config=config)
>>> order = parser.from_path("docs/examples/primer.xml", PurchaseOrder)
>>> order.bill_to
Usaddress(name='Robert Smith', street='8 Oak Avenue', city='Old Town', state='PA', zip=95819.0, country='US')
:class:`~xsdata.formats.dataclass.parsers.config.ParserConfig`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. csv-table::
:header: "Name", "Type", "Description"
:widths: 20, 10, 200

"fail_on_unknown_properties", "bool", "Should fail on unknown properties that can't be mapped to any wildcard field, default: ``True``"

The :class:`~xsdata.formats.dataclass.serializers.XmlSerializer`

.. code-block:: python
Expand Down
106 changes: 0 additions & 106 deletions docs/demo/config.yml

This file was deleted.

7 changes: 3 additions & 4 deletions docs/demo/demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ pe "clear"

cd ../xsdata-samples

pe "xsdata xsd/sabre/BargainFinderMaxRQ_v1-9-7.xsd --package demo.sabre"
pe "ls -la demo/sabre"
pe "bat demo/sabre/bargain_finder_max_common_types_v1_9_7.py"
pe "xsdata sabre/schemas --package sabre.models"
pe "ls -la sabre/models"
pe "bat sabre/models/bargain_finder_max_common_types_v1_9_7.py"

cd ../xsdata

echo -e "\e[35m# See help for more, bye bye :)"
sleep 2
# terminalizer render -o demo.gif demo
2 changes: 1 addition & 1 deletion docs/demos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The suite is quite extensible and consist of more than 26k tests cases for both
Report
------

**55** failed, **14517** passed, **103** skipped @ `travis-ci <https://travis-ci.com/tefra/xsdata-w3c-tests>`_
**46** failed, **14520** passed, **110** skipped @ `travis-ci <https://travis-ci.com/tefra/xsdata-w3c-tests>`_

✨✨✨✨

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = xsdata
version = 20.4.2
version = 20.5
description = Python XML Binding
long_description = file: README.rst
long_description_content_type = text/x-rst
Expand Down
9 changes: 2 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ commands =
sphinx-build -b html . _build

[testenv:demo]
whitelist_externals =
rm
terminalizer
commands =
terminalizer record demo -c docs/demo/config.yml
terminalizer render -o docs/_static/demo.gif demo.yml
rm demo.yml
deps = termtosvg
commands = termtosvg -t window_frame -g 95x15 docs/_static/demo.svg -c docs/demo/demo.sh

[testenv:build]
basepython = python3.7
Expand Down

0 comments on commit 7afe278

Please sign in to comment.