Commit Diff


commit - fe21f18737c77ec9ab00a0c1f022b37de6ee7224
commit + b15a37c16318dbf1784f9762b4f978431b3eebb9
blob - 1fbba4a498b5677619961c563f9f11aca14c3724
blob + 827571b9b41886e68a340f19f564838394d2c5be
--- .copier-answers.yml
+++ .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 git loader
 distribution_name: swh-loader-git
blob - 8957bec6128b471c890816598b471a0116b18f7e
blob + 9d458216bd8207d9dca53030c622dedb2e6a883f
--- .pre-commit-config.yaml
+++ .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]
blob - c265218fe142d378912cb2a930b143d2c7d15355
blob + 7877cd5b3d5cea41bf55bc46a6c2cb22d2207d7b
--- pytest.ini
+++ pytest.ini
@@ -1,8 +1,9 @@
 [pytest]
 norecursedirs = build docs .*
 asyncio_mode = strict
+consider_namespace_packages = true
+
 addopts =
-    --import-mode=importlib
     -p no:pytest_swh_scheduler
     -p no:pytest_swh_storage
 
blob - 3539325a73579dd48908209b72a5c9e4017e56fa
blob + 302bd858e5dfca537a9326b5b4a0fa01bba14f39
--- requirements-test.txt
+++ requirements-test.txt
@@ -1,4 +1,4 @@
-pytest
+pytest >= 8.1
 pytest-mock
 requests_mock
 swh.scheduler[testing] >= 0.5.0
blob - 935b34bc2f0a2476a8281ee993d62bf798041693
blob + b8a415bd8956df21c6ab2f16252bc25283e41d65
--- tox.ini
+++ tox.ini
@@ -7,20 +7,17 @@ envlist =
   py3
 
 [testenv]
+usedevelop = true
 extras =
   testing
 deps =
   pytest-cov
 commands =
   pytest --doctest-modules \
-         --rootdir {envsitepackagesdir} \
-         --cov={envsitepackagesdir}/swh/loader/git \
+         --cov=swh/loader/git \
          --cov-branch \
-         {envsitepackagesdir}/swh/loader/git \
+         swh/loader/git \
          {posargs}
-# --rootdir (with --import-mode from pytest.ini) are required to make tests
-# that depends on the test file to be a proper submodule of the swh namespace
-# after migration to PEP420 (implicit namespace).
 
 [testenv:black]
 skip_install = true