From f1e7c22108a05c1544ac26d8720a0349e635a0b1 Mon Sep 17 00:00:00 2001 From: David Douard <david.douard@sdfa3.org> Date: Fri, 29 Mar 2024 11:38:06 +0100 Subject: [PATCH] Apply swh-py-template v0.2.0 --- .copier-answers.yml | 2 +- .pre-commit-config.yaml | 11 ++++++++++- pytest.ini | 2 +- tox.ini | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.copier-answers.yml b/.copier-answers.yml index 5207740..4ab44bd 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: v0.1.6 +_commit: v0.2.0 _src_path: https://gitlab.softwareheritage.org/swh/devel/swh-py-template.git description: Software Heritage authentication utilities distribution_name: swh-auth diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8957bec..9d45821 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,4 +41,13 @@ repos: pass_filenames: false language: system types: [python] - + - id: twine-check + name: twine check + description: call twine check when pushing an annotated release tag + entry: bash -c "ref=$(git describe) && + [[ $ref =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && + (python3 -m build --sdist && twine check $(ls -t dist/* | head -1)) || true" + pass_filenames: false + stages: [pre-push] + language: python + additional_dependencies: [twine, build] diff --git a/pytest.ini b/pytest.ini index 732e3bd..3f6ba89 100644 --- a/pytest.ini +++ b/pytest.ini @@ -2,5 +2,5 @@ addopts = -p no:flask norecursedirs = build docs .* asyncio_mode = strict -DJANGO_SETTINGS_MODULE = swh.auth.tests.django.app.apptest.settings consider_namespace_packages = true +DJANGO_SETTINGS_MODULE = swh.auth.tests.django.app.apptest.settings diff --git a/tox.ini b/tox.ini index 386638c..75af834 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ envlist = py3 [testenv] -use_develop = true +usedevelop = true extras = testing django -- GitLab