diff --git a/.auto-changelog b/.auto-changelog index 5669a10..2187fc6 100644 --- a/.auto-changelog +++ b/.auto-changelog @@ -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}", diff --git a/.auto-changelog-template.hbs b/.auto-changelog-template.hbs index 60d2ab9..2906c87 100644 --- a/.auto-changelog-template.hbs +++ b/.auto-changelog-template.hbs @@ -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}} @@ -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}} diff --git a/.copier-answers.yml b/.copier-answers.yml index baea65d..50c5dbb 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,6 +1,6 @@ # Changes here will be overwritten by Copier -_commit: 0.1.51 +_commit: 0.1.65 _src_path: git@bbpgitlab.epfl.ch:neuromath/python-template.git author_email: '' author_name: Blue Brain Project, EPFL diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index ff4859f..14a08fc 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -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 diff --git a/.github/workflows/publish-sdist.yml b/.github/workflows/publish-sdist.yml index 86c7d4d..2a6dc7b 100644 --- a/.github/workflows/publish-sdist.yml +++ b/.github/workflows/publish-sdist.yml @@ -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 diff --git a/.github/workflows/run-tox.yml b/.github/workflows/run-tox.yml index 5301dce..bb7eb10 100644 --- a/.github/workflows/run-tox.yml +++ b/.github/workflows/run-tox.yml @@ -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: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 40128ac..ee119da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/.pylintrc b/.pylintrc index 4187bf9..244488c 100644 --- a/.pylintrc +++ b/.pylintrc @@ -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. diff --git a/.readthedocs.yml b/.readthedocs.yml index c51d15e..91cce21 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a35c4c7..4eec3bc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. diff --git a/docs/source/conf.py b/docs/source/conf.py index b4f1d47..8bbc84e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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 @@ -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 diff --git a/luigi_tools/__init__.py b/luigi_tools/__init__.py index 780dff7..50bf9c1 100644 --- a/luigi_tools/__init__.py +++ b/luigi_tools/__init__.py @@ -16,6 +16,7 @@ Extend and add new features to the luigi package. """ + import importlib.metadata import warnings diff --git a/pyproject.toml b/pyproject.toml index 5de7b5c..4c858d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,10 +11,10 @@ local_scheme = "no-local-version" [tool.black] line-length = 100 target-version = [ - "py38", "py39", "py310", "py311", + "py312", ] [tool.pydocstyle] diff --git a/setup.py b/setup.py index 78e6fb7..b204bfe 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,7 @@ # limitations under the License. """Setup for the luigi-tools package.""" + from pathlib import Path from setuptools import find_namespace_packages @@ -34,7 +35,7 @@ test_reqs = [ "mock>=3", "pytest>=8", - "pytest-cov>=3", + "pytest-cov>=4.1", "pytest-html>=4", ] @@ -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", @@ -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", ], ) diff --git a/tox.ini b/tox.ini index 7397d31..fefa160 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,7 @@ envlist = lint docs min_versions - py{38,39,310,311} + py{39,310,311,312} coverage minversion = 3.18 @@ -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} \ @@ -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 @@ -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 @@ -74,7 +75,6 @@ commands = pre-commit run --all-files [testenv:docs] -basepython = python3.9 changedir = docs extras = docs allowlist_externals = @@ -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