Skip to content
Snippets Groups Projects
Commit 5e030a65 authored by vlorentz's avatar vlorentz
Browse files

Replace template defauts

parent d3519064
No related merge requests found
Software Heritage - Python module template
==========================================
Software Heritage - Datastore Scrubber
======================================
Python module template, used as skeleton to create new modules.
Tools to periodically checks data integrity in swh-storage and swh-objstorage,
reports errors, and (try to) fix them.
......@@ -36,18 +36,15 @@ def parse_requirements(*names):
return requirements
# Edit this part to match your module, replace foo by its name
# Full sample:
# https://forge.softwareheritage.org/diffusion/DCORE/browse/master/setup.py
setup(
name="swh.foo", # example: swh.loader.pypi
description="Software Heritage <Module's intent>",
name="swh.scrubber", # example: swh.loader.pypi
description="Software Heritage Datastore Scrubber",
long_description=long_description,
long_description_content_type="text/x-rst",
python_requires=">=3.7",
author="Software Heritage developers",
author_email="swh-devel@inria.fr",
url="https://forge.softwareheritage.org/diffusion/<module-git-code>",
url="https://forge.softwareheritage.org/diffusion/swh-scrubber",
packages=find_packages(), # packages's modules
install_requires=parse_requirements(None, "swh"),
tests_require=parse_requirements("test"),
......@@ -57,7 +54,7 @@ setup(
include_package_data=True,
entry_points="""
[swh.cli.subcommands]
foo=swh.foo.cli
scrubber=swh.scrubber.cli
""",
classifiers=[
"Programming Language :: Python :: 3",
......@@ -69,7 +66,7 @@ setup(
project_urls={
"Bug Reports": "https://forge.softwareheritage.org/maniphest",
"Funding": "https://www.softwareheritage.org/donate",
"Source": "https://forge.softwareheritage.org/source/swh-<module>",
"Documentation": "https://docs.softwareheritage.org/devel/swh-<module>/",
"Source": "https://forge.softwareheritage.org/source/swh-scrubber",
"Documentation": "https://docs.softwareheritage.org/devel/swh-scrubber/",
},
)
File moved
File moved
......@@ -4,16 +4,8 @@ from swh.core.cli import CONTEXT_SETTINGS
from swh.core.cli import swh as swh_cli_group
@swh_cli_group.group(name="foo", context_settings=CONTEXT_SETTINGS)
@swh_cli_group.group(name="scrubber", context_settings=CONTEXT_SETTINGS)
@click.pass_context
def foo_cli_group(ctx):
"""Foo main command.
def scrubber_cli_group(ctx):
"""main command of the datastore scrubber
"""
@foo_cli_group.command()
@click.option("--bar", help="Something")
@click.pass_context
def bar(ctx, bar):
"""Do something."""
click.echo("bar")
File moved
File moved
File moved
......@@ -8,8 +8,8 @@ deps =
pytest-cov
commands =
pytest --doctest-modules \
{envsitepackagesdir}/swh/foo \
--cov={envsitepackagesdir}/swh/foo \
{envsitepackagesdir}/swh/scrubber \
--cov={envsitepackagesdir}/swh/scrubber \
--cov-branch {posargs}
[testenv:black]
......
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