diff options
-rw-r--r-- | scripts/load_phenotypes_to_db.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/load_phenotypes_to_db.py b/scripts/load_phenotypes_to_db.py index 360cfbb..116605f 100644 --- a/scripts/load_phenotypes_to_db.py +++ b/scripts/load_phenotypes_to_db.py @@ -252,12 +252,14 @@ def update_auth(authserver, token, species, population, dataset, xrefdata): return urljoin(authserver, endpoint) def __fetch_user_details__(): + logger.debug("… Fetching user details") return mrequests.get( authserveruri("/auth/user/"), headers=headers ) def __link_data__(user, group): + logger.debug("… linking uploaded data to user's group") return mrequests.post( authserveruri("/auth/data/link/phenotype"), headers=headers, @@ -267,6 +269,7 @@ def update_auth(authserver, token, species, population, dataset, xrefdata): }).then(lambda ld_results: (user, ld_results)) def __fetch_phenotype_category_details__(user, linkeddata): + logger.debug("… fetching phenotype category details") return mrequests.get( authserveruri("/auth/resource/categories"), headers=headers @@ -279,6 +282,7 @@ def update_auth(authserver, token, species, population, dataset, xrefdata): ) def __create_resource__(user, linkeddata, category): + logger.debug("… creating authorisation resource object") now = datetime.datetime.now().isoformat() return mrequests.post( authserveruri("/auth/resource/create"), @@ -291,6 +295,7 @@ def update_auth(authserver, token, species, population, dataset, xrefdata): }).then(lambda cr_results: (user, linkeddata, resource)) def __attach_data_to_resource__(user, linkeddata, resource): + logger.debug("… attaching data to authorisation resource object") return mrequests.post( authserveruri("/auth/resource/data/link"), headers=headers, @@ -385,7 +390,7 @@ def load_data(conn: mysqldb.Connection, job: dict) -> int: samples=samples, control_data=_control_data, filesdir=_outdir) - logger.info("Saved %s new phenotype sample counts rows.", num_n_rows) + logger.info("Saved %s new phenotype sample counts rows.", _num_n_rows) return (_species, _population, _dataset, _xrefs) |