Commit Graph

89 Commits

Author SHA1 Message Date
Davide Brunato db45230fd6 Merge setup.py from PR #143 and update release information 2019-11-18 09:48:06 +01:00
John Vandenberg 4b7b16a750 setup.py: Add setup-requires 2019-11-14 23:01:40 +07:00
Davide Brunato 8407f09139 Add LOCATION_HINTS dict to namespaces module
- Use LOCATION_HINTS for schema's fallback locations
2019-10-16 06:45:53 +02:00
Davide Brunato 844ddec3ba Fix assertions
- Add custom parser for assertion facet (without position() and last()).
  - Move parser initialization to XsdAssert.parse_xpath_test() because
    all the components must be defined.
2019-10-01 06:44:31 +02:00
Davide Brunato df939b9cea Fix xs:alternative and xs:keyref referefence building 2019-08-28 15:56:31 +02:00
Davide Brunato 52d1e1bb8e Close XSD 1.1 development
- Still some W3C and local tests to be fixed
  - Fix min/max facets derivation (decode with primitive type)
2019-08-05 17:57:34 +02:00
Davide Brunato 6994da5173 Code refactoring for tests
- Rename XMLSchemaTestCase to XsdValidatorTestCase
  - Add casepath() helper
  - Modify TestResources: derive from TestCase and use casepath()
  - Split test_package.py into 3 modules (added test_etree.py and
    test_memory.py)
  - Update .tox with new environments 'package' and 'memory'
  - Replace test_package with test_etree into test_all.py script
  - Modify XsdValidatorTestCase.check_schema() to use xs prefix for
    XSD namespace and no namespace as targetNamespace for a fast
    reuse of common and user sample cases
2019-06-20 15:35:04 +02:00
Davide Brunato 75e547abe5 Start development of release v1.0.13 2019-06-19 17:05:41 +02:00
Davide Brunato 674f14c3ff Update docs and CHANGELOG.rst 2019-06-19 10:35:13 +02:00
Davide Brunato 3d5c7ee110 Start next release development
- Update release to v1.0.12
  - Add XsdDefaultOpenContent subclass
  - Fix openContent parsing in complex types
2019-05-09 11:04:50 +02:00
Davide Brunato 3f470927b8 Code cleaning and package dependencies update 2019-05-05 15:13:40 +02:00
Davide Brunato 1c1dc6b60f Increase release and update documentation 2019-04-08 07:29:09 +02:00
Davide Brunato 9aaa9f1244 Add post install/develop command for create Unicode categories JSON
- Adding a test for JSON file of Unicode categories
  - Added and renamed test cases for includes and imports
2019-03-13 06:53:10 +01:00
Davide Brunato 4dc7714a18 Update documentation and requirements 2019-02-25 14:44:28 +01:00
Davide Brunato ccfaab9479 Fix XML resource defusing
- Add XMLResource.defusing() for checking XML data
  - Now in XMLResource.parse() and fromsource() the SafeXMLParser is
    used only for defusing data
2019-02-25 13:34:52 +01:00
Davide Brunato 9cc61e8788 Rewrite assertions implementation 2019-02-22 22:50:05 +01:00
Davide Brunato 13a5f5371c Parse of XSD 1.1 targetNamespace of elements and attributes
- Added XsdComponent._parse_target_namespace()
2019-02-07 23:10:31 +01:00
Davide Brunato 5f10fe67a7 Code cleaning of test scripts
- Removed old code of xmlschema imports
  - Test header enriched with Python version and platform
2019-01-31 22:09:18 +01:00
Davide Brunato 2eabc190fe Replace defusedxml dependency
- The defusedxml seems to be unmaintained and has some problems
    with the ElementTree loading
  - Replaced by a safe XMLParser that forbids entities processing
2019-01-22 17:50:13 +01:00
Davide Brunato b08139ea67 Update requirements and spilt XSD 1.0 and 1.1 built-in types
- requires elementpath >= 1.1.1
   - eg. XSD 1.0 dates use Date10 that not allows year 0000
2019-01-20 18:14:06 +01:00
Davide Brunato 9d6b88baae Change copyright years info 2019-01-20 16:56:10 +01:00
Davide Brunato ca47623dba Update MANIFEST.in template and tests
- Now MANIFEST.in includes package data inclusions
    and exclusions
  - Clean test subpackage
  - Test factory moved to a separated module
  - Add a factory argument for checking with lxml
  - SchemaObserver moved to a separated module
  - Test factory now can creates tests for XMLSchema11 class
2018-12-27 19:20:04 +01:00
Davide Brunato 310052c5f6 Merge PR #92 and #98 into develop 2018-12-24 23:32:40 +01:00
Davide Brunato 33a734d84e Switch to v1.0.8 release development
- Dependency updated to elementpath >= 1.1.0
2018-12-23 16:29:04 +01:00
jhermann 778f157547 PEP8 2018-11-28 15:17:45 +01:00
jhermann 25466425d3 setup: simplify package / package_data spec (closes #91) 2018-11-28 15:13:51 +01:00
jhermann d92fe0be1d make setup.py executable 2018-11-28 15:13:04 +01:00
Davide Brunato c0e2bbdec5 Add assertion facet
- Added XsdAssertionsFacet: based on MutableSequence like XsdPatternsFacet
  - Fixed a typo in XsdPatternsFacet.__setitem__
  - Started development of release v1.0.7
2018-10-23 11:24:38 +02:00
Davide Brunato 35685c5964 Start development of release v1.0.6
- Added test slots for parse helper functions
2018-09-28 19:09:10 +02:00
Davide Brunato 717d467bc5 Start release v1.0.5 and fix for issue #82 2018-09-25 17:52:44 +02:00
Davide Brunato fe3078a3c7 Implement a new iter_decode method based on XsdModelVisitor 2018-09-08 11:19:51 +02:00
Davide Brunato 07d6071db1 Remove intermediate class XsdDeclaration
- Restore old XSD class structure for emerged problems with Py34
    serialization of TEI schema
  - Started the development of release 1.0.3
2018-07-26 23:31:59 +02:00
Davide Brunato 5c1214e950 Improving the iteration of schema elements and groups 2018-07-25 15:57:17 +02:00
Davide Brunato e967aa6db8 Use pathlib for checking resource URLs 2018-07-18 11:30:13 +02:00
Davide Brunato 0af5307e6c Fix path normalization for Windows platform 2018-07-14 15:52:03 +02:00
Davide Brunato 7d006d670d Update changelog with release dates and code cleaning 2018-06-27 16:29:59 +02:00
Davide Brunato fb24068ebe Fix schema serialization and update version
- Modified CHANGELOG.rst
  - Lookup functions rewritten and bound to global names for serialization
  - Dependancy: elementpath minimal version now is 1.0.10
2018-06-15 18:39:52 +02:00
Davide Brunato a3ca8bba9d Switch to new release 0.9.30
- Fix for issue #66
  - Schema tests cleaning (moving some tests to test_schemas.py script)
  - Removing some old test files
2018-06-06 14:11:39 +02:00
Davide Brunato b047bc7301 Removing Python 3.3 support from documentation 2018-06-04 09:58:10 +02:00
Davide Brunato 9429759f98 Modify tests and test scripts
- cases/features/decoding/ renamed to cases/features/decoder/
  - decoder/decoder.xsd renamed to decoder/simple-types.xsd
  - Use namespace xmlns:xst="http://xmlschema.test/test/" for all
    cases/features tests
  - Added XMLSchemaTestCase base class for tests/ subpackage
  - Wrote a get_testfiles() functions for tests/ subpackage in order
    to reduce redundant code in other test scripts
  - Added tests for encoding of simpleType's lists
2018-05-20 07:38:15 +02:00
Davide Brunato abeb239dce Documentation update: link README.rst introduction to Sphinx docs 2018-05-09 15:53:24 +02:00
Davide Brunato 22808a61dc Add test_encoding.py module and fix test_package.py
- Fix test for version that didn't match package_dir
2018-05-09 07:04:26 +02:00
Davide Brunato 8ae0eb3529 Add a test for issue #59 and Python 3.7 classifier to setup.py 2018-05-03 06:38:42 +02:00
Davide Brunato 91514a8cce Add defusedxml to package requirements
Defuse XML data:
  - Added 'defuse' argument to XMLSchema class
  - Remote XML data is defused for default
  - Optionally one can disable defusing or force also
    for local XML data
2018-05-02 14:48:58 +02:00
Davide Brunato a3c6a66a62 Fix bug #58 and start integrating defusedxml library
Bug #58:
  - Added a file for test circular model detection

Integrating defusedxml:
  - defusedxml.ElementTree API loaded in etree.py
  - safe load with defusedxml only for network resources
2018-04-26 13:08:56 +02:00
Davide Brunato e9dcdb3f1e Implement model restriction checks
Added methods:

  - ParticleMixin.is_restriction()
  - XsdGroup.is_restriction()
  - XsdGroup.iter_group()
  - XsdElement.is_restriction()
2018-04-10 11:10:48 +02:00
Davide Brunato c0a66696be Switch to release 0.9.25
- Fixed doctest error (relative wrong XPath path)
  - Added test for issue #56
  - Version updated
2018-04-05 14:02:04 +02:00
Davide Brunato fa796d2dcf Complete xpath module substitution, improve testing
- With elementpath-1.0.4 pass all tests
  - Check version alignment with test_package.py
2018-03-27 19:47:56 +02:00
Davide Brunato 14c4fbb61d Add elementpath to package requirements
- Changed XPath selectors for XSD key/unique/keyref constraints
  - Removed old code from xpath.py (only a class and an helper function
    have left in)
2018-03-27 11:02:14 +02:00
Davide Brunato e4e56124a6 Fix arguments for converters
- Added kwargs to converters initialization
  - iter_decode() arguments 'dict_class' and 'list_class' now are
    included within keyword arguments
2018-03-10 00:24:16 +01:00