From 6e58cb5ffe3b145aa6ba9b7a54672e7a7f18a0b7 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Wed, 12 Oct 2022 15:50:33 +0300 Subject: Re-implement RDF related code to use monads in its own module * gn3/api/general.py: Replace gn3.db.datasets import with gn3.db.rdf. (dataset_metadata) : Replace datasets.dataset_metadata with rdf.get_dataset_metadata. * gn3/db/datasets.py: Remove unused imports. (sparql_query, dataset_metadata): Delete. * gn3/db/rdf.py: (sparql_query, get_dataset_metadata): New functions. --- gn3/api/general.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gn3/api') diff --git a/gn3/api/general.py b/gn3/api/general.py index e0bfc81..68b128b 100644 --- a/gn3/api/general.py +++ b/gn3/api/general.py @@ -7,7 +7,7 @@ from flask import request from gn3.fs_helpers import extract_uploaded_file from gn3.commands import run_cmd -from gn3.db import datasets +from gn3.db import rdf general = Blueprint("general", __name__) @@ -72,4 +72,4 @@ def run_r_qtl(geno_filestr, pheno_filestr): @general.route("/dataset/") def dataset_metadata(accession_id): """Return info as JSON for dataset with ACCESSION_ID.""" - return jsonify(datasets.dataset_metadata(accession_id)) + return jsonify(rdf.get_dataset_metadata(accession_id).data) -- cgit v1.2.3