aboutsummaryrefslogtreecommitdiff
path: root/scripts/migrate_existing_data.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-05-26 13:21:33 +0300
committerFrederick Muriuki Muriithi2023-05-26 13:21:33 +0300
commitfe075ee5c8852fddc0a229d1b90d77bff9dca003 (patch)
tree0c60079bf5b6eca22e75a63540b4ab22936af78f /scripts/migrate_existing_data.py
parent88d4f61e4df7dcffaaed083989c75ee9ad4a48a4 (diff)
downloadgenenetwork3-fe075ee5c8852fddc0a229d1b90d77bff9dca003.tar.gz
Document CLI Utility Commands
Document some CLI utility commands useful for development and for supporting the operation of the GN3 app.
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]