From baf08f29b9f31e56b54b7053d08b0a642a87bed9 Mon Sep 17 00:00:00 2001 From: "David C. Hansen" Date: Thu, 23 Mar 2023 09:53:04 +0100 Subject: [PATCH 1/6] Updated schema --- schema/ismrmrd.xsd | 82 ++++++++++++++++++++++++++++++++-------------- setup.py | 2 +- 2 files changed, 59 insertions(+), 25 deletions(-) diff --git a/schema/ismrmrd.xsd b/schema/ismrmrd.xsd index d07adbe..78bf187 100644 --- a/schema/ismrmrd.xsd +++ b/schema/ismrmrd.xsd @@ -22,7 +22,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -123,7 +123,6 @@ - @@ -134,13 +133,6 @@ - - - - - - - @@ -174,14 +166,6 @@ - - - - - - - - @@ -221,6 +205,7 @@ + @@ -233,22 +218,44 @@ - + + + - + + + + + + + + + + + + + + + + + + + + + - - - + + + @@ -295,6 +302,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -327,6 +360,7 @@ + @@ -349,4 +383,4 @@ - + \ No newline at end of file diff --git a/setup.py b/setup.py index 47324e4..6e4a1c8 100644 --- a/setup.py +++ b/setup.py @@ -58,7 +58,7 @@ def to_uri(filename): setup( name='ismrmrd', - version='1.13.1', + version='1.14.0', author='ISMRMRD Developers', description='Python implementation of the ISMRMRD', license='Public Domain', From 8829b403f4f1adabf14ca99aea911f23d0d753b6 Mon Sep 17 00:00:00 2001 From: "David C. Hansen" Date: Mon, 27 Mar 2023 19:44:31 +0200 Subject: [PATCH 2/6] Updated xsdata requirements --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 6e4a1c8..a104ca6 100644 --- a/setup.py +++ b/setup.py @@ -74,8 +74,8 @@ def to_uri(filename): 'Operating System :: OS Independent', 'Topic :: Scientific/Engineering :: Medical Science Apps.' ], - install_requires=['xsdata>=22.2', 'numpy>=1.22.0', 'h5py>=2.3'], - setup_requires=['nose>=1.0', 'xsdata[cli]>=22.2', 'jinja2 >= 2.11'], + install_requires=['xsdata>=22.12', 'numpy>=1.22.0', 'h5py>=2.3'], + setup_requires=['nose>=1.0', 'xsdata[cli]>=22.12', 'jinja2 >= 2.11'], test_suite='nose.collector', cmdclass={'build_py':my_build_py} ) From fb0124007982a9740adb9667477e314e5883fcae Mon Sep 17 00:00:00 2001 From: "David C. Hansen" Date: Mon, 27 Mar 2023 19:58:49 +0200 Subject: [PATCH 3/6] Updated conda --- conda/build.sh | 2 +- conda/meta.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conda/build.sh b/conda/build.sh index 16796e3..b190fdf 100755 --- a/conda/build.sh +++ b/conda/build.sh @@ -1,5 +1,5 @@ #!/bin/bash set -euo pipefail - +pip install xsdata[cli] pip install . diff --git a/conda/meta.yaml b/conda/meta.yaml index f16e82b..1151e6e 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -13,13 +13,13 @@ requirements: - numpy>=1.22.0 - h5py>=2.3 - nose>=1.0 - - xsdata>=22.2 run: - python - xsdata>=22.2 - numpy>=1.22.0 - h5py>=2.3 + - xsdata >= 22.2 test: source_files: From 0408a5ad3176e42e892b4a1b82755aacb0a85e36 Mon Sep 17 00:00:00 2001 From: "David C. Hansen" Date: Sun, 7 Apr 2024 15:41:15 +0200 Subject: [PATCH 4/6] Updated xsdata dependency --- conda/meta.yaml | 3 +-- ismrmrd/xsd/pyxb_compat.py | 5 +++-- requirements.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index 7539868..2a1016b 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -18,10 +18,9 @@ requirements: run: - python - - xsdata>=22.2 - numpy>=1.22.0 - h5py>=2.3 - - xsdata >= 22.2 + - xsdata>=22.2 test: source_files: diff --git a/ismrmrd/xsd/pyxb_compat.py b/ismrmrd/xsd/pyxb_compat.py index c1bb69b..5310edc 100644 --- a/ismrmrd/xsd/pyxb_compat.py +++ b/ismrmrd/xsd/pyxb_compat.py @@ -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 @@ -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): diff --git a/requirements.txt b/requirements.txt index 956e28d..311eac9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,4 @@ nose==1.3.7 numpy==1.22.0 PyXB==1.2.6 six==1.12.0 -xsdata==22.2 \ No newline at end of file +xsdata==24.4 \ No newline at end of file From 3ac079f0377c7f466d7faac9fbcc9e4c169cf8f1 Mon Sep 17 00:00:00 2001 From: "David C. Hansen" Date: Wed, 24 Apr 2024 12:10:38 +0200 Subject: [PATCH 5/6] Fixed python publishing --- .github/workflows/python-publish.yml | 31 +++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index d132d05..30cf746 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: jobs: - build-n-publish: + build: name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI runs-on: ubuntu-20.04 steps: @@ -30,8 +30,29 @@ jobs: --wheel --outdir dist/ . - - name: Publish distribution 📦 to PyPI - #if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master + - name: Store the distribution packages + uses: actions/upload-artifact@v3 with: - password: ${{ secrets.PYPI_API_TOKEN }} + name: python-package-distributions + path: dist/ + + publish-to-pypi: + name: >- + Publish Python 🐍 distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/ismrmrmd + permissions: + id-token: ${{ secrets.PYPI_API_TOKEN }} + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file From c7dcdf330d7b88a102c18452626d746602f761a3 Mon Sep 17 00:00:00 2001 From: "David C. Hansen" Date: Wed, 24 Apr 2024 12:42:13 +0200 Subject: [PATCH 6/6] Removed conda changes --- conda/build.sh | 1 - conda/meta.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/conda/build.sh b/conda/build.sh index b190fdf..51ac1bd 100755 --- a/conda/build.sh +++ b/conda/build.sh @@ -1,5 +1,4 @@ #!/bin/bash set -euo pipefail -pip install xsdata[cli] pip install . diff --git a/conda/meta.yaml b/conda/meta.yaml index a376c87..e33d45b 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -42,4 +42,4 @@ about: Python interface and utilities for the ISMRM Raw Data (ISMRMRD a.k.a. MRD) format. dev_url: https://github.com/ismrmrd/ismrmrd-python doc_url: https://github.com/ismrmrd/ismrmrd-python - doc_source_url: https://github.com/ismrmrd/ismrmrd-python/blob/main/README.md \ No newline at end of file + doc_source_url: https://github.com/ismrmrd/ismrmrd-python/blob/main/README.md