Skip to content

Release 0.1.0 #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 100 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
523430f
Add zlib-ng module
rhpvorderman Jan 23, 2023
efaa514
Working static build system
rhpvorderman Jan 23, 2023
ef56bd6
Include LICENSE and README for zlib-ng in all distributions
rhpvorderman Jan 23, 2023
85a33e7
Start on packaging
rhpvorderman Jan 23, 2023
c2078a4
Make C module a sub extension
rhpvorderman Jan 23, 2023
dd6d169
Add __init__.py to properly init package
rhpvorderman Jan 23, 2023
d93bcc0
Add zlib and gzip tests
rhpvorderman Jan 23, 2023
f78ae6c
Add functional gzip module
rhpvorderman Jan 23, 2023
5e3e249
Replace helper filenames with tempfile
rhpvorderman Jan 23, 2023
a639a79
Start porting zlibmodule.c
rhpvorderman Jan 23, 2023
4f0f4cf
adler32 and crc32 implementations
rhpvorderman Jan 23, 2023
cbad9a4
Make up to date with cpython
rhpvorderman Jan 25, 2023
e493a3f
Use zlibng fixed-width types
rhpvorderman Jan 25, 2023
90be18c
Properly prefix all zlib methods with zng
rhpvorderman Jan 25, 2023
78e02ee
Copy binding functions over from python-isal
rhpvorderman Jan 25, 2023
acd45b0
Remove state
rhpvorderman Jan 25, 2023
7b299c1
Fix lowercase issue
rhpvorderman Jan 25, 2023
e3a5ffa
ORder methods before class definitions
rhpvorderman Jan 25, 2023
17283c5
Fix copy definitions
rhpvorderman Jan 25, 2023
a6298c5
Fix a few small errors
rhpvorderman Jan 25, 2023
fe499eb
Remove most of the clinic code
rhpvorderman Jan 25, 2023
9e7a510
Python bindings for ZlibDecompressor.decompress
rhpvorderman Jan 25, 2023
d34c87c
Use static types
rhpvorderman Jan 25, 2023
1ff4c43
Create module initialization function
rhpvorderman Jan 25, 2023
95c629d
Fix compilation errors and warnings
rhpvorderman Jan 25, 2023
cdf5769
Always compile with -fPIC
rhpvorderman Jan 25, 2023
590d2dd
Add ZLIB_VERSION for compatibility
rhpvorderman Jan 25, 2023
d347be6
Fix adler32 bug
rhpvorderman Jan 25, 2023
dd2571a
Fix copy bug
rhpvorderman Jan 25, 2023
a47331e
make sure zlibdecompressortest works
rhpvorderman Jan 25, 2023
3a79221
Do not decref type
rhpvorderman Jan 26, 2023
1cf1979
Add forgotten goto error
rhpvorderman Jan 26, 2023
3f45943
Add big data and big text to ZlibDecompressorTest
rhpvorderman Jan 26, 2023
4e93158
Release buffer at the end of decompress function
rhpvorderman Jan 26, 2023
c8040fb
Add tox and benchmark scripts
rhpvorderman Jan 26, 2023
0ec59c6
Fix benchmark script
rhpvorderman Jan 26, 2023
7924b3d
Add a small test file
rhpvorderman Jan 26, 2023
260d92f
Make sure gzip compliance tests run
rhpvorderman Jan 27, 2023
fb20e28
Make all gzip tests compliant
rhpvorderman Jan 27, 2023
6b378e4
Fix incorrect default
rhpvorderman Jan 27, 2023
5ead716
Fix constructor test
rhpvorderman Jan 27, 2023
ec921d1
Make sure error has correct module name
rhpvorderman Jan 27, 2023
530f4b8
Shorten build process
rhpvorderman Jan 27, 2023
b01600e
Correctly check zlib_ng coverage
rhpvorderman Jan 27, 2023
0b5996e
Mark test_wbits as expected fail
rhpvorderman Jan 27, 2023
e9c453b
Merge pull request #2 from pycompression/init
rhpvorderman Jan 27, 2023
c508876
Add codecov settings
rhpvorderman Jan 27, 2023
ff1755f
Add pyproject.toml
rhpvorderman Jan 27, 2023
7213cf9
Add changelog
rhpvorderman Jan 27, 2023
f952491
Add PR template and release checklist
rhpvorderman Jan 27, 2023
3469ce8
Add github actions workflow
rhpvorderman Jan 27, 2023
cbb233f
Add extended gzip tests
rhpvorderman Jan 27, 2023
d5cce5e
Add compatibility tests
rhpvorderman Jan 27, 2023
5b318c5
Set version to 0.1.0-dev
rhpvorderman Jan 27, 2023
0d8d0df
Start on README
rhpvorderman Jan 27, 2023
c92c738
Remove missing support attribute
rhpvorderman Jan 27, 2023
efb7436
Fix flake8 lint errors
rhpvorderman Jan 27, 2023
eaa75cf
Fix mypy lint errors
rhpvorderman Jan 27, 2023
4776258
Merge branch 'init' into addtests
rhpvorderman Jan 27, 2023
02260a8
Fix more flake8 errors
rhpvorderman Jan 27, 2023
cf164fa
Disable pypy, install make on macos
rhpvorderman Jan 27, 2023
ffe081e
Update title underline
rhpvorderman Jan 27, 2023
89bcb66
Disable macos
rhpvorderman Jan 27, 2023
fe7e643
Use zlib-ng trick to get installation
rhpvorderman Jan 27, 2023
bbb9d04
Run more exhaustive compatibility tests including strategy
rhpvorderman Jan 30, 2023
22f3b8c
Xfail all tests with compression level 1
rhpvorderman Jan 30, 2023
c298e37
Make stub complete
rhpvorderman Jan 30, 2023
32dbc40
Remove python isal relic from license header
rhpvorderman Jan 30, 2023
e22bb05
Fix python 3.7 test failures
rhpvorderman Jan 30, 2023
e489b9c
Slightly shorter compatibiliy tests
rhpvorderman Jan 30, 2023
25dd742
Disable macOS
rhpvorderman Jan 30, 2023
c9321d6
Include bug in differences
rhpvorderman Jan 30, 2023
b89d5e1
Point to correct windows static lib
rhpvorderman Jan 30, 2023
a61c8b8
Check README.rst syntax errors
rhpvorderman Jan 30, 2023
5a9b2ac
Add automated documentation
rhpvorderman Jan 30, 2023
9281cee
Remove ISA-L artifact from README.rst
rhpvorderman Jan 30, 2023
0d4c32b
Pin theme to a working version
rhpvorderman Jan 30, 2023
68d011f
Limit test matrix
rhpvorderman Jan 30, 2023
3a12026
Fix pypy errors
rhpvorderman Jan 30, 2023
ea35c5e
Remove isal references
rhpvorderman Jan 30, 2023
e212fcb
Merge pull request #3 from pycompression/addtests
rhpvorderman Jan 30, 2023
18f31ba
Enable macos
rhpvorderman Jan 30, 2023
3c4d3a3
Merge pull request #4 from pycompression/test_macos
rhpvorderman Jan 30, 2023
cbb2dbf
Set build dependencies for zlib_ng
rhpvorderman Jan 30, 2023
b7bb4a3
Toggle wheelbuilding
rhpvorderman Jan 30, 2023
f2b793c
Skip existing builds for uploads
rhpvorderman Jan 30, 2023
4a0390b
Much simpler tests for wheels
rhpvorderman Jan 30, 2023
a5f1c75
Make sure build is installed
rhpvorderman Jan 30, 2023
47a4d29
Tests are relative to project
rhpvorderman Jan 30, 2023
052db29
use pytest instead
rhpvorderman Jan 30, 2023
b712667
Also test test_gzip_ng.py
rhpvorderman Jan 30, 2023
dc5fc43
Different test commands for windows
rhpvorderman Jan 30, 2023
6577834
Merge pull request #5 from pycompression/wheelbuilding
rhpvorderman Jan 30, 2023
31508a7
Only build wheels upon release
rhpvorderman Jan 30, 2023
bd630e2
Project currently in beta phase
rhpvorderman Jan 30, 2023
933501b
Add readthedocs configuration file
rhpvorderman Jan 30, 2023
34f008e
Merge branch 'wheelbuilding' into develop
rhpvorderman Jan 30, 2023
1d3281b
Do use preconfigured test pypi URL
rhpvorderman Jan 30, 2023
47d90bb
Acknowledge wheel building to github CI team
rhpvorderman Jan 31, 2023
a84d332
Set stable version
rhpvorderman Jan 31, 2023
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
4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

### Checklist
- [ ] Pull request details were added to CHANGELOG.rst
- [ ] Documentation was updated (if needed)
17 changes: 17 additions & 0 deletions .github/release_checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Release checklist
- [ ] Check outstanding issues on JIRA and Github.
- [ ] Check [latest documentation](https://python-zlib-ng.readthedocs.io/en/latest/) looks fine.
- [ ] Create a release branch.
- [ ] Set version to a stable number.
- [ ] Change current development version in `CHANGELOG.rst` to stable version.
- [ ] Change the version in `__init__.py`
- [ ] Merge the release branch into `main`.
- [ ] Created an annotated tag with the stable version number. Include changes
from CHANGELOG.rst.
- [ ] Push tag to remote. This triggers the wheel/sdist build on github CI.
- [ ] merge `main` branch back into `develop`.
- [ ] Add updated version number to develop. (`setup.py` and `src/zlib_ng/__init__.py`)
- [ ] Build the new tag on readthedocs. Only build the last patch version of
each minor version. So `1.1.1` and `1.2.0` but not `1.1.0`, `1.1.1` and `1.2.0`.
- [ ] Create a new release on github.
- [ ] Update the package on conda-forge.
238 changes: 238 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
name: Continous integration

on:
pull_request:
paths-ignore:
- 'docs/**'
- '*.rst'
push:
branches:
- develop
- main
tags:
- "*"

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- name: Set up Python 3.7
uses: actions/[email protected]
with:
python-version: 3.7
- name: Install tox
run: pip install tox
- name: Lint
run: tox -e lint

package-checks:
strategy:
matrix:
tox_env:
- docs
- twine_check
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- name: Set up Python 3.7
uses: actions/[email protected]
with:
python-version: 3.7
- name: Install tox and upgrade setuptools and pip
run: pip install --upgrade tox setuptools pip
- name: Run tox -e ${{ matrix.tox_env }}
run: tox -e ${{ matrix.tox_env }}

test-static:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "pypy-3.7"
- "pypy-3.8"
- "pypy-3.9"
os: ["ubuntu-latest"]
include:
- os: "macos-latest"
python-version: 3.7
- os: "windows-latest"
python-version: 3.7
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install tox and upgrade setuptools
run: pip install --upgrade tox setuptools
- name: Set MSVC developer prompt
uses: ilammy/[email protected]
if: runner.os == 'Windows'
- name: Install build dependencies (MacOS)
run: brew install make
if: runner.os == 'macOS'
- name: Run tests
run: tox
- name: Upload coverage report
uses: codecov/codecov-action@v1

test-arch:
if: startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
runs-on: "ubuntu-latest"
strategy:
matrix:
distro: [ "ubuntu_latest" ]
arch: ["aarch64"]
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: uraimo/[email protected]
name: Build & run test
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
install: |
apt-get update -q -y
apt-get install -q -y python3 python3-pip tox cmake
run: |
tox

# Test if the python-zlib-ng conda package can be build. Which is linked
# dynamically to the conda zlib-ng package.
test-dynamic:
runs-on: ${{ matrix.os }}
defaults:
run:
# This is needed for miniconda, see:
# https://github.com/marketplace/actions/setup-miniconda#important.
shell: bash -l {0}
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python_version: [ "python" ]
include:
- os: "ubuntu-latest"
python_version: "pypy"
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- name: Install miniconda.
uses: conda-incubator/[email protected] # https://github.com/conda-incubator/setup-miniconda.
with:
channels: conda-forge,defaults
- name: Install requirements (universal)
run: conda install zlib-ng ${{ matrix.python_version}} tox
- name: Set MSVC developer prompt
uses: ilammy/[email protected]
if: runner.os == 'Windows'
- name: Run tests (dynamic link)
run: tox
env:
PYTHON_ZLIB_NG_LINK_DYNAMIC: True

deploy:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ${{ matrix.os }}
needs:
- lint
- package-checks
- test-static
- test-dynamic
- test-arch
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
cibw_archs_linux: ["x86_64"]
build_sdist: [true]
include:
- os: "ubuntu-latest"
cibw_archs_linux: "aarch64"
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: actions/setup-python@v2
name: Install Python
- name: Install cibuildwheel twine build
run: python -m pip install cibuildwheel twine build
- name: Install build dependencies (Macos)
run: brew install make
if: runner.os == 'macOS'
- name: Set MSVC developer prompt
uses: ilammy/[email protected]
if: runner.os == 'Windows'
- name: Set up QEMU
if: ${{runner.os == 'Linux' && matrix.cibw_archs_linux == 'aarch64'}}
uses: docker/[email protected]
with:
platforms: arm64
- name: Build wheels
run: cibuildwheel --output-dir dist
env:
CIBW_SKIP: "*-win32 *-manylinux_i686" # Skip 32 bit
CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs_linux }}
CIBW_TEST_REQUIRES: "pytest"
# Simple tests that requires the project to be build correctly
CIBW_TEST_COMMAND_LINUX: >-
pytest {project}/tests/test_zlib_compliance.py
{project}/tests/test_gzip_compliance.py
{project}/tests/test_gzip_ng.py
CIBW_TEST_COMMAND_MACOS: >-
pytest {project}/tests/test_zlib_compliance.py
{project}/tests/test_gzip_compliance.py
{project}/tests/test_gzip_ng.py
# Windows does not have the test module in the included python.
# Run compatibility tests instead.
CIBW_TEST_COMMAND_WINDOWS: >-
pytest {project}/tests/test_compat.py
{project}/tests/test_gzip_ng.py
CIBW_ENVIRONMENT_LINUX: >-
PYTHON_ZLIB_NG_BUILD_CACHE=True
PYTHON_ZLIB_NG_BUILD_CACHE_FILE=/tmp/build_cache
CFLAGS="-g0 -DNDEBUG"
CIBW_ENVIRONMENT_WINDOWS: >-
PYTHON_ZLIB_NG_BUILD_CACHE=True
PYTHON_ZLIB_NG_BUILD_CACHE_FILE=${{ runner.temp }}\build_cache
CIBW_ENVIRONMENT_MACOS: >-
PYTHON_ZLIB_NG_BUILD_CACHE=True
PYTHON_ZLIB_NG_BUILD_CACHE_FILE=${{ runner.temp }}/build_cache
CFLAGS="-g0 -DNDEBUG"
- name: Build sdist
if: ${{runner.os == 'Linux' && matrix.cibw_archs_linux == 'x86_64'}}
run:
python -m build --sdist
- uses: actions/upload-artifact@v2
with:
name: "dist"
path: "dist/"
- name: Publish package to TestPyPI
# pypa/gh-action-pypi-publish@master does not work on OSX
# Alpha, Beta and dev releases contain a - in the tag.
if: contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')
run: twine upload --skip-existing -r testpypi dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
- name: Publish package to PyPI
if: "!contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')"
run: twine upload --skip-existing dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/zlib-ng"]
path = src/zlib_ng/zlib-ng
url = https://github.com/zlib-ng/zlib-ng.git
9 changes: 9 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
formats: [] # Do not build epub and pdf

python:
install:
- method: pip
path: .
conda:
environment: docs/conda-environment.yml
16 changes: 16 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
==========
Changelog
==========

.. Newest changes should be on top.

.. This document is user facing. Please word the changes in such a way
.. that users understand how the changes affect the new version.

version 0.1.0
-----------------
+ Build wheels for all three major operating systems.
+ Add a fully featured gzip application in python m zlib_ng.gzip_ng.
+ Port Cpython's gzip module to use zlib-ng.
+ Port CPython's zlib module to use zlib-ng.
+ Use zlib-ng version 2.0.6 as included statically linked version.
48 changes: 48 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
--------------------------------------------

1. This LICENSE AGREEMENT is between the Python Software Foundation
("PSF"), and the Individual or Organization ("Licensee") accessing and
otherwise using this software ("Python") in source or binary form and
its associated documentation.

2. Subject to the terms and conditions of this License Agreement, PSF hereby
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python alone or in any derivative version,
provided, however, that PSF's License Agreement and PSF's notice of copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Python Software Foundation;
All Rights Reserved" are retained in Python alone or in any derivative version
prepared by Licensee.

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python.

4. PSF is making Python available to Licensee on an "AS IS"
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee. This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.

8. By copying, installing or otherwise using Python, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
graft src/zlib_ng/zlib-ng
Loading