Skip to content

ENH expose compression and compression level to the user API#345

Merged
BenjaminBossan merged 3 commits intoskops-dev:mainfrom
adrinjalali:compresslevel
Apr 21, 2023
Merged

ENH expose compression and compression level to the user API#345
BenjaminBossan merged 3 commits intoskops-dev:mainfrom
adrinjalali:compresslevel

Conversation

@adrinjalali
Copy link
Copy Markdown
Member

Fixes #344

This exposes the compression and compresslevel from ZipFile to the user.

cc @koaning @skops-dev/maintainers

@koaning
Copy link
Copy Markdown

koaning commented Apr 19, 2023

Sweet! Let me know when this change is live. It feels like it's a change that I'd like to put in the calmcode video.

Copy link
Copy Markdown
Collaborator

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thx. I made some suggestions but none are must haves for me. Feel free to merge if you don't like them :)

Comment thread skops/io/tests/test_persist.py Outdated
Comment thread skops/io/tests/test_persist.py Outdated
Comment thread skops/io/_persist.py

compresslevel: int, default=None
The compression level to use. See :class:`zipfile.ZipFile` for more
information.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to make a recommendation (here or in the docs) about what settings to use? E.g. "if file size is no issue, use the defaults, as they are the fastest. Otherwise, use ".

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added something in the docs.

@BenjaminBossan BenjaminBossan merged commit 34d1935 into skops-dev:main Apr 21, 2023
@adrinjalali adrinjalali deleted the compresslevel branch April 21, 2023 16:10
@adrinjalali
Copy link
Copy Markdown
Member Author

@koaning this is now released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically zipping/pruning .skops files.

3 participants