Skip to content
Snippets Groups Projects
Commit a8fd08b5 authored by Corné Lukken's avatar Corné Lukken
Browse files

Update cookiecutter.json

parent bcaaca91
No related branches found
No related tags found
1 merge request!8Update cookiecutter.json
{ {
"project_name": "My Awesome App", "project_name": "My Awesome App",
"project_slug": "{{ cookiecutter.project_name.lower()|replace(' ', '_')|replace('-', '_')|replace('.', '_')|trim() }}", "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" "description": "An example package for CI/CD working group"
} }
default: 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: before_script:
- python --version # For debugging - python --version # For debugging
cache: cache:
...@@ -83,7 +85,7 @@ run_unit_tests: ...@@ -83,7 +85,7 @@ run_unit_tests:
- tox -e py3${PY_VERSION} - tox -e py3${PY_VERSION}
parallel: parallel:
matrix: # use the matrix for testing 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 code coverage on the base image thus also performing unit tests
run_unit_tests_coverage: run_unit_tests_coverage:
......
FROM python:3.11 FROM python:3.13
RUN python -m pip install --upgrade pip RUN python -m pip install --upgrade pip
RUN pip install --upgrade tox twine cibuildwheel==2.13.1 RUN pip install --upgrade tox twine cibuildwheel==2.13.1
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
import os import os
from {{cookiecutter.project_slug}} import __version__ from {{cookiecutter.project_slug}}._version import __version__
# -- General configuration ---------------------------------------------------- # -- General configuration ----------------------------------------------------
......
...@@ -11,16 +11,17 @@ name = "{{cookiecutter.project_slug}}" ...@@ -11,16 +11,17 @@ name = "{{cookiecutter.project_slug}}"
dynamic = ["version"] dynamic = ["version"]
description="{{cookiecutter.description}}" description="{{cookiecutter.description}}"
readme = "README.md" readme = "README.md"
requires-python = ">=3.8" requires-python = ">=3.9"
classifiers = [ classifiers = [
"Development Status :: 4 - Beta", "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 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12" "Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
] ]
[tool.scikit-build] [tool.scikit-build]
......
""" {{cookiecutter.project_name}} """ """ {{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}}")
[tox] [tox]
# Generative environment list to test all supported Python versions # Generative environment list to test all supported Python versions
envlist = py3{8,9,10,11,12},black,pep8,pylint envlist = py3{9,10,11,12,13},black,pep8,pylint
minversion = 3.18.0 min_version = 4.3.3
requires =
tox-ignore-env-name-mismatch >= 0.2.0
[testenv] [testenv]
package = sdist # 'Source' package required for binary extension package = sdist # 'Source' package required for binary extension
use_develop = False # use_develop implies 'editable' package, not possible use_develop = False # use_develop implies 'editable' package, not possible
setenv = setenv =
LANGUAGE=en_US
LC_ALL=en_US.UTF-8
PYTHONWARNINGS=default::DeprecationWarning PYTHONWARNINGS=default::DeprecationWarning
DYNAMIC_VERSION_SOURCE={toxinidir} DYNAMIC_VERSION_SOURCE={toxinidir}
deps = deps =
...@@ -17,12 +17,12 @@ deps = ...@@ -17,12 +17,12 @@ deps =
-r{toxinidir}/tests/requirements.txt -r{toxinidir}/tests/requirements.txt
commands = commands =
{envpython} --version {envpython} --version
{envpython} -m pytest {envpython} -m pytest tests/{posargs}
[testenv:coverage] [testenv:coverage]
commands = commands =
{envpython} --version {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 # Use generative name and command prefixes to reuse the same virtualenv
# for all linting jobs. # for all linting jobs.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment