Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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
23 changes: 10 additions & 13 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION="3.10"
ARG PYTHON_VERSION="3.13"

FROM python:${PYTHON_VERSION}

Expand Down Expand Up @@ -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

Expand All @@ -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"]
6 changes: 2 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
}
}
Expand All @@ -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"
])
}
}
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ For more examples see `<examples.ipynb>`_ notebook.
Requirements
============

Python version 3.8 or later.
Python version 3.11 or later.

Python libraries as specified in `<requirements.txt>`_.

Expand Down
2 changes: 1 addition & 1 deletion argunparse/argument_unparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version-query ~= 1.5
version-query ~= 1.6
6 changes: 3 additions & 3 deletions requirements_ci.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
-r requirements.txt
boilerplates[logging,packaging_tests] ~= 1.0
boilerplates[logging,packaging_tests] ~= 1.2
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down