Skip to content
Snippets Groups Projects
Commit bd14505a authored by David Douard's avatar David Douard
Browse files

Apply swh-py-template 0.1.6

parent 20e50eeb
Loading
# Changes here will be overwritten by Copier # 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 _src_path: https://gitlab.softwareheritage.org/swh/devel/swh-py-template.git
description: Software Heritage deposit server description: Software Heritage deposit server
distribution_name: swh-deposit distribution_name: swh-deposit
......
...@@ -8,5 +8,9 @@ ...@@ -8,5 +8,9 @@
__pycache__ __pycache__
build/ build/
dist/ dist/
# these are symlinks created by a hook in swh-docs' main sphinx conf.py
docs/README.rst docs/README.rst
docs/README.md 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
...@@ -31,6 +31,9 @@ repos: ...@@ -31,6 +31,9 @@ repos:
name: Check source code spelling name: Check source code spelling
args: [-L sur] args: [-L sur]
stages: [commit] stages: [commit]
- id: codespell
name: Check commit message spelling
stages: [commit-msg]
- repo: local - repo: local
hooks: hooks:
......
include swh-docs/Makefile.sphinx include Makefile.sphinx
APIDOC_EXCLUDES += ../swh/*/settings/* APIDOC_EXCLUDES += ../swh/*/settings/*
......
...@@ -63,3 +63,4 @@ use_parentheses = true ...@@ -63,3 +63,4 @@ use_parentheses = true
ensure_newline_before_comments = true ensure_newline_before_comments = true
line_length = 88 line_length = 88
force_sort_within_sections = true force_sort_within_sections = true
known_first_party = ['swh']
[pytest] [pytest]
# Remove the pytest_swh_* entries when they stop getting imported automatically # Remove the pytest_swh_* entries when they stop getting imported automatically
addopts = --ignore=swh/deposit/settings -p no:flask -p no:pytest_swh_scheduler -p no:pytest_swh_storage -p no:pytest_swh_core addopts = --import-mode=importlib --ignore=swh/deposit/settings -p no:flask -p no:pytest_swh_scheduler -p no:pytest_swh_storage -p no:pytest_swh_core
norecursedirs = build docs .* norecursedirs = build docs .*
asyncio_mode = strict
DJANGO_SETTINGS_MODULE = swh.deposit.settings.testing DJANGO_SETTINGS_MODULE = swh.deposit.settings.testing
markers = markers =
db: execute tests using a postgresql database db: execute tests using a postgresql database
fs: execute tests using the filesystem fs: execute tests using the filesystem
asyncio_mode = strict
...@@ -21,21 +21,20 @@ deps = ...@@ -21,21 +21,20 @@ deps =
django3: Django>=3,<4 django3: Django>=3,<4
commands = commands =
pytest --doctest-modules \ pytest --doctest-modules \
--import-mode importlib \
--rootdir {envsitepackagesdir} \ --rootdir {envsitepackagesdir} \
--cov={envsitepackagesdir}/swh/deposit \ --cov={envsitepackagesdir}/swh/deposit \
--cov-branch \ --cov-branch \
--ignore {envsitepackagesdir}/swh/deposit/settings/ \ --ignore {envsitepackagesdir}/swh/deposit/settings/ \
{envsitepackagesdir}/swh/deposit \ {envsitepackagesdir}/swh/deposit \
{posargs} {posargs}
# --rootdir and --import-mode are required to make tests that depends # --rootdir (with --import-mode from pytest.ini) are required to make tests
# on the test file to be a proper submodule of the swh namespace after # that depends on the test file to be a proper submodule of the swh namespace
# migration to PEP420 (implicit namespace). # after migration to PEP420 (implicit namespace).
[testenv:black] [testenv:black]
skip_install = true skip_install = true
deps = deps =
black==22.10.0 black==23.1.0
commands = commands =
{envpython} -m black --check swh {envpython} -m black --check swh
...@@ -73,4 +72,4 @@ setenv = ...@@ -73,4 +72,4 @@ setenv =
# turn warnings into errors # turn warnings into errors
SPHINXOPTS = -W SPHINXOPTS = -W
commands = commands =
make -I {env_dir}/share/ -C docs make -I {env_dir}/share/swh-docs -C docs
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment