Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions fileformats/datascience/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .scripts import RFile, IPythonNotebook
from .object_serialization import (
Pickle,
Pickle__Gzip,
Pickle___Gzip,
)

__all__ = [
Expand All @@ -22,5 +22,5 @@
"RFile",
"IPythonNotebook",
"Pickle",
"Pickle__Gzip",
"Pickle___Gzip",
]
5 changes: 2 additions & 3 deletions fileformats/datascience/object_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from fileformats.application import Gzip


class ObjectSerialisation(BinaryFile):
...
class ObjectSerialisation(BinaryFile): ...


class Pickle(WithMagicNumber, ObjectSerialisation):
Expand All @@ -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"
Expand Down
8 changes: 8 additions & 0 deletions fileformats/datascience/tests/test_mime.py
Original file line number Diff line number Diff line change
@@ -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)
Loading