Skip to content

Commit dc92b71

Browse files
authored
Merge pull request #77 from pycompression/release_0.10.0
Release 0.10.0
2 parents 1a56307 + 3b32408 commit dc92b71

28 files changed

+1006
-428
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11

22
### Checklist
33
- [ ] Pull request details were added to CHANGELOG.rst
4+
- [ ] Documentation was updated (if needed)

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
matrix:
3131
tox_env:
3232
- docs
33-
- mypy
3433
- twine_check
3534
needs: lint
3635
runs-on: ubuntu-20.04
@@ -197,7 +196,9 @@ jobs:
197196
CIBW_TEST_REQUIRES: "pytest"
198197
# Simple test that requires the project to be build correctly
199198
CIBW_TEST_COMMAND: >-
200-
pytest {project}/tests/test_igzip.py {project}/tests/test_isal.py
199+
pytest {project}/tests/test_igzip.py
200+
{project}/tests/test_compat.py
201+
{project}/tests/test_igzip_lib.py
201202
- name: Build sdist
202203
if: "runner.os == 'Linux'"
203204
run: python setup.py sdist

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ Changelog
77
.. This document is user facing. Please word the changes in such a way
88
.. that users understand how the changes affect the new version.
99
10+
version 0.10.0
11+
------------------
12+
+ Added an ``igzip_lib`` module which allows more direct access to ISA-L's
13+
igzip_lib API. This allows features such as headerless compression and
14+
decompression, as well as setting the memory levels manually.
15+
+ Added more extensive documentation.
16+
1017
version 0.9.0
1118
-----------------
1219
+ Fix a bug where a AttributeError was triggered when zlib.Z_RLE or

README.rst

Lines changed: 74 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
python-isal
3535
===========
3636

37+
.. introduction start
38+
3739
Faster zlib and gzip compatible compression and decompression
3840
by providing Python bindings for the ISA-L library.
3941

@@ -43,22 +45,34 @@ Acceleration Library (ISA-L) implements several key algorithms in `assembly
4345
language <https://en.wikipedia.org/wiki/Assembly_language>`_. This includes
4446
a variety of functions to provide zlib/gzip-compatible compression.
4547

46-
``python-isal`` provides the bindings by offering an ``isal_zlib`` and
47-
``igzip`` module which are usable as drop-in replacements for the ``zlib``
48-
and ``gzip`` modules from the stdlib (with some minor exceptions, see below).
48+
``python-isal`` provides the bindings by offering three modules:
49+
50+
+ ``isal_zlib``: A drop-in replacement for the zlib module that uses ISA-L to
51+
accelerate its performance.
52+
+ ``igzip``: A drop-in replacement for the gzip module that uses ``isal_zlib``
53+
instead of ``zlib`` to perform its compression and checksum tasks, which
54+
improves performance.
55+
+ ``igzip_lib``: Provides compression functions which have full access to the
56+
API of ISA-L's compression functions.
57+
58+
``isal_zlib`` and ``igzip`` are almost fully compatible with ``zlib`` and
59+
``gzip`` from the Python standard library. There are some minor differences
60+
see: differences-with-zlib-and-gzip-modules_.
4961

50-
Usage
51-
-----
62+
.. introduction end
5263
53-
Python-isal has faster versions of the stdlib's ``zlib`` and ``gzip`` module
54-
these are called ``isal_zlib`` and ``igzip`` respectively.
64+
Quickstart
65+
----------
5566

56-
They can be imported as follows
67+
.. quickstart start
68+
69+
The python-isal modules can be imported as follows
5770

5871
.. code-block:: python
5972
6073
from isal import isal_zlib
6174
from isal import igzip
75+
from isal import igzip_lib
6276
6377
``isal_zlib`` and ``igzip`` are meant to be used as drop in replacements so
6478
their api and functions are the same as the stdlib's modules. Except where
@@ -68,65 +82,28 @@ A full API documentation can be found on `our readthedocs page
6882
<https://python-isal.readthedocs.io>`_.
6983

7084
``python -m isal.igzip`` implements a simple gzip-like command line
71-
application (just like ``python -m gzip``).
72-
73-
Installation
74-
------------
75-
Installation with pip
76-
.....................
77-
78-
::
79-
80-
pip install isal
81-
82-
Installation is supported on Linux, MacOS and Windows. On x86-64 (amd64)
83-
platforms wheels are provided, so installation should be almost instantaneous.
84-
The installation will include a staticallly linked version of ISA-L.
85-
If a wheel is not provided for your system the
86-
installation will build ISA-L first in a temporary directory. Please check the
87-
`ISA-L homepage <https://github.com/intel/isa-l>`_ for the build requirements.
88-
89-
The latest development version of python-isal can be installed with::
85+
application (just like ``python -m gzip``). Full usage documentation can be
86+
found on `our readthedocs page <https://python-isal.readthedocs.io>`_.
9087

91-
pip install git+https://github.com/rhpvorderman/python-isal.git
9288

93-
This requires having the build requirements installed.
94-
If you wish to link
95-
dynamically against a version of libisal installed on your system use::
89+
.. quickstart end
9690
97-
PYTHON_ISAL_LINK_DYNAMIC=true pip install isal --no-binary isal
98-
99-
ISA-L is available in numerous Linux distro's as well as on conda via the
100-
conda-forge channel. Checkout the `ports documentation
101-
<https://github.com/intel/isa-l/wiki/Ports--Repos>`_ on the ISA-L project wiki
102-
to find out how to install it. It is important that the development headers
103-
are also installed.
104-
105-
On Debian and Ubuntu the ISA-L libraries (including the development headers)
106-
can be installed with::
107-
108-
sudo apt install libisal-dev
109-
110-
Installation via conda
111-
..................................
112-
Python-isal can be installed via conda, for example using
113-
the `miniconda <https://docs.conda.io/en/latest/miniconda.html>`_ installer
114-
with a properly setup `conda-forge
115-
<https://conda-forge.org/docs/user/introduction.html#how-can-i-install-packages-from-conda-forge>`_
116-
channel. When used with bioinformatics tools setting up `bioconda
117-
<http://bioconda.github.io/user/install.html#install-conda>`_
118-
provides a clear set of installation instructions for conda.
119-
120-
python-isal is available on conda-forge and can be installed with::
91+
Installation
92+
------------
93+
- with pip: ``pip install isal``
94+
- with conda: ``conda install python-isal``
12195

122-
conda install python-isal
96+
Installation is supported on Linux, Windows and MacOS. For more advanced
97+
installation options check the `documentation
98+
<https://python-isal.readthedocs.io/en/stable/index.html#installation>`_.
12399

124-
This will automatically install the ISA-L library dependency as well, since
125-
it is available on conda-forge.
100+
.. _differences-with-zlib-and-gzip-modules:
126101

127102
Differences with zlib and gzip modules
128103
--------------------------------------
129104

105+
.. differences start
106+
130107
+ Compression level 0 in ``zlib`` and ``gzip`` means **no compression**, while
131108
in ``isal_zlib`` and ``igzip`` this is the **lowest compression level**.
132109
This is a design choice that was inherited from the ISA-L library.
@@ -151,8 +128,47 @@ Differences with zlib and gzip modules
151128
to reflect this. ``igzip.GzipFile`` does exist as an alias of
152129
``igzip.IGzipFile`` for compatibility reasons.
153130

131+
.. differences end
132+
154133
Contributing
155134
------------
135+
.. contributing start
136+
156137
Please make a PR or issue if you feel anything can be improved. Bug reports
157138
are also very welcome. Please report them on the `github issue tracker
158139
<https://github.com/rhpvorderman/python-isal/issues>`_.
140+
141+
.. contributing end
142+
143+
Acknowledgements
144+
----------------
145+
146+
.. acknowledgements start
147+
148+
This project builds upon the software and experience of many. Many thanks to:
149+
150+
+ The `ISA-L contributors
151+
<https://github.com/intel/isa-l/graphs/contributors>`_ for making ISA-L.
152+
+ The `Cython contributors
153+
<https://github.com/cython/cython/graphs/contributors>`_ for making it easy
154+
to create an extension and helping a novice get start with pointer addresses.
155+
+ The `CPython contributors
156+
<https://github.com/python/cpython/graphs/contributors>`_.
157+
Python-isal mimicks ``zlibmodule.c`` and ``gzip.py`` from the standard
158+
library to make it easier for python users to adopt it.
159+
+ `@marcelm <https://github.com/marcelm>`_ for taking a chance on this project
160+
and make it a dependency for his `xopen
161+
<https://github.com/pycompression/xopen>`_ and by extension `cutadapt
162+
<https://github.com/marcelm/cutadapt>`_ projects. This gave python-isal its
163+
first users who used python-isal in production.
164+
+ The `github actions team <https://github.com/orgs/actions/people>`_ for
165+
creating the actions CI service that enables building and testing on all
166+
three major operating systems.
167+
+ `@animalize <https://github.com/animalize>`_ for explaining how to test and
168+
build python-isal for ARM 64-bit platforms.
169+
+ And last but not least: everyone who submitted a bug report or a feature
170+
request. These make the project better!
171+
172+
Python-isal would not have been possible without you!
173+
174+
.. acknowledgements end

docs/conda-environment.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ dependencies:
66
- isa-l
77
- python >=3.6
88
- sphinx
9-
- setuptools
9+
- setuptools
10+
- pip:
11+
- sphinx-rtd-theme
12+
- sphinx-argparse

docs/conf.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,27 @@
3131
# Add any Sphinx extension module names here, as strings. They can be
3232
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3333
# ones.
34-
extensions = ["sphinx.ext.autodoc"
35-
]
34+
extensions = ["sphinx.ext.autodoc", 'sphinxarg.ext']
3635

3736
# Add any paths that contain templates here, relative to this directory.
3837
templates_path = ['_templates']
3938

4039
# List of patterns, relative to source directory, that match files and
4140
# directories to ignore when looking for source files.
4241
# This pattern also affects html_static_path and html_extra_path.
43-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
42+
# includes/* prevents double indexing
43+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'includes/*']
4444

4545

4646
# -- Options for HTML output -------------------------------------------------
4747

4848
# The theme to use for HTML and HTML Help pages. See the documentation for
4949
# a list of builtin themes.
5050
#
51-
html_theme = 'alabaster'
51+
html_theme = 'sphinx_rtd_theme'
52+
html_theme_options = dict(
53+
display_version=True,
54+
)
5255

5356
# Add any paths that contain custom static files (such as style sheets) here,
5457
# relative to this directory. They are copied after the builtin static files,

docs/igzip.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/includes/CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../CHANGELOG.rst

docs/includes/README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../README.rst

0 commit comments

Comments
 (0)