Skip to content

Commit

Permalink
Merge branch 'feature/ades-validation-report'
Browse files Browse the repository at this point in the history
Experimental AdES validation report implementation.

Requires dependency on xsdata for XML schema binding support
(and therefore also Python 3.8+).
  • Loading branch information
MatthiasValvekens committed Nov 18, 2023
2 parents 30d272c + 00837cb commit 4639d18
Show file tree
Hide file tree
Showing 27 changed files with 8,886 additions and 67 deletions.
37 changes: 37 additions & 0 deletions external-schemata/.xsdata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<Config xmlns="http://pypi.org/project/xsdata" version="23.8">
<Output maxLineLength="79" subscriptableTypes="false" unionType="false">
<Package>generated</Package>
<Format repr="true" eq="true" order="false" unsafeHash="false" frozen="true" slots="false" kwOnly="false">dataclasses</Format>
<Structure>filenames</Structure>
<!-- not public API; the applicable standards is the documentation, so no docstrings to reduce noise -->
<DocstringStyle>Blank</DocstringStyle>
<FilterStrategy>allGlobals</FilterStrategy>
<RelativeImports>true</RelativeImports>
<CompoundFields defaultName="choice" forceDefaultName="false">false</CompoundFields>
<PostponedAnnotations>false</PostponedAnnotations>
<UnnestClasses>false</UnnestClasses>
<IgnorePatterns>false</IgnorePatterns>
<IncludeHeader>false</IncludeHeader>
</Output>
<Conventions>
<ClassName case="mixedPascalCase" safePrefix="type"/>
<FieldName case="snakeCase" safePrefix="value"/>
<ConstantName case="screamingSnakeCase" safePrefix="value"/>
<ModuleName case="snakeCase" safePrefix="mod"/>
<PackageName case="snakeCase" safePrefix="pkg"/>
</Conventions>
<Substitutions>
<Substitution type="package" search="http://www.w3.org/2001/XMLSchema" replace="xs"/>
<Substitution type="package" search="http://www.w3.org/XML/1998/namespace" replace="xml"/>
<Substitution type="package" search="http://www.w3.org/2001/XMLSchema-instance" replace="xsi"/>
<Substitution type="package" search="http://www.w3.org/1998/Math/MathML" replace="mathml3"/>
<Substitution type="package" search="http://www.w3.org/1999/xlink" replace="xlink"/>
<Substitution type="package" search="http://www.w3.org/1999/xhtml" replace="xhtml"/>
<Substitution type="package" search="http://schemas.xmlsoap.org/wsdl/soap/" replace="soap"/>
<Substitution type="package" search="http://schemas.xmlsoap.org/wsdl/soap12/" replace="soap12"/>
<Substitution type="package" search="http://schemas.xmlsoap.org/soap/envelope/" replace="soapenv"/>
<Substitution type="class" search="(.*)Class$" replace="\1Type"/>
</Substitutions>
<Extensions/>
</Config>
10 changes: 10 additions & 0 deletions external-schemata/CODEGEN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Code generation from XSD data files is handled by `xsdata`.
The version of `xsdata` used to generate these files should be kept in
sync with the version in `pyproject.toml` to ensure compatibility,
and to keep the cumulative maintenance burden for `xsdata` upgrades low.

Generated APIs are not part of pyHanko's public API for the purposes
of semver, and hence care should be exercised not to expose generated
types in public API signatures.

Always generate code by running `genxml.sh` from the project's root directory.
9 changes: 9 additions & 0 deletions external-schemata/genxml.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
xsdata generate \
--config ./external-schemata/.xsdata.xml \
-p pyhanko.generated \
--recursive \
./external-schemata/xsd/

isort --profile black --line-length 80 pyhanko/generated
black -S --line-length 80 pyhanko/generated
624 changes: 624 additions & 0 deletions external-schemata/xsd/etsi/ts_11910202.xsd

Large diffs are not rendered by default.

457 changes: 457 additions & 0 deletions external-schemata/xsd/etsi/ts_119612.xsd

Large diffs are not rendered by default.

Loading

0 comments on commit 4639d18

Please sign in to comment.