diff --git a/.copier-answers.yml b/.copier-answers.yml index d5b7082063b252549d5d307c3b90b862dba3bec6..db4dfe029ad3868f24fb3908ca7ecf9e9bb3b722 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: v0.1.5 +_commit: v0.1.6 _src_path: https://gitlab.softwareheritage.org/swh/devel/swh-py-template.git description: Software Heritage search service distribution_name: swh-search diff --git a/.gitignore b/.gitignore index 7c52cf6e01fd9e4515988281d12f1ac5780fcb80..3acdaf47e9a40baac43e331f20aec600a3cb18cd 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,10 @@ __pycache__ build/ dist/ +# these are symlinks created by a hook in swh-docs' main sphinx conf.py docs/README.rst docs/README.md +# this should be a symlink for people who want to build the sphinx doc +# without using tox, generally created by the swh-env/bin/update script +docs/Makefile.sphinx node_modules/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 44882702188264afb4d255160c59b98cc4f25d85..8957bec6128b471c890816598b471a0116b18f7e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,6 +28,9 @@ repos: - id: codespell name: Check source code spelling stages: [commit] + - id: codespell + name: Check commit message spelling + stages: [commit-msg] - repo: local hooks: diff --git a/docs/Makefile b/docs/Makefile index 85f23e85cc509781d834a056f103238fda40693e..8ac10a95e61bbfdd05dfccc4b998417c957b14f3 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1 +1 @@ -include swh-docs/Makefile.sphinx +include Makefile.sphinx diff --git a/pyproject.toml b/pyproject.toml index 3c76e26ca41bedb3e2613ff4ed1d76fc0affab02..264c2d0d673b7dd748abc34aee195c7820a0f2a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,3 +56,4 @@ use_parentheses = true ensure_newline_before_comments = true line_length = 88 force_sort_within_sections = true +known_first_party = ['swh'] diff --git a/pytest.ini b/pytest.ini index 7c078953c668140ff0d1d3d278ce4d7054dbdbe9..61aeeba048eb437f95fb87dda6a38d31f75e56c9 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,4 @@ [pytest] norecursedirs = build docs .* - asyncio_mode = strict +addopts = "--import-mode=importlib" diff --git a/tox.ini b/tox.ini index d250f6a1d3fdad83ea9251c2b1b2bd1f1b967ec5..9308888c47217389db4af53f2b1634b666520d69 100644 --- a/tox.ini +++ b/tox.ini @@ -14,20 +14,19 @@ deps = pytest-cov commands = pytest --doctest-modules \ - --import-mode importlib \ --rootdir {envsitepackagesdir} \ --cov={envsitepackagesdir}/swh/search \ --cov-branch \ {envsitepackagesdir}/swh/search \ {posargs} -# --rootdir and --import-mode 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). +# --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 deps = - black==22.10.0 + black==23.1.0 commands = {envpython} -m black --check swh @@ -63,4 +62,4 @@ setenv = # turn warnings into errors SPHINXOPTS = -W commands = - make -I {env_dir}/share/ -C docs + make -I {env_dir}/share/swh-docs -C docs