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 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..36d6276 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG PYTHON_VERSION="3.10" +ARG PYTHON_VERSION="3.13" FROM python:${PYTHON_VERSION} @@ -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/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/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. 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 ``_. 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: 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_ci.txt b/requirements_ci.txt index 8a663dd..0fe919a 100644 --- a/requirements_ci.txt +++ b/requirements_ci.txt @@ -1,8 +1,8 @@ -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 -twine ~= 4.0 +pylint ~= 3.1 +twine ~= 6.1 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 001f1d4..e597b2a 100644 --- a/setup.py +++ b/setup.py @@ -13,15 +13,13 @@ 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', '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',