Skip to content

Commit 25e98e5

Browse files
authored
Fixed xsdata 24 compatibillity (#73)
* 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
1 parent 41deff1 commit 25e98e5

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

conda/meta.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,28 @@ source:
1010
requirements:
1111
build:
1212
- python {{ python }}
13-
- numpy>=1.22.0
14-
- h5py>=2.3
15-
- nose>=1.0
16-
- docformatter<=1.4
17-
- xsdata>=22.2
18-
13+
- xsdata >=24.0
14+
- setuptools
15+
- wheel
16+
- jinja2 >=2.11.0
17+
- pip
18+
1919
run:
2020
- python
21-
- xsdata>=22.2
2221
- numpy>=1.22.0
2322
- h5py>=2.3
24-
- xsdata>=22.2
23+
- xsdata>=24.0
2524

2625
test:
26+
imports:
27+
- ismrmrd
2728
source_files:
2829
- tests
30+
commands:
31+
- pip check
32+
- nosetests
2933
requires:
34+
- pip
3035
- nose
3136

3237
about:

ismrmrd/xsd/pyxb_compat.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from xsdata.formats.dataclass.parsers import XmlParser
44
from xsdata.formats.dataclass.parsers.config import ParserConfig
5+
from xsdata.formats.dataclass.context import XmlContext
56

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

1617

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

2223
def ToDOM(header: ismrmrdHeader):

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ nose==1.3.7
33
numpy==1.22.0
44
PyXB==1.2.6
55
six==1.12.0
6-
xsdata==22.2
6+
xsdata==24.4

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def to_uri(filename):
5858

5959
setup(
6060
name='ismrmrd',
61-
version='1.14.0',
61+
version='1.14.1',
6262
author='ISMRMRD Developers',
6363
description='Python implementation of the ISMRMRD',
6464
license='Public Domain',

0 commit comments

Comments
 (0)