aboutsummaryrefslogtreecommitdiff
path: root/scripts/migrate_existing_data.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/migrate_existing_data.py')
-rw-r--r--scripts/migrate_existing_data.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/migrate_existing_data.py b/scripts/migrate_existing_data.py
index 5c7e568..5097488 100644
--- a/scripts/migrate_existing_data.py
+++ b/scripts/migrate_existing_data.py
@@ -336,10 +336,7 @@ def assign_data_to_resource(authconn, bioconn, resource: Resource):
return assigner_fns[resource.resource_category.resource_category_key](
authconn, bioconn, resource)
-@click.command()
-@click.argument("authdbpath") # "Path to the Auth(entic|oris)ation database"
-@click.argument("mysqldburi") # "URI to the MySQL database with the biology data"
-def run(authdbpath, mysqldburi):
+def entry(authdbpath, mysqldburi):
"""Entry-point for data migration."""
if not Path(authdbpath).exists():
print(
@@ -360,5 +357,12 @@ def run(authdbpath, mysqldburi):
print(dnf.args[0], file=sys.stderr)
sys.exit(1)
+@click.command()
+@click.argument("authdbpath") # "Path to the Auth(entic|oris)ation database"
+@click.argument("mysqldburi") # "URI to the MySQL database with the biology data"
+def run(authdbpath, mysqldburi):
+ """Setup command-line arguments."""
+ entry(authdbpath, mysqldburi)
+
if __name__ == "__main__":
run() # pylint: disable=[no-value-for-parameter]