From 970d9b287f80413304271301286099bc334a2d5b Mon Sep 17 00:00:00 2001 From: Mateusz Bysiek Date: Wed, 23 Apr 2025 00:01:32 +0900 Subject: [PATCH 1/7] chore: update copyright year --- NOTICE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NOTICE b/NOTICE index 6ec7893..b3a7d15 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ argunparse -Copyright (c) 2016-2022 Mateusz Bysiek https://mbdevpl.github.io/ +Copyright (c) 2016-2025 Mateusz Bysiek https://mbdevpl.github.io/ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From 689e2be8215a1f6548756ab8319f07ffb18f7b58 Mon Sep 17 00:00:00 2001 From: Mateusz Bysiek Date: Wed, 23 Apr 2025 00:06:00 +0900 Subject: [PATCH 2/7] build: remove python 3.8-3.10, add 3.12-3.13 --- .github/workflows/python.yml | 23 ++++++++++------------- Dockerfile | 2 +- requirements_ci.txt | 2 +- setup.py | 5 ++--- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 80fbbcf..2917f04 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -7,38 +7,35 @@ on: - $default-branch jobs: - test: + build: runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ['3.8', '3.9', '3.10', '3.11'] - + python-version: ['3.11', '3.12', '3.13'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - architecture: x64 - run: pip install -r requirements_ci.txt - run: python -m coverage run --branch --source . -m unittest -v - run: python -m coverage report --show-missing - - run: codecov + - run: python -m codecov --token ${{ secrets.CODECOV_TOKEN }} publish: if: startsWith(github.ref, 'refs/tags/v') - needs: test + needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.11' - architecture: x64 - - run: pip install build + python-version: '3.13' + - run: pip install build~=1.2 - run: python -m build - uses: pypa/gh-action-pypi-publish@release/v1 with: diff --git a/Dockerfile b/Dockerfile index 86b624b..6f47fc9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG PYTHON_VERSION="3.10" +ARG PYTHON_VERSION="3.13" FROM python:${PYTHON_VERSION} diff --git a/requirements_ci.txt b/requirements_ci.txt index 8a663dd..3557088 100644 --- a/requirements_ci.txt +++ b/requirements_ci.txt @@ -1,7 +1,7 @@ -r requirements_test.txt codecov ~= 2.1 coverage ~= 7.2 -flake518 ~= 1.6; python_version >= '3.9' +flake518 ~= 1.6 mypy ~= 1.5 pydocstyle ~= 6.3 pylint ~= 2.17 diff --git a/setup.py b/setup.py index 001f1d4..4221e25 100644 --- a/setup.py +++ b/setup.py @@ -18,10 +18,9 @@ class Package(boilerplates.setup.Package): 'Operating System :: MacOS', 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX :: Linux', - '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', + 'Programming Language :: Python :: 3.13', 'Programming Language :: Python :: 3 :: Only', 'Topic :: Scientific/Engineering', 'Topic :: Utilities', From fba1396d21532ce0adb2311b8e20f670f011832b Mon Sep 17 00:00:00 2001 From: Mateusz Bysiek Date: Wed, 23 Apr 2025 00:06:28 +0900 Subject: [PATCH 3/7] chore: housekeeping --- Dockerfile | 4 +++- argunparse/argument_unparser.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6f47fc9..36d6276 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,7 @@ RUN set -Eeuxo pipefail && \ echo ${AUX_GROUP_IDS} | xargs -n1 echo | xargs -I% addgroup --gid % group% && \ echo ${AUX_GROUP_IDS} | xargs -n1 echo | xargs -I% usermod --append --groups group% user -# prepare argunparse for testing +# install dependencies WORKDIR /home/user/argunparse @@ -39,6 +39,8 @@ COPY --chown=${USER_ID}:${GROUP_ID} requirements*.txt ./ RUN set -Eeuxo pipefail && \ pip3 install --no-cache-dir -r requirements_ci.txt +# prepare argunparse for testing + USER user VOLUME ["/home/user/argunparse"] diff --git a/argunparse/argument_unparser.py b/argunparse/argument_unparser.py index 99a55d9..b3e0649 100644 --- a/argunparse/argument_unparser.py +++ b/argunparse/argument_unparser.py @@ -19,7 +19,7 @@ def option_should_be_skipped(value: t.Any) -> bool: class ArgumentUnparser: """For performing reverse operation to what argparse.ArgumentParser does.""" - # pylint: disable=too-many-arguments + # pylint: disable = too-many-arguments def __init__( self, short_opt: str = '-', long_opt: str = '--', opt_value: str = '=', begin_delim: str = '"', end_delim: str = '"') -> None: From 4db7195b8018b346b7a94c6f9e55bccd5d45a02a Mon Sep 17 00:00:00 2001 From: Mateusz Bysiek Date: Wed, 23 Apr 2025 00:07:18 +0900 Subject: [PATCH 4/7] build: use latest boilerplate --- Jenkinsfile | 6 ++---- pyproject.toml | 4 +++- requirements.txt | 2 +- requirements_test.txt | 2 +- setup.py | 1 - 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6ff0ab1..89cdd71 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -94,8 +94,7 @@ pipeline { set -Eeuxo pipefail python3 -m twine upload \ dist/${PYTHON_PACKAGE.replace('-', '_')}-${VERSION}-py3-none-any.whl \ - dist/${PYTHON_PACKAGE}-${VERSION}.tar.gz \ - dist/${PYTHON_PACKAGE}-${VERSION}.zip + dist/${PYTHON_PACKAGE}-${VERSION}.tar.gz """ } } @@ -111,8 +110,7 @@ pipeline { script { githubUtils.createRelease([ "dist/${PYTHON_PACKAGE.replace('-', '_')}-${VERSION}-py3-none-any.whl", - "dist/${PYTHON_PACKAGE}-${VERSION}.tar.gz", - "dist/${PYTHON_PACKAGE}-${VERSION}.zip" + "dist/${PYTHON_PACKAGE}-${VERSION}.tar.gz" ]) } } diff --git a/pyproject.toml b/pyproject.toml index fa9155c..50ea9f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,8 @@ [build-system] +build-backend = 'setuptools.build_meta' requires = [ - 'boilerplates[setup] ~= 1.0' + 'boilerplates[setup] ~= 1.2', + 'version-query ~= 1.6' ] [tool.flake8] diff --git a/requirements.txt b/requirements.txt index e76d8b9..56ee5b3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -version-query ~= 1.5 +version-query ~= 1.6 diff --git a/requirements_test.txt b/requirements_test.txt index 7cc125b..7b7b701 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,2 +1,2 @@ -r requirements.txt -boilerplates[logging,packaging_tests] ~= 1.0 +boilerplates[logging,packaging_tests] ~= 1.2 diff --git a/setup.py b/setup.py index 4221e25..e597b2a 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,6 @@ class Package(boilerplates.setup.Package): 'Development Status :: 4 - Beta', 'Environment :: Console', 'Intended Audience :: Developers', - 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', 'Operating System :: MacOS', 'Operating System :: Microsoft :: Windows', From 0210758373360d9deb5438880da4c1a5fd76be66 Mon Sep 17 00:00:00 2001 From: Mateusz Bysiek Date: Wed, 23 Apr 2025 00:14:02 +0900 Subject: [PATCH 5/7] docs: update Python version in readme --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 366030a..460b8f0 100644 --- a/README.rst +++ b/README.rst @@ -79,7 +79,7 @@ For more examples see ``_ notebook. Requirements ============ -Python version 3.8 or later. +Python version 3.11 or later. Python libraries as specified in ``_. From 9f4e4fd563f99b55d58132e0c7ea6268ba873858 Mon Sep 17 00:00:00 2001 From: Mateusz Bysiek Date: Wed, 23 Apr 2025 00:14:13 +0900 Subject: [PATCH 6/7] build: add dependabot --- .github/dependabot.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..c048cd7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,20 @@ +version: 2 +updates: + - package-ecosystem: docker + directory: / + schedule: + interval: monthly + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly + - package-ecosystem: pip + directory: / + schedule: + interval: monthly + versioning-strategy: increase-if-necessary + ignore: + - dependency-name: >- + * + update-types: + - version-update:semver-patch From 42b2af19024e264a3247c0063bf9093887e0fcdd Mon Sep 17 00:00:00 2001 From: Mateusz Bysiek Date: Wed, 23 Apr 2025 00:18:32 +0900 Subject: [PATCH 7/7] chore: bump CI requirements --- requirements_ci.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements_ci.txt b/requirements_ci.txt index 3557088..0fe919a 100644 --- a/requirements_ci.txt +++ b/requirements_ci.txt @@ -4,5 +4,5 @@ coverage ~= 7.2 flake518 ~= 1.6 mypy ~= 1.5 pydocstyle ~= 6.3 -pylint ~= 2.17 -twine ~= 4.0 +pylint ~= 3.1 +twine ~= 6.1