Skip to content

Commit 0f96095

Browse files
committed
refactor: align packaging metadata and CI for 2.0.3
1 parent 965b10f commit 0f96095

5 files changed

Lines changed: 85 additions & 19 deletions

File tree

.github/workflows/codecov_tests.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
python-version: ['3.11']
12+
python-version: ['3.11', '3.12', '3.13', '3.14']
1313

1414
steps:
1515
- uses: actions/checkout@v6
@@ -19,20 +19,29 @@ jobs:
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121

22-
- name: Add path to PYTHONPATH
23-
run: |
24-
echo "PYTHONPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
25-
2622
- name: Install dependencies
2723
run: |
2824
python -m pip install --upgrade pip
2925
pip install uv
3026
uv sync --dev
3127
32-
- name: Run tests with coverage
28+
- name: Run Ruff
29+
if: ${{ matrix.python-version == '3.11' }}
30+
run: uv run ruff check .
31+
32+
- name: Run Pyright
33+
if: ${{ matrix.python-version == '3.11' }}
34+
run: uv run pyright backpack tests
35+
36+
- name: Run tests
37+
if: ${{ matrix.python-version != '3.11' }}
38+
run: uv run pytest
39+
40+
- name: Run tests with branch coverage
41+
if: ${{ matrix.python-version == '3.11' }}
3342
run: |
34-
uv run coverage run --source=backpack -m pytest
35-
uv run coverage report -m --fail-under=70
43+
uv run coverage run --branch --source=backpack -m pytest
44+
uv run coverage report -m --fail-under=99
3645
uv run coverage xml
3746
3847
- name: Upload coverage.xml

backpack/version.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
# 1.1.4 07/2025 - Moved from pipenv to poetry for dependency management.toml
1212
# 2.0.1 05/2026 - Remove tox workflow and setup.py, standardize uv + coverage tooling
1313
# 2.0.2 05/2026 - Add PyPI long description metadata and release polish
14+
# 2.0.3 06/2026 - Add type hints to backpack.cache, backpack.folder_utils, backpack.json_user_settings, backpack.json_utils, and backpack.logger, refactor backpack.cache to use functools.lru_cache, and add tests for backpack.cache and backpack.folder_utils.
1415
# ----------------------------------------------------------------------------------------
1516

16-
VERSION_MAJOR = 2
17-
VERSION_MINOR = 0
18-
VERSION_PATCH = 2
17+
__version__ = '2.0.3'
1918

20-
version = f'{VERSION_MAJOR}.{VERSION_MINOR}.{VERSION_PATCH}'
19+
VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH = map(int, __version__.split('.'))
20+
21+
version = __version__
2122

2223
app_name = 'python-backpack'

pyproject.toml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,31 @@
11
[project]
22
name = "python-backpack"
3-
version = "2.0.2"
4-
description = "A collection of personal scripts for json, File/Folder Operations, String Validation, Custom Errors, Cache and stuff."
5-
readme = "README.md"
3+
dynamic = ["version"]
4+
description = "Lightweight utilities for JSON, filesystem operations, strings, caching, and scripting."
5+
readme = { file = "README.md", content-type = "text/markdown" }
6+
license = "GPL-3.0-only"
7+
license-files = ["LICENSE"]
68
authors = [
7-
{ name = "Maximiliano Rocamora" }
9+
{ name = "Maximiliano Rocamora", email = "maxirocamora@gmail.com" }
810
]
11+
keywords = ["cache", "filesystem", "json", "strings", "utilities"]
912
requires-python = ">=3.11"
1013
dependencies = []
14+
classifiers = [
15+
"Development Status :: 4 - Beta",
16+
"Intended Audience :: Developers",
17+
"Programming Language :: Python :: 3",
18+
"Programming Language :: Python :: 3.11",
19+
"Programming Language :: Python :: 3.12",
20+
"Programming Language :: Python :: 3.13",
21+
"Programming Language :: Python :: 3.14",
22+
"Topic :: Software Development :: Libraries :: Python Modules",
23+
"Topic :: Utilities",
24+
]
25+
26+
[project.urls]
27+
Homepage = "https://github.com/MaxRocamora/python-backpack"
28+
Repository = "https://github.com/MaxRocamora/python-backpack.git"
1129

1230
[dependency-groups]
1331
dev = [
@@ -16,6 +34,7 @@ dev = [
1634
"mock>=5.2.0",
1735
"pytest>=9.0.3",
1836
"pytest-cov>=7.1.0",
37+
"pyright>=1.1.411",
1938
]
2039

2140
[build-system]
@@ -25,6 +44,9 @@ build-backend = "hatchling.build"
2544
[tool.hatch.build.targets.wheel]
2645
packages = ["backpack"]
2746

47+
[tool.hatch.version]
48+
path = "backpack/version.py"
49+
2850
[tool.pytest.ini_options]
2951
addopts = "-p no:cacheprovider"
3052
testpaths = ["tests"]

ruff.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ select = ["D", "F", "N", "I", "W"]
1313
ignore = ["E402", "D100", "D202", "D101", "D104"]
1414

1515
[lint.per-file-ignores]
16-
# Ignore `E402` (import violations) in all `__init__.py` files.
17-
"__init__.py" = ["E402"]
16+
# Ignore `E402` (import violations) and `N999` (invalid module name) in all
17+
# `__init__.py` files. `N999` is triggered by the repository/package layout on
18+
# this project, not by an actionable module rename inside the repo.
19+
"__init__.py" = ["E402", "N999"]
1820

1921
[lint.pydocstyle]
2022
convention = "google" # Accepts: "google", "numpy", or "pep257".

uv.lock

Lines changed: 33 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)