Improve the cli a bit and normalize the lister_db_url config
-
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
Activity
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DLS/job/tox/61/ See console output for more information: https://jenkins.softwareheritage.org/job/DLS/job/tox/61/console
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): 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 = { Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DLS/job/tox/62/ See console output for more information: https://jenkins.softwareheritage.org/job/DLS/job/tox/62/console
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DLS/job/tox/63/ See console output for more information: https://jenkins.softwareheritage.org/job/DLS/job/tox/63/console