diff --git a/cookiecutter.json b/cookiecutter.json index 4536dbab8d034a904465539e2a99ed12a3401786..1f29d355f8fcd56ebb3f1c5a3de8b49d748e60f6 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -1,6 +1,6 @@ { "project_name": "My Awesome App", "project_slug": "{{ cookiecutter.project_name.lower()|replace(' ', '_')|replace('-', '_')|replace('.', '_')|trim() }}", - "project_url": "git.astron.nl/{{cookiecutter.project_slug}}", + "project_url": "https://git.astron.nl/{{cookiecutter.project_slug}}", "description": "An example package for CI/CD working group" } diff --git a/{{cookiecutter.project_slug}}/.gitlab-ci.yml b/{{cookiecutter.project_slug}}/.gitlab-ci.yml index 85f5458cd4ce3b087fd0c8cff3d176df9c46ef2f..429482664900652365935d2c323b79eda4698a92 100644 --- a/{{cookiecutter.project_slug}}/.gitlab-ci.yml +++ b/{{cookiecutter.project_slug}}/.gitlab-ci.yml @@ -1,5 +1,7 @@ default: - image: $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG + image: + name: $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG + pull_policy: always before_script: - python --version # For debugging cache: @@ -83,7 +85,7 @@ run_unit_tests: - tox -e py3${PY_VERSION} parallel: matrix: # use the matrix for testing - - PY_VERSION: [8, 9, 10, 11] + - PY_VERSION: [9, 10, 11, 12] # Run code coverage on the base image thus also performing unit tests run_unit_tests_coverage: diff --git a/{{cookiecutter.project_slug}}/docker/ci-runner/Dockerfile b/{{cookiecutter.project_slug}}/docker/ci-runner/Dockerfile index e9aa9c7f7d25b9847af3a2df5b708f084bd6bd5d..48d4586f1eb2c4755b370b9bb4c5fe079c97fed8 100644 --- a/{{cookiecutter.project_slug}}/docker/ci-runner/Dockerfile +++ b/{{cookiecutter.project_slug}}/docker/ci-runner/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11 +FROM python:3.13 RUN python -m pip install --upgrade pip RUN pip install --upgrade tox twine cibuildwheel==2.13.1 diff --git a/{{cookiecutter.project_slug}}/docs/source/conf.py b/{{cookiecutter.project_slug}}/docs/source/conf.py index 4f02a28fdef1abb71da367df1ddd1b89f2a5bd3a..ed6c44c39574a67b5362244e24928df2fe3a1805 100644 --- a/{{cookiecutter.project_slug}}/docs/source/conf.py +++ b/{{cookiecutter.project_slug}}/docs/source/conf.py @@ -3,7 +3,7 @@ import os -from {{cookiecutter.project_slug}} import __version__ +from {{cookiecutter.project_slug}}._version import __version__ # -- General configuration ---------------------------------------------------- diff --git a/{{cookiecutter.project_slug}}/pyproject.toml b/{{cookiecutter.project_slug}}/pyproject.toml index 66c1c909e41dce1bef864d842cbbb53d9e9ac338..db601f122b76f82a3f3037ee7524cfb28c4a75ff 100644 --- a/{{cookiecutter.project_slug}}/pyproject.toml +++ b/{{cookiecutter.project_slug}}/pyproject.toml @@ -11,16 +11,17 @@ name = "{{cookiecutter.project_slug}}" dynamic = ["version"] description="{{cookiecutter.description}}" readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" classifiers = [ "Development Status :: 4 - Beta", - "License :: OSI Approved :: MIT License", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12" + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] [tool.scikit-build] diff --git a/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/__init__.py b/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/__init__.py index 35d0142800c927ba97b4c350de181c8d48f45f43..464c63571bac456284562270167cf78d03525c33 100644 --- a/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/__init__.py +++ b/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/__init__.py @@ -1,8 +1 @@ """ {{cookiecutter.project_name}} """ - -try: - from importlib import metadata -except ImportError: # for Python<3.8 - import importlib_metadata as metadata - -__version__ = metadata.version("{{cookiecutter.project_slug}}") diff --git a/{{cookiecutter.project_slug}}/tox.ini b/{{cookiecutter.project_slug}}/tox.ini index 4bc23290e77bc1fd67daaf2f573022f2f90fbc40..37d15bad2be87979a4fdcde0a6a0b12de4ffb991 100644 --- a/{{cookiecutter.project_slug}}/tox.ini +++ b/{{cookiecutter.project_slug}}/tox.ini @@ -1,15 +1,15 @@ [tox] # Generative environment list to test all supported Python versions -envlist = py3{8,9,10,11,12},black,pep8,pylint -minversion = 3.18.0 +envlist = py3{9,10,11,12,13},black,pep8,pylint +min_version = 4.3.3 +requires = + tox-ignore-env-name-mismatch >= 0.2.0 [testenv] package = sdist # 'Source' package required for binary extension use_develop = False # use_develop implies 'editable' package, not possible setenv = - LANGUAGE=en_US - LC_ALL=en_US.UTF-8 PYTHONWARNINGS=default::DeprecationWarning DYNAMIC_VERSION_SOURCE={toxinidir} deps = @@ -17,12 +17,12 @@ deps = -r{toxinidir}/tests/requirements.txt commands = {envpython} --version - {envpython} -m pytest + {envpython} -m pytest tests/{posargs} [testenv:coverage] commands = {envpython} --version - {envpython} -m pytest --cov-report term --cov-report xml --cov-report html --cov={{cookiecutter.project_slug}} + {envpython} -m pytest --cov-report term --cov-report xml --cov-report html --cov={{cookiecutter.project_slug}} tests/{posargs} # Use generative name and command prefixes to reuse the same virtualenv # for all linting jobs.