Skip to content

Commit

Permalink
chore: add python 3.11 support (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdaves authored Nov 19, 2023
1 parent bebd4b7 commit 2fee0ec
Show file tree
Hide file tree
Showing 6 changed files with 2,117 additions and 1,692 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ jobs:
key: py3.10-ubuntu-latest-venv-cache-${{ hashFiles('**/poetry.lock') }}
- name: Install poetry
run: |
pip install poetry==1.1.13
pip install poetry>=1.5.0
poetry config virtualenvs.in-project true
- name: Install dependencies
run: |
poetry install -E http -E sql --no-root
poetry install -E http -E sql
poetry run task compile
poetry install
- name: Lint
run: |
poetry show mypy
Expand All @@ -52,13 +51,13 @@ jobs:
key: py3.7-ubuntu-latest-venv-cache-${{ hashFiles('**/poetry.lock') }}
- name: Install poetry
run: |
pip install poetry==1.1.11
pip install poetry>=1.5.0
poetry config virtualenvs.in-project true
- name: Install dependencies
run: |
poetry install -E http -E sql --no-root
poetry install -E http -E sql
poetry run task compile
poetry install
poetry run task pytkdocs
- name: Build docs
run: poetry run mkdocs build
test_sdist:
Expand All @@ -69,15 +68,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.10.4
- name: Restore cache
uses: actions/cache@v1
with:
path: .venv
key: py3.7-ubuntu-latest-venv-cache-${{ hashFiles('**/poetry.lock') }}
key: py3.10-ubuntu-latest-venv-cache-${{ hashFiles('**/poetry.lock') }}
- name: Install poetry
run: |
pip install poetry==1.1.11
pip install poetry>=1.5.0
poetry config virtualenvs.in-project true
- name: Install dependencies
run: |
Expand All @@ -96,7 +95,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -112,7 +111,7 @@ jobs:
key: py${{ matrix.python-version }}-${{ matrix.os }}-venv-cache-${{ hashFiles('**/poetry.lock') }}
- name: Install poetry
run: |
pip install poetry==1.1.11
pip install poetry>=1.5.0
poetry config virtualenvs.in-project true
- name: Install dependencies
run: |
Expand All @@ -121,6 +120,7 @@ jobs:
poetry build -f wheel
poetry run pip install --ignore-installed dist/*
- name: Run tests
if: ${{matrix.python-version!='3.7'}}
run: poetry run pytest -n 4 --mypy-ini-file=tests/mypy.ini
- name: Upload wheel
uses: actions/upload-artifact@v2
Expand All @@ -145,7 +145,7 @@ jobs:
key: py3.7-ubuntu-latest-venv-cache-${{ hashFiles('**/poetry.lock') }}
- name: Install poetry
run: |
pip install poetry==1.1.11
pip install poetry>=1.5.0
poetry config virtualenvs.in-project true
- name: Download wheels and sdist
uses: actions/download-artifact@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,4 @@ docs/build
.vscode
.DS_Store
*.c
setup.py
6 changes: 5 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
from Cython.Build import cythonize
from setuptools.extension import Extension


def build(setup_kwargs):
extensions = [Extension("pfun.effect", ['src/pfun/effect.c'])]
cythonize("src/pfun/effect.pyx")
extensions = [
Extension("pfun.effect", ['src/pfun/effect.c']),
]
setup_kwargs.update(
{
"ext_modules": extensions
Expand Down
Loading

0 comments on commit 2fee0ec

Please sign in to comment.