Skip to content

Commit

Permalink
Merge pull request #29 from simon-hirsch/test_python_313
Browse files Browse the repository at this point in the history
Increase test coverage for python / numpy versions
  • Loading branch information
simon-hirsch authored Dec 11, 2024
2 parents db9180a + 2ed90da commit 11be0c8
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 6 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci_run_tests_deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Automated Tests
on:
push:
branches:
- '**' # matches every branch
- '!gh-pages' # excludes gh-pages
pull_request:
branches:
- '**' # matches every branch
- '!gh-pages' # excludes gh-pages
permissions:
contents: read
jobs:
build:
# runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12"] # "3.13"]
numpy-version: ["1.26", "2.0.0", "2.1.0", "2.2.0"]
exclude:
- python-version: "3.13"
numpy-version: "1.26"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-version}}
- name: Install dependencies
run: |
python -m ensurepip --upgrade
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
pip install numpy==${{ matrix.numpy-version }}
pip install flake8 pytest
if [ -f requirements_tests.txt ]; then pip install -r requirements_tests.txt; fi
- name: Build package
run: python -m build --wheel
- name: Install Package
run: pip install dist/*
- name: Run tests with pytest
run: pytest tests

Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,22 @@ jobs:
# runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: ${{matrix.python-version}}
- name: Install dependencies
run: |
python -m ensurepip --upgrade
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
pip install numpy
pip install flake8 pytest
if [ -f requirements_tests.txt ]; then pip install -r requirements_tests.txt; fi
- name: Build package
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ authors = [
]
description = "Methods for online / incremental estimation of distributional regression models"
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.10, <3.13" # Introduce hard cap on python due to numba
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies=[
"scipy >= 1.00, <2.0.0",
"scipy >= 1.00, <2.2.0",
"numpy >= 1.2, <2.0.0",
"numba >= 0.59.1, < 1.0.0"
]
Expand Down
3 changes: 1 addition & 2 deletions requirements_tests.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
numpy>1.26.0, <2.0.0
numba>0.59, <1.0.0
numba
scipy
scikit-learn
build

0 comments on commit 11be0c8

Please sign in to comment.