Skip to content

Commit 6877116

Browse files
authored
Merge branch 'master' into fix-unbound-prefixes
2 parents 5f8000d + b6627e8 commit 6877116

13 files changed

Lines changed: 150 additions & 85 deletions

File tree

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ updates:
33
- package-ecosystem: "github-actions"
44
directory: "/"
55
schedule:
6-
interval: "weekly"
6+
interval: "monthly"
77
- package-ecosystem: "pip"
88
directory: "/"
99
schedule:
10-
interval: "weekly"
10+
interval: "monthly"

.github/workflows/ci-cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
strategy:
2222
matrix:
23-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
23+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
2424
steps:
2525
- uses: actions/checkout@v6
2626
- name: Set up Python ${{ matrix.python-version }}

.github/workflows/pr_towncrier.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Pull Request requires towncrier file
2+
3+
on:
4+
- pull_request
5+
6+
jobs:
7+
pr_require_towncrier_file:
8+
runs-on: ubuntu-latest
9+
if: github.event.pull_request.user.login != 'dependabot[bot]'
10+
steps:
11+
- uses: actions/checkout@v6
12+
- name: Ensure towncrier file exists
13+
env:
14+
PR_NUMBER: ${{ github.event.number }}
15+
run: |
16+
if [ ! -f "changes/${PR_NUMBER}.feature" ] && [ ! -f "changes/${PR_NUMBER}.bugfix" ] && [ ! -f "changes/${PR_NUMBER}.doc" ] && [ ! -f "changes/${PR_NUMBER}.removal" ] && [ ! -f "changes/${PR_NUMBER}.misc" ]; then
17+
echo "Towncrier file for #${PR_NUMBER} not found. Please add a changes file to the `changes/` directory. See README.rst for more information."
18+
exit 1
19+
fi

.pre-commit-config.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
args:
1212
- --safe
1313
- --quiet
14-
files: ^(async_upnp_client|tests)/.+\.py$
14+
files: ^(didl_lite|tests)/.+\.py$
1515
- repo: https://github.com/codespell-project/codespell
1616
rev: 'v2.4.1'
1717
hooks:
@@ -26,9 +26,9 @@ repos:
2626
hooks:
2727
- id: flake8
2828
additional_dependencies:
29-
- flake8-docstrings==1.6.0
30-
- pydocstyle==6.1.1
31-
files: ^(async_upnp_client|tests)/.+\.py$
29+
- flake8-docstrings==1.7.0
30+
- pydocstyle==6.3.0
31+
files: ^(didl_lite|tests)/.+\.py$
3232
- repo: https://github.com/PyCQA/isort
3333
rev: '7.0.0'
3434
hooks:
@@ -41,6 +41,5 @@ repos:
4141
- id: mypy
4242
args: [--ignore-missing-imports]
4343
additional_dependencies:
44-
- aiohttp>=3.7.4
45-
- pytest~=6.2.4
46-
files: ^(async_upnp_client|tests)/.+\.py$
44+
- pytest==9.0.2
45+
files: ^(didl_lite|tests)/.+\.py$

changes/37.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Migrate to pyproject.org style for versioning

changes/38.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update dev dependencies

didl_lite/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
"""DIDL-Lite (Digital Item Declaration Language) tools for Python."""
33

44
from didl_lite import didl_lite # noqa: F401
5+
6+
__version__ = "1.4.1"

didl_lite/didl_lite.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def __init__(
8787
**properties: Any,
8888
) -> None:
8989
"""Initialize."""
90-
# pylint: disable=invalid-name,redefined-builtin,too-many-arguments
90+
# pylint: disable=invalid-name,redefined-builtin,too-many-arguments,too-many-positional-arguments
9191
properties["id"] = id
9292
properties["parent_id"] = parent_id
9393
properties["class"] = self.upnp_class
@@ -628,7 +628,7 @@ def __init__(
628628
**properties: Any,
629629
) -> None:
630630
"""Initialize."""
631-
# pylint: disable=redefined-builtin,too-many-arguments
631+
# pylint: disable=redefined-builtin,too-many-arguments,too-many-positional-arguments
632632
super().__init__(id, parent_id, descriptors, xml_el, strict, **properties)
633633
self.extend(children)
634634

@@ -930,7 +930,7 @@ def __init__(
930930
xml_el: Optional[ET.Element] = None,
931931
) -> None:
932932
"""Initialize."""
933-
# pylint: disable=too-many-arguments
933+
# pylint: disable=too-many-arguments,too-many-positional-arguments
934934
self.uri = uri
935935
self.protocol_info = protocol_info
936936
self.import_uri = import_uri
@@ -1008,7 +1008,7 @@ def __init__(
10081008
xml_el: Optional[ET.Element] = None,
10091009
) -> None:
10101010
"""Initialize."""
1011-
# pylint: disable=invalid-name,redefined-builtin,too-many-arguments
1011+
# pylint: disable=invalid-name,redefined-builtin,too-many-arguments,too-many-positional-arguments
10121012
self.id = id
10131013
self.name_space = name_space
10141014
self.type = type

pyproject.toml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
[build-system]
2+
build-backend = "setuptools.build_meta"
3+
requires = ["setuptools>=77.0"]
4+
5+
[project]
6+
name = "python-didl-lite"
7+
license = "Apache-2.0"
8+
license-files = ["LICENSE.txt"]
9+
description = "DIDL-Lite (Digital Item Declaration Language) tools for Python"
10+
readme = "README.rst"
11+
authors = [{ name = "Steven Looman", email = "steven.looman@gmail.com" }]
12+
keywords = [
13+
"DIDL",
14+
"DIDL-lite"
15+
]
16+
classifiers = [
17+
"Development Status :: 5 - Production/Stable",
18+
"Intended Audience :: Developers",
19+
"Programming Language :: Python",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: 3.11",
22+
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
24+
"Programming Language :: Python :: 3.14",
25+
]
26+
requires-python = ">=3.10"
27+
dependencies = [
28+
"defusedxml>=0.6.0",
29+
]
30+
dynamic = ["version"]
31+
32+
[project.urls]
33+
"GitHub: repo" = "https://github.com/StevenLooman/python-didl-lite"
34+
35+
[project.optional-dependencies]
36+
test = [
37+
"pytest==9.0.2",
38+
]
39+
40+
[tool.setuptools]
41+
packages = ["didl_lite"]
42+
43+
[tool.setuptools.dynamic]
44+
version = { attr = "didl_lite.__version__" }
45+
46+
[tool.setuptools.package-data]
47+
didl_lite = ["py.typed"]
48+
49+
[tool.flake8]
50+
max-line-length = 99
51+
52+
[tool.mypy]
53+
check_untyped_defs = true
54+
disallow_untyped_calls = true
55+
disallow_untyped_defs = true
56+
disallow_incomplete_defs = true
57+
disallow_untyped_decorators = true
58+
no_implicit_optional = true
59+
warn_incomplete_stub = true
60+
warn_redundant_casts = true
61+
warn_return_any = true
62+
warn_unused_configs = true
63+
warn_unused_ignores = true

setup.cfg

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
1+
[bumpversion]
2+
current_version = 1.4.1
3+
commit = True
4+
tag = False
5+
tag_name = {new_version}
6+
17
[bdist_wheel]
28
python-tag=py3
39

410
[metadata]
511
license_file = LICENSE.md
612

713
[flake8]
8-
max-line-length = 99
14+
exclude = .venv,.git,.tox,docs,venv,bin,lib,deps,build
15+
max-line-length = 119
16+
max-complexity = 25
17+
ignore =
18+
E501,
19+
W503,
20+
E203,
21+
D202,
22+
W504
23+
noqa-require-code = True
924

1025
[mypy]
1126
check_untyped_defs = true
@@ -19,3 +34,9 @@ warn_redundant_casts = true
1934
warn_return_any = true
2035
warn_unused_configs = true
2136
warn_unused_ignores = true
37+
38+
[codespell]
39+
ignore-words-list = wan
40+
41+
[coverage:run]
42+
source = didl_lite

0 commit comments

Comments
 (0)