Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for (pytho3.8&&django.3.2), add support for (python3.11,3.12&&django5.0,django5.1) #191

Merged
merged 9 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
106 changes: 49 additions & 57 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,62 +4,54 @@
name: Python package

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

jobs:
lint:
name: Check code style
runs-on: ubuntu-latest
container: python:3-slim
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 black
- name: Blacken code
run: black . --safe --quiet
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
test:
name: Test (Python, Django)
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
python-version: [ 3.8, 3.9, "3.10" ]
django-version: [ "3.2", "4.0" ]
env:
PYTHON: ${{ matrix.python-version }}
DJANGO: ${{ matrix.django-version }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade django~=${{ matrix.django-version }}
if [ -f requirements/local.txt ]; then pip install -r requirements/local.txt; fi
- name: Test with pytest and update coverage
run: |
coverage run -m pytest
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
flags: unittests
env_vars: PYTHON, DJANGO
fail_ci_if_error: true
verbose: true
lint:
name: Check code style
runs-on: ubuntu-latest
container: python:3-slim
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 black
- name: Blacken code
run: black . --safe --quiet
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

tests:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-20.04
strategy:
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'requirements/*.txt'
- name: Upgrade packaging tools
run: python -m pip install --upgrade pip setuptools virtualenv wheel
- name: Install dependencies
run: python -m pip install --upgrade codecov tox
- name: Run tox targets for ${{ matrix.python-version }}
run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d . | cut -f 1 -d '-')
- name: Upload coverage
run: |
codecov -e TOXENV,DJANGO
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Jarek Glowacki <jarekwg@gmail.com>
- Stas Kaledin <staskaledin@gmail.com>
- John Cass <john.cass77@gmail.com>
- JAEGYUN JUNG <twiecgoddessana1229@gmail.com>
9 changes: 8 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# Changelog

This changelog is used to track all major changes to django-apscheduler.

## v0.7.0(2024-09-24)

## v0.6.3 (UNRELEASED)
**Enhancements**
- Drop support for Python 3.8 and Django 3.2.
- Add support for Python 3.9 to 3.12, Django 4.2 to 5.1
- Bump pytest to >7, remove pytest-pythonpath as it is no longer needed.
- Add tox.ini file to run tests against all supported versions of Python and Django.
- Update CI configuration to use tox.

**Fixes**

Expand Down
6 changes: 1 addition & 5 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
[pytest]
pythonpath = .
python_files = tests.py test_*.py *_tests.py

;https://github.com/bigsassy/pytest-pythonpath#usage
python_paths = tests/

addopts = --ds=tests.settings

norecursedirs = django_apscheduler
4 changes: 2 additions & 2 deletions requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# Testing
# ------------------------------------------------------------------------------
pytest~=6.2 # https://github.com/pytest-dev/pytest
tox==4.19.0 # https://github.com/tox-dev/tox
pytest>7.0.0 # https://github.com/pytest-dev/pytest
pytest-sugar~=0.9 # https://github.com/Frozenball/pytest-sugar
pytest-pythonpath~=0.7 # https://github.com/bigsassy/pytest-pythonpath

# Django
# ------------------------------------------------------------------------------
Expand Down
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="django-apscheduler",
version="0.6.2",
version="0.7.0",
description="APScheduler for Django",
long_description=long_description,
long_description_content_type="text/markdown",
Expand All @@ -26,17 +26,19 @@
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
],
keywords="django apscheduler django-apscheduler",
packages=find_packages(exclude=("tests",)),
install_requires=[
"django>=3.2",
"django>=4.2",
"apscheduler>=3.2,<4.0",
],
zip_safe=False,
Expand Down
19 changes: 19 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[tox]
envlist =
{py39}-{django42}
{py310}-{django42,django50,django51,djangomain}
{py311}-{django42,django50,django51,djangomain}
{py312}-{django42,django50,django51,djangomain}

[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
pytest
pytest-django
django42: django>=4.2,<5.0
django50: django>=5.0,<5.1
django51: django>=5.1,<5.2
djangomain: https://github.com/django/django/archive/main.tar.gz
commands =
pytest
Loading