Skip to content

Commit 9ea57d1

Browse files
authored
Merge pull request #6 from mbdevpl/feature/packaging
refresh packaging
2 parents 9da8f59 + 42b2af1 commit 9ea57d1

12 files changed

Lines changed: 49 additions & 32 deletions

File tree

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: docker
4+
directory: /
5+
schedule:
6+
interval: monthly
7+
- package-ecosystem: github-actions
8+
directory: /
9+
schedule:
10+
interval: monthly
11+
- package-ecosystem: pip
12+
directory: /
13+
schedule:
14+
interval: monthly
15+
versioning-strategy: increase-if-necessary
16+
ignore:
17+
- dependency-name: >-
18+
*
19+
update-types:
20+
- version-update:semver-patch

.github/workflows/python.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,35 @@ on:
77
- $default-branch
88

99
jobs:
10-
test:
10+
build:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest, macos-latest, windows-latest]
15-
python-version: ['3.8', '3.9', '3.10', '3.11']
16-
15+
python-version: ['3.11', '3.12', '3.13']
1716
steps:
18-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1918
with:
2019
fetch-depth: 0
21-
- uses: actions/setup-python@v4
20+
- uses: actions/setup-python@v5
2221
with:
2322
python-version: ${{ matrix.python-version }}
24-
architecture: x64
2523
- run: pip install -r requirements_ci.txt
2624
- run: python -m coverage run --branch --source . -m unittest -v
2725
- run: python -m coverage report --show-missing
28-
- run: codecov
26+
- run: python -m codecov --token ${{ secrets.CODECOV_TOKEN }}
2927
publish:
3028
if: startsWith(github.ref, 'refs/tags/v')
31-
needs: test
29+
needs: build
3230
runs-on: ubuntu-latest
3331
steps:
34-
- uses: actions/checkout@v3
32+
- uses: actions/checkout@v4
3533
with:
3634
fetch-depth: 0
37-
- uses: actions/setup-python@v4
35+
- uses: actions/setup-python@v5
3836
with:
39-
python-version: '3.11'
40-
architecture: x64
41-
- run: pip install build
37+
python-version: '3.13'
38+
- run: pip install build~=1.2
4239
- run: python -m build
4340
- uses: pypa/gh-action-pypi-publish@release/v1
4441
with:

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PYTHON_VERSION="3.10"
1+
ARG PYTHON_VERSION="3.13"
22

33
FROM python:${PYTHON_VERSION}
44

@@ -30,7 +30,7 @@ RUN set -Eeuxo pipefail && \
3030
echo ${AUX_GROUP_IDS} | xargs -n1 echo | xargs -I% addgroup --gid % group% && \
3131
echo ${AUX_GROUP_IDS} | xargs -n1 echo | xargs -I% usermod --append --groups group% user
3232

33-
# prepare argunparse for testing
33+
# install dependencies
3434

3535
WORKDIR /home/user/argunparse
3636

@@ -39,6 +39,8 @@ COPY --chown=${USER_ID}:${GROUP_ID} requirements*.txt ./
3939
RUN set -Eeuxo pipefail && \
4040
pip3 install --no-cache-dir -r requirements_ci.txt
4141

42+
# prepare argunparse for testing
43+
4244
USER user
4345

4446
VOLUME ["/home/user/argunparse"]

Jenkinsfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ pipeline {
9494
set -Eeuxo pipefail
9595
python3 -m twine upload \
9696
dist/${PYTHON_PACKAGE.replace('-', '_')}-${VERSION}-py3-none-any.whl \
97-
dist/${PYTHON_PACKAGE}-${VERSION}.tar.gz \
98-
dist/${PYTHON_PACKAGE}-${VERSION}.zip
97+
dist/${PYTHON_PACKAGE}-${VERSION}.tar.gz
9998
"""
10099
}
101100
}
@@ -111,8 +110,7 @@ pipeline {
111110
script {
112111
githubUtils.createRelease([
113112
"dist/${PYTHON_PACKAGE.replace('-', '_')}-${VERSION}-py3-none-any.whl",
114-
"dist/${PYTHON_PACKAGE}-${VERSION}.tar.gz",
115-
"dist/${PYTHON_PACKAGE}-${VERSION}.zip"
113+
"dist/${PYTHON_PACKAGE}-${VERSION}.tar.gz"
116114
])
117115
}
118116
}

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
argunparse
2-
Copyright (c) 2016-2022 Mateusz Bysiek https://mbdevpl.github.io/
2+
Copyright (c) 2016-2025 Mateusz Bysiek https://mbdevpl.github.io/
33

44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ For more examples see `<examples.ipynb>`_ notebook.
7979
Requirements
8080
============
8181

82-
Python version 3.8 or later.
82+
Python version 3.11 or later.
8383

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

argunparse/argument_unparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def option_should_be_skipped(value: t.Any) -> bool:
1919
class ArgumentUnparser:
2020
"""For performing reverse operation to what argparse.ArgumentParser does."""
2121

22-
# pylint: disable=too-many-arguments
22+
# pylint: disable = too-many-arguments
2323
def __init__(
2424
self, short_opt: str = '-', long_opt: str = '--', opt_value: str = '=',
2525
begin_delim: str = '"', end_delim: str = '"') -> None:

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[build-system]
2+
build-backend = 'setuptools.build_meta'
23
requires = [
3-
'boilerplates[setup] ~= 1.0'
4+
'boilerplates[setup] ~= 1.2',
5+
'version-query ~= 1.6'
46
]
57

68
[tool.flake8]

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version-query ~= 1.5
1+
version-query ~= 1.6

requirements_ci.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
-r requirements_test.txt
22
codecov ~= 2.1
33
coverage ~= 7.2
4-
flake518 ~= 1.6; python_version >= '3.9'
4+
flake518 ~= 1.6
55
mypy ~= 1.5
66
pydocstyle ~= 6.3
7-
pylint ~= 2.17
8-
twine ~= 4.0
7+
pylint ~= 3.1
8+
twine ~= 6.1

0 commit comments

Comments
 (0)