Page MenuHomeSoftware Heritage

Improve the cli a bit and normalize the lister_db_url config
ClosedPublic

Authored by douardda on Feb 6 2019, 10:35 AM.

Details

Summary
  • Make the --lister option of the cli tool a variadic argument and add a 'all' possibel value for it, so that one can initialize all the database for all listers at once.
  • Add an entry point for the cli command
  • Change the lister_db_url config option into a 'lister' one

    with conventional structure { 'cls': cls, 'args': {}}

Bump dependencies

Diff Detail

Repository
rDLS Listers
Branch
wip2
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 4032
Build 5293: tox-on-jenkinsJenkins
Build 5292: arc lint + arc unit

Event Timeline

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/lister/cli.py
19–20

Why -f?

21–22

Nitpick: should be -C for consistency with the next option

This revision is now accepted and ready to land.Feb 6 2019, 11:01 AM
douardda added inline comments.
swh/lister/cli.py
19–20

because -d is already used, and -f for 'fill'. But any better idea is welcome :-)

swh/lister/cli.py
19–20

Oh indeed. -i? (and maybe rename the full option to --insert-data?)

douardda added inline comments.
swh/lister/cli.py
21–22

In fact, let's just kill this option! Why on earth would you use this command without this flag on?

douardda added inline comments.
swh/lister/cli.py
19–20

-i? (and maybe rename the full option to --insert-data?)

I am also tempted to kill this one too. Is there any reason one would NOT want to bootstrap the data? Or at least make it the default behavior...

Kill (useless) --create-tables and --with-data cli command options

ardumont added inline comments.
swh/lister/cli.py
19–20

as far as i remember only the debian lister needed some setup data to actually work.

Then, we could rework the other listers with a default function doing nothing.
And always calls that function.
Only the debian lister one would do something.

21–22

That was backward compatible with the existing code, that's it, i think.
I'm fine with removing this.

douardda retitled this revision from Improve the cli a bit and make normalize the lister_db_url config to Improve the cli a bit and normalize the lister_db_url config.Feb 6 2019, 4:10 PM
This revision was automatically updated to reflect the committed changes.