Skip to content

Commit

Permalink
Fixed xsdata 24 compatibillity (#73)
Browse files Browse the repository at this point in the history
* Updated schema

* Updated xsdata requirements

* Updated conda

* Updated xsdata dependency

* Update build.sh

* Update build.sh

* Update meta.yaml

* Update meta.yaml

* Update build.sh

* Update build.sh

* Update meta.yaml

* Update build.sh

* Update meta.yaml

* Update setup.py
  • Loading branch information
dchansen authored Apr 16, 2024
1 parent 41deff1 commit 25e98e5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
21 changes: 13 additions & 8 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,28 @@ source:
requirements:
build:
- python {{ python }}
- numpy>=1.22.0
- h5py>=2.3
- nose>=1.0
- docformatter<=1.4
- xsdata>=22.2

- xsdata >=24.0
- setuptools
- wheel
- jinja2 >=2.11.0
- pip
run:
- python
- xsdata>=22.2
- numpy>=1.22.0
- h5py>=2.3
- xsdata>=22.2
- xsdata>=24.0

test:
imports:
- ismrmrd
source_files:
- tests
commands:
- pip check
- nosetests
requires:
- pip
- nose

about:
Expand Down
5 changes: 3 additions & 2 deletions ismrmrd/xsd/pyxb_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from xsdata.formats.dataclass.parsers import XmlParser
from xsdata.formats.dataclass.parsers.config import ParserConfig
from xsdata.formats.dataclass.context import XmlContext

from xsdata.formats.dataclass.serializers import XmlSerializer
from xsdata.formats.dataclass.serializers.config import SerializerConfig
Expand All @@ -15,8 +16,8 @@ def CreateFromDocument(document):


def ToXML(header: ismrmrdHeader , encoding='ascii'):
config = SerializerConfig(encoding=encoding,pretty_print=True)
serializer = XmlSerializer(config)
config = SerializerConfig(encoding=encoding,indent=' ')
serializer = XmlSerializer(config=config,context=XmlContext())
return serializer.render(header,ns_map={"":"http://www.ismrm.org/ISMRMRD"})

def ToDOM(header: ismrmrdHeader):
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ nose==1.3.7
numpy==1.22.0
PyXB==1.2.6
six==1.12.0
xsdata==22.2
xsdata==24.4
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def to_uri(filename):

setup(
name='ismrmrd',
version='1.14.0',
version='1.14.1',
author='ISMRMRD Developers',
description='Python implementation of the ISMRMRD',
license='Public Domain',
Expand Down

0 comments on commit 25e98e5

Please sign in to comment.