Skip to content
Snippets Groups Projects
Commit 7e72b91c authored by Jenkins for Software Heritage's avatar Jenkins for Software Heritage
Browse files

New upstream version 5.9.6

parents 8996470a fcfb7004
No related branches found
Tags debian/upstream/5.9.6
No related merge requests found
Pipeline #3764 passed with stage
in 0 seconds
Metadata-Version: 2.1
Name: swh.lister
Version: 5.9.5
Version: 5.9.6
Summary: Software Heritage lister
Home-page: https://forge.softwareheritage.org/diffusion/DLSGH/
Author: Software Heritage developers
......
Metadata-Version: 2.1
Name: swh.lister
Version: 5.9.5
Version: 5.9.6
Summary: Software Heritage lister
Home-page: https://forge.softwareheritage.org/diffusion/DLSGH/
Author: Software Heritage developers
......
# Copyright (C) 2018-2021 the Software Heritage developers
# Copyright (C) 2018-2023 the Software Heritage developers
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
......@@ -8,9 +8,9 @@ from .lister import PyPILister
@shared_task(name=f"{__name__}.PyPIListerTask")
def list_pypi():
def list_pypi(**lister_args):
"Full listing of the PyPI registry"
lister = PyPILister.from_configfile()
lister = PyPILister.from_configfile(**lister_args)
return lister.run().dict()
......
# Copyright (C) 2019-2021 The Software Heritage developers
# Copyright (C) 2019-2023 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
......@@ -21,10 +21,13 @@ def test_pypi_full_lister(
lister.from_configfile.return_value = lister
lister.run.return_value = ListerStats(pages=1, origins=0)
res = swh_scheduler_celery_app.send_task("swh.lister.pypi.tasks.PyPIListerTask")
kwargs = dict(enable_origins=False)
res = swh_scheduler_celery_app.send_task(
"swh.lister.pypi.tasks.PyPIListerTask", kwargs=kwargs
)
assert res
res.wait()
assert res.successful()
lister.from_configfile.assert_called_once_with()
lister.from_configfile.assert_called_once_with(**kwargs)
lister.run.assert_called_once_with()
# Copyright (C) 2019-2021 the Software Heritage developers
# Copyright (C) 2019-2023 the Software Heritage developers
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
......@@ -10,15 +10,17 @@ from swh.lister.sourceforge.lister import SourceForgeLister
@shared_task(name=__name__ + ".FullSourceForgeLister")
def list_sourceforge_full() -> Dict[str, int]:
def list_sourceforge_full(**lister_args) -> Dict[str, int]:
"""Full update of a SourceForge instance"""
return SourceForgeLister.from_configfile().run().dict()
return SourceForgeLister.from_configfile(**lister_args).run().dict()
@shared_task(name=__name__ + ".IncrementalSourceForgeLister")
def list_sourceforge_incremental() -> Dict[str, int]:
"""Full update of a SourceForge instance"""
return SourceForgeLister.from_configfile(incremental=True).run().dict()
def list_sourceforge_incremental(**lister_args) -> Dict[str, int]:
"""Incremental update of a SourceForge instance"""
return (
SourceForgeLister.from_configfile(incremental=True, **lister_args).run().dict()
)
@shared_task(name=__name__ + ".ping")
......
# Copyright (C) 2019-2021 The Software Heritage developers
# Copyright (C) 2019-2023 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
......@@ -24,14 +24,16 @@ def test_sourceforge_full_lister_task(
mock_lister.from_configfile.return_value = mock_lister
mock_lister.run.return_value = stats
kwargs = dict(enable_origins=False)
res = swh_scheduler_celery_app.send_task(
"swh.lister.sourceforge.tasks.FullSourceForgeLister"
"swh.lister.sourceforge.tasks.FullSourceForgeLister",
kwargs=kwargs,
)
assert res
res.wait()
assert res.successful()
mock_lister.from_configfile.assert_called_once()
mock_lister.from_configfile.assert_called_once_with(**kwargs)
mock_lister.run.assert_called_once()
assert res.result == stats.dict()
......@@ -45,12 +47,12 @@ def test_incremental_listing(
mock_lister.run.return_value = stats
res = swh_scheduler_celery_app.send_task(
"swh.lister.sourceforge.tasks.IncrementalSourceForgeLister"
"swh.lister.sourceforge.tasks.IncrementalSourceForgeLister",
)
assert res
res.wait()
assert res.successful()
mock_lister.from_configfile.assert_called_once()
mock_lister.from_configfile.assert_called_once_with(incremental=True)
mock_lister.run.assert_called_once()
assert res.result == stats.dict()
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