fix: bugfix name of executable to CLI, edit (test) setup

The name of the executable to the CLI is reset to the earlier
`appendfilename`, and thus prevents collision with the one
by `guess-filename.py` (e.g., in `pipx`).  Multiple corrections
and amendments of running checks with pytest: i) retaining a
lighter `pytest.yml` to be used after each commit and push to
the GitHub repository, or as an initial check in incoming PRs
to the blessed repository.  ii) `tox.yml` to provide the
greater permutation of os runners and Python interpreters as
available to GitHub while probing with pytest -- for a manually
launched run.

Signed-off-by: Norwid Behrnd <nbehrnd@yahoo.com>
This commit is contained in:
Norwid Behrnd 2026-05-13 18:47:28 +02:00
commit 157632a6f0
No known key found for this signature in database
7 changed files with 81 additions and 11 deletions

View file

@ -44,6 +44,7 @@ jobs:
python -m pip install --upgrade pip
pip install .
pip install pytest
pip list
- name: run the check by pytest
run: |

39
.github/workflows/tox.yml vendored Normal file
View file

@ -0,0 +1,39 @@
name: CI_tox_appendfilename
# name : tox.yml
# purpose : run pytest on appendfilename
# date : [2026-05-13 Wed]
# edit :
on:
workflow_dispatch: # the manual trigger
# push:
# branches: [ dev, main ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install .
pip install pytest
pip install tox tox-gh-actions
pip list
- name: run tox' jobs (which GitHub happens to split in separate jobs)
run: tox

View file

@ -2,6 +2,7 @@
[project]
name = "appendfilename"
version = "2026.03.01.1"
requires-python = ">=3.10"
description = "Intelligent appending text to file names, considering file extensions and file tags"
license = "GPL-3.0-or-later"
readme = { file = "README.org", content-type = "text/plain" }
@ -17,13 +18,22 @@ keywords = [
"time",
"time-stamps"
]
# https://pypi.org/classifiers/
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"Operating System :: OS Independent"
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"pyreadline3>=3.5.4",
]
@ -34,7 +44,7 @@ dependencies = [
Homepage = "https://github.com/novoid/appendfilename"
[project.scripts]
guessfilename = "appendfilename:main"
appendfilename = "appendfilename:main"
[[tool.uv.index]]
name = "appendfilename"
@ -52,3 +62,17 @@ build-backend = "setuptools.build_meta"
[tool.mypy]
strict = true
ignore_missing_imports = true
[tool.pytest]
minversion = "9.0"
addopts = ["-ra"]
strict = true
testpaths = [
"tests"
]
markers = [
"default: test appendfilename's default string insertion",
"prepend: test appendfilename's optional -p/--prepend flag",
"smart_prepend: test appendfilename's optional --smart-prepend flag",
]

View file

@ -1,5 +0,0 @@
[pytest]
markers =
default: test appendfilename's default string insertion
prepend: test appendfilename's optional -p/--prepend flag
smart_prepend: test appendfilename's optional --smart-prepend flag

11
tox.ini Normal file
View file

@ -0,0 +1,11 @@
[tox]
envlist = py310, py311, py312, py313, py314
isolated_build = True
ignore_missing_interpreters = True
[testenv]
deps =
pytest
commands =
pytest

View file

@ -1,11 +1,11 @@
version = 1
revision = 3
requires-python = ">=3.13"
requires-python = ">=3.10"
[[package]]
name = "appendfilename"
version = "2025.5.14"
source = { virtual = "." }
version = "2026.3.1.1"
source = { editable = "." }
dependencies = [
{ name = "pyreadline3" },
]