diff --git a/docs/README.rst b/docs/README.rst index 492778fcbcb967f2292cdd8725d4cc224c3d928b..26db8e8a90406cea411e4f1689b0d10e4dd5406e 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -1,4 +1,5 @@ -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. diff --git a/setup.py b/setup.py index aa521d866e304f51ea000d0e638446148cca7b33..be63d80d9d948075d0b633fb8354e324c6b9fdb5 100755 --- a/setup.py +++ b/setup.py @@ -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/", }, ) diff --git a/swh/foo/cli.py b/swh/foo/cli.py deleted file mode 100644 index 07c279b8cdeef5986709f957ad3dfb3dd9fa8e63..0000000000000000000000000000000000000000 --- a/swh/foo/cli.py +++ /dev/null @@ -1,19 +0,0 @@ -import click - -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) -@click.pass_context -def foo_cli_group(ctx): - """Foo main command. - """ - - -@foo_cli_group.command() -@click.option("--bar", help="Something") -@click.pass_context -def bar(ctx, bar): - """Do something.""" - click.echo("bar") diff --git a/swh/foo/__init__.py b/swh/scrubber/__init__.py similarity index 100% rename from swh/foo/__init__.py rename to swh/scrubber/__init__.py diff --git a/swh/foo/bar.py b/swh/scrubber/bar.py similarity index 100% rename from swh/foo/bar.py rename to swh/scrubber/bar.py diff --git a/swh/scrubber/cli.py b/swh/scrubber/cli.py new file mode 100644 index 0000000000000000000000000000000000000000..8bd7d7a260b22e5e62de65fffd6d5c9e1eb52e8a --- /dev/null +++ b/swh/scrubber/cli.py @@ -0,0 +1,11 @@ +import click + +from swh.core.cli import CONTEXT_SETTINGS +from swh.core.cli import swh as swh_cli_group + + +@swh_cli_group.group(name="scrubber", context_settings=CONTEXT_SETTINGS) +@click.pass_context +def scrubber_cli_group(ctx): + """main command of the datastore scrubber + """ diff --git a/swh/foo/py.typed b/swh/scrubber/py.typed similarity index 100% rename from swh/foo/py.typed rename to swh/scrubber/py.typed diff --git a/swh/foo/tests/__init__.py b/swh/scrubber/tests/__init__.py similarity index 100% rename from swh/foo/tests/__init__.py rename to swh/scrubber/tests/__init__.py diff --git a/swh/foo/tests/test_nothing.py b/swh/scrubber/tests/test_nothing.py similarity index 100% rename from swh/foo/tests/test_nothing.py rename to swh/scrubber/tests/test_nothing.py diff --git a/tox.ini b/tox.ini index c27d4abeb1b7b815226702c83023a86b3ac68d44..5913c011f4d230bc77550305f93a2eafe8d1afe6 100644 --- a/tox.ini +++ b/tox.ini @@ -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]