Skip to content
Snippets Groups Projects

Improve the cli a bit and normalize the lister_db_url config

2 unresolved threads
  • 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


Migrated from D1083 (view on Phabricator)

Merge request reports

Closed by Phabricator Migration userPhabricator Migration user 6 years ago (Feb 6, 2019 3:13pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
16 19 '<http://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls>') # noqa
17 @click.option('--lister', required=1,
18 type=click.Choice(SUPPORTED_LISTERS),
19 help='Lister to act upon')
20 @click.option('--create-tables', is_flag=True, default=False,
21 help='create tables')
22 @click.option('--drop-tables', is_flag=True, default=False,
23 help='Drop tables')
24 @click.option('--with-data', is_flag=True, default=False,
25 help='Insert minimum required data')
26 def cli(db_url, lister, create_tables, drop_tables, with_data):
20 @click.argument('listers', required=1, nargs=-1,
21 type=click.Choice(SUPPORTED_LISTERS + ['all']))
22 @click.option('--drop-tables', '-D', is_flag=True, default=False,
23 help='Drop tables before creating the database schema')
24 def cli(db_url, listers, drop_tables):
  • vlorentz
    vlorentz @vlorentz started a thread on the diff
  • 21 help='create tables')
    22 @click.option('--drop-tables', is_flag=True, default=False,
    23 help='Drop tables')
    24 @click.option('--with-data', is_flag=True, default=False,
    25 help='Insert minimum required data')
    26 def cli(db_url, lister, create_tables, drop_tables, with_data):
    20 @click.argument('listers', required=1, nargs=-1,
    21 type=click.Choice(SUPPORTED_LISTERS + ['all']))
    22 @click.option('--drop-tables', '-D', is_flag=True, default=False,
    23 help='Drop tables before creating the database schema')
    24 def cli(db_url, listers, drop_tables):
    27 25 """Initialize db model according to lister.
    28 26
    29 27 """
    30 override_conf = {'lister_db_url': db_url}
    28 override_conf = {
  • Merge request was accepted

  • vlorentz approved this merge request

    approved this merge request

  • Author Maintainer

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

  • Author Maintainer

    Merge request was merged

  • closed

  • Please register or sign in to reply
    Loading