pydantic-xml
pydantic-xml copied to clipboard
Support `xs:list` inline lists, take 2
This is a redo of PR #37
I have addressed all comments expect the larger one about HeterogeneousSerializerFactory
, I will create a separate PR for that
I think you branched off from master. Please rebase to dev because you PR brings commits from master branch.
Rebased on dev so things should be in order now.
(This is @ajoino, accidentally commented using my work account again...)
Nice to see that 0.6.0 was released, though I'm sad I couldn't get this finished in time. Going to rebase this branch with respect to the 0.6.0.
Regarding pre-commit:
I haven't used pre-commit in any projects before and I run into the following issue when running pre-commit install
:
An unexpected error has occurred: CalledProcessError: command: ('/home/jacob/.cache/pre-commit/repolmlbeusl/py_env-python3/bin/python',
'-mpip', 'install', '.')
return code: 1
stdout:
Processing /home/jacob/.cache/pre-commit/repolmlbeusl
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
stderr:
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
Traceback (most recent call last):
File "/home/jacob/.cache/pre-commit/repolmlbeusl/py_env-python3/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/
_in_process.py", line 351, in <module>
main()
File "/home/jacob/.cache/pre-commit/repolmlbeusl/py_env-python3/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/
_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/jacob/.cache/pre-commit/repolmlbeusl/py_env-python3/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/
_in_process.py", line 152, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/tmp/pip-build-env-b6bsl2th/overlay/lib/python3.10/site-packages/poetry/core/masonry/api.py", line 40, in prepare_met
adata_for_build_wheel
poetry = Factory().create_poetry(Path(".").resolve(), with_groups=False)
File "/tmp/pip-build-env-b6bsl2th/overlay/lib/python3.10/site-packages/poetry/core/factory.py", line 57, in create_poetry
raise RuntimeError("The Poetry configuration is invalid:\n" + message)
RuntimeError: The Poetry configuration is invalid:
- [extras.pipfile_deprecated_finder.2] 'pip-shims<=0.3.4' does not match '^[a-zA-Z-_.0-9]+$'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Something poetry-related given the logs but I don't use poetry for my own projects so it's hard to tell what's wrong.
(This is @ajoino, accidentally commented using my work account again...) ... Something poetry-related given the logs but I don't use poetry for my own projects so it's hard to tell what's wrong.
Hi. It is a bug in isort pre-commit hook. I fixed that here https://github.com/dapper91/pydantic-xml/commit/a24d8a234386f3e28b1308399fd87675eb476e34, so you could rebase to that commit or run pre-commit autoupdate
I've updated to be up-to-speed with latest dev, but I rebased instead of merging and that goofed the history.
Codecov Report
Merging #38 (09159f5) into dev (2754abd) will decrease coverage by
0.43%
. The diff coverage is83.72%
.
:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@ Coverage Diff @@
## dev #38 +/- ##
==========================================
- Coverage 93.70% 93.28% -0.43%
==========================================
Files 22 22
Lines 1033 1072 +39
==========================================
+ Hits 968 1000 +32
- Misses 65 72 +7
Flag | Coverage Δ | |
---|---|---|
unittests | 93.28% <83.72%> (-0.43%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
pydantic_xml/serializers/factories/homogeneous.py | 89.69% <83.72%> (-5.14%) |
:arrow_down: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
is this going to be merged? support for xs:list is much needed
@saharwenrix Hi,
MRs to version 1 are no longer accepted, only critical bug fixes.
In version 2 xs:list
can be handled using custom xml serializers: https://pydantic-xml.readthedocs.io/en/latest/pages/misc.html#custom-xml-serialization