diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index d8fee52..5f0d3ac 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -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: | diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml new file mode 100644 index 0000000..da706d5 --- /dev/null +++ b/.github/workflows/tox.yml @@ -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 + diff --git a/license.txt b/LICENSE similarity index 100% rename from license.txt rename to LICENSE diff --git a/pyproject.toml b/pyproject.toml index b79bfa7..7250125 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", +] + diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index f986737..0000000 --- a/pytest.ini +++ /dev/null @@ -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 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..349f964 --- /dev/null +++ b/tox.ini @@ -0,0 +1,11 @@ +[tox] +envlist = py310, py311, py312, py313, py314 +isolated_build = True +ignore_missing_interpreters = True + +[testenv] +deps = + pytest +commands = + pytest + diff --git a/uv.lock b/uv.lock index 21015ca..deeaf87 100644 --- a/uv.lock +++ b/uv.lock @@ -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" }, ]