From 71cd17fae6bdf4cef9b4e831e3057eb3da714e90 Mon Sep 17 00:00:00 2001 From: tgoddessana Date: Wed, 18 Sep 2024 19:12:06 +0900 Subject: [PATCH 1/9] ci: add tests for newer python and django versions --- .github/workflows/python-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b7c00b4..3edbf2a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -34,8 +34,8 @@ jobs: needs: lint strategy: matrix: - python-version: [ 3.8, 3.9, "3.10" ] - django-version: [ "3.2", "4.0" ] + python-version: [ 3.8, 3.9, 3.10, 3.11, 3.12 ] + django-version: [ "3.2", "4.0", "5.0", "5.1" ] env: PYTHON: ${{ matrix.python-version }} DJANGO: ${{ matrix.django-version }} From 23b5cf9ca094bc912bb444cc0efb310a1ed95a9d Mon Sep 17 00:00:00 2001 From: tgoddessana Date: Wed, 18 Sep 2024 19:49:00 +0900 Subject: [PATCH 2/9] test: bump pytest version, and remove unnecessary pytest-pythonpath from requirements/local.txt --- pytest.ini | 6 +----- requirements/local.txt | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pytest.ini b/pytest.ini index 1562108..fac9915 100644 --- a/pytest.ini +++ b/pytest.ini @@ -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 diff --git a/requirements/local.txt b/requirements/local.txt index fd1375c..4a3e08b 100644 --- a/requirements/local.txt +++ b/requirements/local.txt @@ -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 # ------------------------------------------------------------------------------ From ec5aaa9866380c323a85abb909fe2bd9fbb1b28e Mon Sep 17 00:00:00 2001 From: tgoddessana Date: Wed, 18 Sep 2024 20:04:59 +0900 Subject: [PATCH 3/9] test: update ci to use tox --- .github/workflows/python-package.yml | 119 ++++++++++++++------------- tox.ini | 19 +++++ 2 files changed, 81 insertions(+), 57 deletions(-) create mode 100644 tox.ini diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 3edbf2a..d615ed3 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -4,62 +4,67 @@ 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, 3.11, 3.12 ] - django-version: [ "3.2", "4.0", "5.0", "5.1" ] - 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.8' + - '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: Run extra tox targets + if: ${{ matrix.python-version == '3.9' }} + run: | + tox -e base,dist,docs + + - name: Upload coverage + run: | + codecov -e TOXENV,DJANGO \ No newline at end of file diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..3cadaf9 --- /dev/null +++ b/tox.ini @@ -0,0 +1,19 @@ +[tox] +envlist = + {py38,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 \ No newline at end of file From a252c14b75b1a82fdb4f29fadde56cf3289477d3 Mon Sep 17 00:00:00 2001 From: tgoddessana Date: Wed, 18 Sep 2024 20:17:21 +0900 Subject: [PATCH 4/9] test: remove unnecessary step --- .github/workflows/python-package.yml | 52 +++++++++++----------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index d615ed3..ad83db9 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -32,39 +32,27 @@ jobs: tests: name: Python ${{ matrix.python-version }} runs-on: ubuntu-20.04 - strategy: matrix: python-version: - - '3.8' - - '3.9' - - '3.10' - - '3.11' - - '3.12' - + - '3.8' + - '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: Run extra tox targets - if: ${{ matrix.python-version == '3.9' }} - run: | - tox -e base,dist,docs - - - name: Upload coverage - run: | - codecov -e TOXENV,DJANGO \ No newline at end of file + - 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 \ No newline at end of file From d483d0e03dd1a490b0bebbb84e68a076f8ec3558 Mon Sep 17 00:00:00 2001 From: tgoddessana Date: Thu, 19 Sep 2024 15:07:01 +0900 Subject: [PATCH 5/9] chore: drop support for python 3.8 && django 3.2 --- .github/workflows/python-package.yml | 1 - setup.py | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ad83db9..c2f728e 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -35,7 +35,6 @@ jobs: strategy: matrix: python-version: - - '3.8' - '3.9' - '3.10' - '3.11' diff --git a/setup.py b/setup.py index 511f0ab..80010a7 100644 --- a/setup.py +++ b/setup.py @@ -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, From 1d38aecc54056841d669f31d5657405f039e7792 Mon Sep 17 00:00:00 2001 From: tgoddessana Date: Thu, 19 Sep 2024 15:07:11 +0900 Subject: [PATCH 6/9] docs: add authors --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 55f0887..edef57f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,3 +1,4 @@ - Jarek Glowacki - Stas Kaledin - John Cass +- JAEGYUN JUNG \ No newline at end of file From 5ef7aa1b60d5c1c8fb95647cfca55cf731cd801e Mon Sep 17 00:00:00 2001 From: tgoddessana Date: Thu, 19 Sep 2024 18:02:26 +0900 Subject: [PATCH 7/9] test: drop testing python3.8 in tox.ini --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 3cadaf9..6bc1385 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - {py38,py39}-{django42} + {py39}-{django42} {py310}-{django42,django50,django51,djangomain} {py311}-{django42,django50,django51,djangomain} {py312}-{django42,django50,django51,djangomain} From 49b227e30cc0c90b0ab8d3fa3bcca8b1e4372c83 Mon Sep 17 00:00:00 2001 From: tgoddessana Date: Thu, 19 Sep 2024 23:57:35 +0900 Subject: [PATCH 8/9] chore: prepare version 0.7.0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 80010a7..ec9cf44 100644 --- a/setup.py +++ b/setup.py @@ -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", From 5541e5ead41c024f64b50fea60a175fdc0f81d42 Mon Sep 17 00:00:00 2001 From: tgoddessana Date: Tue, 24 Sep 2024 01:37:24 +0900 Subject: [PATCH 9/9] docs: update changelog.md --- docs/changelog.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index c0870a9..32ef57f 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -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**