Page MenuHomeSoftware Heritage

git: Unify loaders constructor + register worker (tasks, cli)
ClosedPublic

Authored by ardumont on Dec 5 2019, 3:44 PM.

Details

Summary

With this commit, we stop passing parameters to the load method. We pass those
parameters to the loader's constructor.

  • tasks: Rename task according to production
  • loader.git: Register git worker

Related to T2134

Test Plan

tox

Diff Detail

Repository
rDLDG Git loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

anlambert added a subscriber: anlambert.

Looks good !

swh/loader/git/__init__.py
9 ↗(On Diff #8455)

s/Mapping/Dict/

This revision is now accepted and ready to land.Dec 6 2019, 1:24 PM
swh/loader/git/tests/test_tasks.py
6

You should use the mocker fixture from pytest-mock instead

  • tests: Migrate to pytest-mock's fixture
  • tasks: Use celery's shared_task decorator

Adapt according to review (missed)