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
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 9579
Build 14103: tox-on-jenkinsJenkins
Build 14102: arc lint + arc unit

Event Timeline

anlambert added a subscriber: anlambert.

Looks good !

swh/loader/git/__init__.py
9

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
5–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)