Skip to content

Commit

Permalink
Merge pull request #103 from nucleic/py310
Browse files Browse the repository at this point in the history
Start testing on Python 3.10
  • Loading branch information
MatthieuDartiailh committed Aug 26, 2021
2 parents 92b67c1 + e15bf8f commit 5d33a8e
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 28 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.6, 3.7, 3.8, 3.9, pypy-3.6, pypy-3.7]
python-version: [3.7, 3.8, 3.9, 3.10.0-rc.1, pypy-3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -46,23 +46,20 @@ jobs:
- name: Install project
env:
CPPFLAGS: --coverage
run: |
python setup.py develop
- name: Test with pytest
if: matrix.python-version == '3.6'
env:
KIWI_DISABLE_FH4: 1
run: |
pip install pytest
python -m pytest py/tests
python setup.py develop
- name: Test with pytest
if: matrix.python-version != '3.6'
run: |
pip install pytest
python -X dev -m pytest py/tests
- name: Generate C++ coverage reports
if: (github.event_name != 'schedule' && matrix.os != 'windows-latest')
run: |
bash -c "find . -type f -name '*.gcno' -exec gcov -pb --all-blocks {} +" || true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
if: matrix.os != 'windows-latest'
uses: codecov/codecov-action@v2
if: (github.event_name != 'schedule' && matrix.os != 'windows-latest')
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
Expand Down
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ Welcome to Kiwi
:alt: Documentation Status

Kiwi is an efficient C++ implementation of the Cassowary constraint solving
algorithm. Kiwi is an implementation of the algorithm based on the
`seminal Cassowary paper <https://constraints.cs.washington.edu/solvers/cassowary-tochi.pdf>`_.
It is *not* a refactoring of the original C++ solver. Kiwi has been designed
from the ground up to be lightweight and fast. Kiwi ranges from 10x to 500x
faster than the original Cassowary solver with typical usecases gaining a 40x
algorithm. Kiwi is an implementation of the algorithm based on the
`seminal Cassowary paper <https://constraints.cs.washington.edu/solvers/cassowary-tochi.pdf>`_.
It is *not* a refactoring of the original C++ solver. Kiwi has been designed
from the ground up to be lightweight and fast. Kiwi ranges from 10x to 500x
faster than the original Cassowary solver with typical usecases gaining a 40x
improvement. Memory savings are consistently > 5x.

In addition to the C++ solver, Kiwi ships with hand-rolled Python bindings for
Python 3.6+.
Python 3.7+.
24 changes: 24 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
codecov:
notify:
require_ci_to_pass: yes

coverage:
precision: 2

status:
project: yes
patch: yes
changes: yes

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

comment:
layout: "header, diff"
behavior: default
require_changes: no
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# The short X.Y version
version = '1.3'
# The full version, including alpha/beta/rc tags
release = '1.3.1'
release = '1.3.2'


# -- General configuration ---------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions py/expression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ Expression_richcmp( PyObject* first, PyObject* second, int op )
"unsupported operand type(s) for %s: "
"'%.100s' and '%.100s'",
pyop_str( op ),
first->ob_type->tp_name,
second->ob_type->tp_name
Py_TYPE( first )->tp_name,
Py_TYPE( second )->tp_name
);
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion py/kiwisolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <kiwi/kiwi.h>
#include "types.h"

#define PY_KIWI_VERSION "1.3.1"
#define PY_KIWI_VERSION "1.3.2"

namespace
{
Expand Down
4 changes: 2 additions & 2 deletions py/term.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ Term_richcmp( PyObject* first, PyObject* second, int op )
"unsupported operand type(s) for %s: "
"'%.100s' and '%.100s'",
pyop_str( op ),
first->ob_type->tp_name,
second->ob_type->tp_name
Py_TYPE( first )->tp_name,
Py_TYPE( second )->tp_name
);
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions py/variable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ Variable_richcmp( PyObject* first, PyObject* second, int op )
"unsupported operand type(s) for %s: "
"'%.100s' and '%.100s'",
pyop_str( op ),
first->ob_type->tp_name,
second->ob_type->tp_name
Py_TYPE( first )->tp_name,
Py_TYPE( second )->tp_name
);
return 0;
}
Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def build_extensions(self):

setup(
name='kiwisolver',
version='1.3.1',
version='1.3.2',
author='The Nucleic Development Team',
author_email='sccolbert@gmail.com',
url='https://github.com/nucleic/kiwi',
Expand All @@ -80,13 +80,14 @@ def build_extensions(self):
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
python_requires='>=3.6',
python_requires='>=3.7',
setup_requires=['cppy>=1.1.0'],
ext_modules=ext_modules,
cmdclass={'build_ext': BuildExt},
Expand Down

0 comments on commit 5d33a8e

Please sign in to comment.