From 38373a63171bb8a9454cbf3d71642e5e6d52fa13 Mon Sep 17 00:00:00 2001 From: "Thomas G. Close" Date: Wed, 15 Oct 2025 11:38:30 +1100 Subject: [PATCH 1/5] Updates names of formats to match core package change in mime-type translations --- fileformats/datascience/__init__.py | 4 ++-- fileformats/datascience/object_serialization.py | 5 ++--- fileformats/datascience/tests/test_mime.py | 8 ++++++++ 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 fileformats/datascience/tests/test_mime.py diff --git a/fileformats/datascience/__init__.py b/fileformats/datascience/__init__.py index ee186e4..9bac654 100644 --- a/fileformats/datascience/__init__.py +++ b/fileformats/datascience/__init__.py @@ -9,7 +9,7 @@ from .scripts import RFile, IPythonNotebook from .object_serialization import ( Pickle, - Pickle__Gzip, + Pickle___Gzip, ) __all__ = [ @@ -22,5 +22,5 @@ "RFile", "IPythonNotebook", "Pickle", - "Pickle__Gzip", + "Pickle___Gzip", ] diff --git a/fileformats/datascience/object_serialization.py b/fileformats/datascience/object_serialization.py index 6a50764..31a742e 100644 --- a/fileformats/datascience/object_serialization.py +++ b/fileformats/datascience/object_serialization.py @@ -3,8 +3,7 @@ from fileformats.application import Gzip -class ObjectSerialisation(BinaryFile): - ... +class ObjectSerialisation(BinaryFile): ... class Pickle(WithMagicNumber, ObjectSerialisation): @@ -14,7 +13,7 @@ class Pickle(WithMagicNumber, ObjectSerialisation): magic_number = "8004" -class Pickle__Gzip(Gzip[Pickle]): # type: ignore[type-arg] +class Pickle___Gzip(Gzip[Pickle]): # type: ignore[type-arg] """Python pickle file that has been gzipped""" ext = "pkl.gz" diff --git a/fileformats/datascience/tests/test_mime.py b/fileformats/datascience/tests/test_mime.py new file mode 100644 index 0000000..29aa51d --- /dev/null +++ b/fileformats/datascience/tests/test_mime.py @@ -0,0 +1,8 @@ +from fileformats.core import from_mime +from fileformats.datascience import Pickle___Gzip + + +def test_native_container_roundtrip() -> None: + + mime = Pickle___Gzip.mime_like + assert Pickle___Gzip is from_mime(mime) From f094b0035efb282690306a6f7904d12de8fe11a9 Mon Sep 17 00:00:00 2001 From: "Thomas G. Close" Date: Wed, 15 Oct 2025 16:28:38 +1100 Subject: [PATCH 2/5] changed test matrix to be 3.11-3.13 --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 0c5c8c2..44c6ea2 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: os: [ubuntu-22.04] - python-version: ["3.8", "3.12"] + python-version: ["3.11", "3.13"] fail-fast: false runs-on: ${{ matrix.os }} defaults: From d607981a0e5bc4155febf8b12a843f0aba3a26d4 Mon Sep 17 00:00:00 2001 From: "Thomas G. Close" Date: Wed, 15 Oct 2025 16:48:05 +1100 Subject: [PATCH 3/5] updated ci-cd action version --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 44c6ea2..d78bf5f 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -83,7 +83,7 @@ jobs: run: python3 -m build ${{ matrix.pkg[1] }} - name: Check distributions run: twine check ${{ matrix.pkg[1] }}/dist/* - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: built-${{ matrix.pkg[0] }} path: ${{ matrix.pkg[1] }}/dist From 48642911643dd5e4827f6fb60294c571a4e68b36 Mon Sep 17 00:00:00 2001 From: "Thomas G. Close" Date: Wed, 15 Oct 2025 21:42:26 +1100 Subject: [PATCH 4/5] fixing outdated action version in ci --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index d78bf5f..77c0ce0 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -93,7 +93,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download build - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: built-main path: dist From d215545e4834f60d79d4c9ea3e0b082cbdbfd995 Mon Sep 17 00:00:00 2001 From: "Thomas G. Close" Date: Wed, 15 Oct 2025 21:42:42 +1100 Subject: [PATCH 5/5] fixup --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 77c0ce0..708d6f7 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -115,7 +115,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download build - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: built-extras path: dist