aboutsummaryrefslogtreecommitdiff
path: root/tests.local.sh
diff options
context:
space:
mode:
authornatsuoto <[email protected]>2026-04-28 17:15:32 +0530
committernatsuoto <[email protected]>2026-04-28 17:15:32 +0530
commitdef2e0846ae01a1415e9acc9f5104963386834eb (patch)
treeb99ea09e19ae7c0464dea1770d635512127f48b8 /tests.local.sh
parentf55b6d06b114a1e1a652ffd5203e31d1b9f41862 (diff)
downloadedify-def2e0846ae01a1415e9acc9f5104963386834eb.tar.xz
edify-def2e0846ae01a1415e9acc9f5104963386834eb.zip
chore: remove dead cookiecutter regeneration infrastructure
The repo was bootstrapped from `cookiecutter-pylibrary`. The regeneration scaffolding has been sitting around since then — unused, out of date, and in some cases pointing at infrastructure (AppVeyor) that hasn't been part of CI for years. Knock it all down in one sweep so there's nothing dead-by-design in the tree after this PR. Removed - `.cookiecutterrc` — cookiecutter regen metadata. - `ci/bootstrap.py` — entry point for regenerating workflow files from the templates. - `ci/templates/` (whole directory): - `.appveyor.yml` template (AppVeyor isn't wired up). - `.github/workflows/github-actions.yml` Jinja template (the live workflow has evolved past it via #32, #35, #37). Coupled updates - `tox.ini`: dropped the `[testenv:bootstrap]` env (calls deleted `bootstrap.py`) and the `bootstrap` reference in the basepython selector. - `MANIFEST.in`: removed `include .cookiecutterrc`. - `setup.cfg`: removed `ci/templates` from the flake8 `exclude` and isort `skip` lists (dead exclusion paths). - `.pre-commit-config.yaml`: removed `ci/templates` from the top-level `exclude` regex. - `tests.local.sh`: replaced the per-version `if/elif` chain (which still listed Python 3.7 and missed 3.12-3.14) with a single programmatic `tox -e py$VERSION` lookup against `tox --listenvs-all`. Self-maintaining when the matrix changes. - `CHANGELOG.rst`: added a Housekeeping bullet for this PR. Live and untouched - `ci/requirements.txt` is still installed by every CI workflow (`pip install -r ci/requirements.txt`). Not regen-related. Closes #46
Diffstat (limited to 'tests.local.sh')
-rwxr-xr-xtests.local.sh30
1 files changed, 8 insertions, 22 deletions
diff --git a/tests.local.sh b/tests.local.sh
index 730aeee..773e279 100755
--- a/tests.local.sh
+++ b/tests.local.sh
@@ -10,30 +10,16 @@ tox -e check -v
# Run Docs
tox -e docs -v
-# Get the current installed python version
-PYTHON_VERSION=$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')
+# Run the tox env matching the current Python version
+PY_NODOT=$(python3 -c 'import sys; print("{0.major}{0.minor}".format(sys.version_info))')
+TOX_ENV="py${PY_NODOT}"
-# Subset the python version to the major.minor version
-PYTHON_VERSION=$(echo $PYTHON_VERSION | cut -d. -f1,2)
-
-if [ "$PYTHON_VERSION" = "3.7" ]; then
- # Build using python 3.7
- tox -e py37 -v
-elif [ "$PYTHON_VERSION" = "3.8" ]; then
- # Build using python 3.8
- tox -e py38 -v
-elif [ "$PYTHON_VERSION" = "3.9" ]; then
- # Build using python 3.9
- tox -e py39 -v
-elif [ "$PYTHON_VERSION" = "3.10" ]; then
- # Build using python 3.10
- tox -e py310 -v
-elif [ "$PYTHON_VERSION" = "3.11" ]; then
- # Build using python 3.11
- tox -e py311 -v
+if tox --listenvs-all | grep -qE "^${TOX_ENV}$"; then
+ tox -e "${TOX_ENV}" -v
else
- # Show error message
- echo "Python version $PYTHON_VERSION is not supported"
+ PY_DOTTED=$(python3 -c 'import sys; print("{0.major}.{0.minor}".format(sys.version_info))')
+ echo "Python ${PY_DOTTED} (tox env ${TOX_ENV}) is not in tox envlist"
+ exit 1
fi
# Run Coverage