Skip to content

Commit

Permalink
require python>3.9, test up to python3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrraz committed Feb 7, 2025
1 parent 0daa7a6 commit 87b865f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 33 deletions.
46 changes: 22 additions & 24 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,35 @@ name: Python package

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flit pytest pre-commit
flit install
- name: Copy documentation
run: |
cp -r docs $LD_LIBRARY_PATH/python${{ matrix.python-version }}/site-packages/plothist/docs
- name: Run pre-commit
if: matrix.python-version != '3.7'
run: |
pre-commit run --all-files
- name: Test with pytest
run: |
pytest
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flit pytest pre-commit
flit install
- name: Copy documentation
run: |
cp -r docs $LD_LIBRARY_PATH/python${{ matrix.python-version }}/site-packages/plothist/docs
- name: Run pre-commit
run: |
pre-commit run --all-files
- name: Test with pytest
run: |
pytest
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ classifiers = [
"Topic :: Scientific/Engineering",
]
dynamic = ["version", "description"]
requires-python = ">=3.7"
requires-python = ">=3.9"
dependencies = [
"boost-histogram>=1.4.0",
"numpy>=1.14.5",
Expand Down
8 changes: 0 additions & 8 deletions src/plothist/scripts/make_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ def make_examples(no_input=False, check_svg=False, print_code=False):
If the example or img folder does not exist, the function will raise a FileNotFoundError.
"""

# If python version is lower than 3.9, return a warning
if sys.version_info < (3, 9):
warnings.warn(
"svg behavior is not consistent across python versions. Please run this script with python 3.9 or higher. Skipping.",
stacklevel=2,
)
return 1

import matplotlib

if tuple(map(int, matplotlib.__version__.split("."))) < tuple(
Expand Down

0 comments on commit 87b865f

Please sign in to comment.