Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
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
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 ninja
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
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"
cibw_before_all_linux: "true" # The true command exits with 0
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: actions/setup-python@v2
name: Install Python
- name: Install cibuildwheel twine wheel
run: python -m pip install cibuildwheel twine wheel
- name: Install build dependencies (Macos)
run: brew install nasm automake autoconf
if: runner.os == 'macOS'
- name: Set MSVC developer prompt
uses: ilammy/[email protected]
if: runner.os == 'Windows'
- name: Install nasm (Windows)
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_BEFORE_ALL_LINUX: ${{ matrix.cibw_before_all_linux }}
# Fully test the build wheels again.
CIBW_TEST_REQUIRES: "pytest"
# Simple test that requires the project to be build correctly
CIBW_TEST_COMMAND: >-
pytest {project}/tests/test_igzip.py
{project}/tests/test_compat.py
{project}/tests/test_igzip_lib.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: |
pip install build
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 --repository-url https://test.pypi.org/legacy/ 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 dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
15 changes: 15 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
==========
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-dev
-----------------
+ 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.
Loading