Skip to content

Commit

Permalink
Build: Drop support for Python 3.8 (#119)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 24.8.0 → 24.10.0](psf/black@24.8.0...24.10.0)

* Chore: Bump Copier template

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Adrien Berchet <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and adrien-berchet authored Nov 6, 2024
1 parent a7e5afa commit 068a8e9
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .auto-changelog
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"template": ".auto-changelog-template.hbs",
"commitLimit": false,
"backfillLimit": false,
"ignoreCommitPattern": "^Release:? [0-9]+\\.[0-9]+\\.[0-9]+$|^Update CHANGELOG.*|.*\\[skip-changelog\\].*|^\\[pre-commit.ci\\]|^\\(dependabot\\) .*",
"ignoreCommitPattern": "^Release:? [0-9]+\\.[0-9]+\\.[0-9]+( ?\\(#[0-9]+\\))?$|^Update CHANGELOG.*|.*\\[skip-changelog\\].*|^\\[pre-commit.ci\\]|^\\(dependabot\\) .*",
"commitUrl": "https://github.com/BlueBrain/luigi-tools/commit/{id}",
"issueUrl": "https://github.com/BlueBrain/luigi-tools/issues/{id}",
"mergeUrl": "https://github.com/BlueBrain/luigi-tools/pull/{id}",
Expand Down
4 changes: 2 additions & 2 deletions .auto-changelog-template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Example Definitions
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
{{/commit-list}}

{{#commit-list merges heading='### General Changes' exclude='[bB]reaking [cC]hange:|[bB]reaking:|^[bB]uild:|^[bB]uild\(|^[dD]eprecate:|^[dD]eprecate\(|^[fF]eat:|^[fF]eat\(|^[fF]ix:|^[fF]ix\(|^[cC]hore:|^[cC]hore\(|^[cC][iI]:|^[cC][iI]\(|^[dD]ocs:|^[dD]ocs\(|^[rR]efactor:|^[rR]efactor\(|^[tT]est:|^[tT]est\(|^[sS]tyle:|^[sS]tyle\(|^[pP]erf:|^[pP]erf\(|\[skip-changelog\]'}}
{{#commit-list merges heading='### General Changes' exclude='[bB]reaking [cC]hange:|[bB]reaking:|^[bB]uild:|^[bB]uild ?\(|^[dD]eprecate:|^[dD]eprecate ?\(|^[fF]eat:|^[fF]eat ?\(|^[fF]ix:|^[fF]ix ?\(|^[cC]hore:|^[cC]hore ?\(|^[cC][iI]:|^[cC][iI] ?\(|^[dD]ocs:|^[dD]ocs ?\(|^[rR]efactor:|^[rR]efactor ?\(|^[tT]est:|^[tT]est ?\(|^[sS]tyle:|^[sS]tyle ?\(|^[pP]erf:|^[pP]erf ?\(|\[skip-changelog\]'}}
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
{{/commit-list}}

Expand Down Expand Up @@ -190,7 +190,7 @@ Example Definitions
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
{{/commit-list}}

{{#commit-list commits heading='### General Changes' exclude='[bB]reaking [cC]hange:|[bB]reaking:|^[bB]uild:|^[bB]uild\(|^[dD]eprecate:|^[dD]eprecate\(|^[fF]eat:|^[fF]eat\(|^[fF]ix:|^[fF]ix\(|^[cC]hore:|^[cC]hore\(|^[cC][iI]:|^[cC][iI]\(|^[dD]ocs:|^[dD]ocs\(|^[rR]efactor:|^[rR]efactor\(|^[tT]est:|^[tT]est\(|^[sS]tyle:|^[sS]tyle\(|^[pP]erf:|^[pP]erf\(|\[skip-changelog\]'}}
{{#commit-list commits heading='### General Changes' exclude='[bB]reaking [cC]hange:|[bB]reaking:|^[bB]uild:|^[bB]uild ?\(|^[dD]eprecate:|^[dD]eprecate ?\(|^[fF]eat:|^[fF]eat ?\(|^[fF]ix:|^[fF]ix ?\(|^[cC]hore:|^[cC]hore ?\(|^[cC][iI]:|^[cC][iI] ?\(|^[dD]ocs:|^[dD]ocs ?\(|^[rR]efactor:|^[rR]efactor ?\(|^[tT]est:|^[tT]est ?\(|^[sS]tyle:|^[sS]tyle ?\(|^[pP]erf:|^[pP]erf ?\(|\[skip-changelog\]'}}
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
{{/commit-list}}

Expand Down
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changes here will be overwritten by Copier

_commit: 0.1.51
_commit: 0.1.65
_src_path: [email protected]:neuromath/python-template.git
author_email: ''
author_name: Blue Brain Project, EPFL
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ jobs:
check-pr-title:
name: Check PR title
runs-on: ubuntu-latest
env:
PR_TITLE: ${{ github.event.pull_request.title }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
- run: npm install -g --force commitlint @commitlint/cli commitlint-plugin-cleanfeet
- run: npm install conventional-changelog-conventionalcommits
- run: touch .git/COMMIT_EDITMSG
- run: echo "${{ github.event.pull_request.title }}" | commitlint
- run: echo "$PR_TITLE" | commitlint
4 changes: 2 additions & 2 deletions .github/workflows/publish-sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.10"
- name: Build a wheel and a source tarball
run: |
pip install setuptools>=42 build setuptools_scm[toml]>=3.4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
min_versions: ["min_versions", "latest_versions"]
exclude:
- min_versions: "min_versions"
include:
- python-version: "3.8"
- python-version: "3.9"
min_versions: "min_versions"

steps:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
Expand Down
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ disable=
fixme,
invalid-name,
len-as-condition,
no-else-return
no-else-return,
too-many-positional-arguments

[FORMAT]
# Regexp for a line that is allowed to be longer than the limit.
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
version: 2

build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.11"

sphinx:
configuration: docs/source/conf.py
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ When you wish to contribute to the code base, please consider the following guid
or

```shell
tox -e py38 -e lint -e docs -e check-packaging
tox -e py39 -e lint -e docs -e check-packaging
```

* Commit your changes using a descriptive commit message.
Expand Down
9 changes: 5 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@

# -- Project information -----------------------------------------------------

project = "luigi-tools"
project_name = "Luigi tools"
package_name = "luigi-tools"

# The short X.Y version
version = metadata.version("luigi-tools")
version = metadata.version(package_name)

# The full version, including alpha/beta/rc tags
release = version
Expand Down Expand Up @@ -67,10 +68,10 @@
# html_static_path = ['_static']

html_theme_options = {
"metadata_distribution": "luigi-tools",
"metadata_distribution": package_name,
}

html_title = "Luigi tools"
html_title = project_name

# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False
Expand Down
1 change: 1 addition & 0 deletions luigi_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
Extend and add new features to the luigi package.
"""

import importlib.metadata
import warnings

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ local_scheme = "no-local-version"
[tool.black]
line-length = 100
target-version = [
"py38",
"py39",
"py310",
"py311",
"py312",
]

[tool.pydocstyle]
Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

"""Setup for the luigi-tools package."""

from pathlib import Path

from setuptools import find_namespace_packages
Expand All @@ -34,7 +35,7 @@
test_reqs = [
"mock>=3",
"pytest>=8",
"pytest-cov>=3",
"pytest-cov>=4.1",
"pytest-html>=4",
]

Expand All @@ -51,7 +52,7 @@
},
license="Apache License 2.0",
packages=find_namespace_packages(include=["luigi_tools*"]),
python_requires=">=3.8",
python_requires=">=3.9",
use_scm_version=True,
setup_requires=[
"setuptools_scm",
Expand All @@ -70,10 +71,10 @@
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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",
"Topic :: Scientific/Engineering",
],
)
26 changes: 13 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ envlist =
lint
docs
min_versions
py{38,39,310,311}
py{39,310,311,312}
coverage

minversion = 3.18
Expand All @@ -19,12 +19,7 @@ extras =
test
setenv =
COVERAGE_FILE = {env:COVERAGE_FILE:.coverage-{envname}}
deps =
min_versions: Requirements-Builder
commands =
min_versions: requirements-builder --level=min --extras=test -o {envtmpdir}/requirements_min.txt setup.py
min_versions: pip install -r {envtmpdir}/requirements_min.txt
min_versions: pip freeze
pytest \
--basetemp={envtmpdir} \
--cov={[base]name} \
Expand All @@ -50,10 +45,16 @@ commands =
twine check {envtmpdir}/dist/*

[testenv:min_versions]
basepython = python3.8
basepython = python3.9
deps =
Requirements-Builder
commands_pre =
requirements-builder --level=min --extras=test -o {envtmpdir}/requirements_min.txt setup.py
pip install -r {envtmpdir}/requirements_min.txt
pip freeze

[testenv:lint]
basepython = python3.8
basepython = python3.9
deps =
mock
pre-commit
Expand All @@ -64,7 +65,7 @@ commands =
pylint -j {env:PYLINT_NPROCS:1} {[base]files}

[testenv:format]
basepython = python3.8
basepython = python3.9
skip_install = true
deps =
codespell
Expand All @@ -74,7 +75,6 @@ commands =
pre-commit run --all-files

[testenv:docs]
basepython = python3.9
changedir = docs
extras = docs
allowlist_externals =
Expand All @@ -84,7 +84,7 @@ commands = make html SPHINXOPTS=-W

[gh-actions]
python =
3.8: py38, lint
3.9: py39, docs
3.9: py39, lint
3.10: py310, check-packaging
3.11: py311
3.11: py311, docs
3.12: py312

0 comments on commit 068a8e9

Please sign in to comment.