From ea1880d48734b271172497fc205ba7f28706ba2a Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Thu, 29 Aug 2024 22:32:35 +0300 Subject: Restructure RDF module. * gn3/api/metadata.py: Import constants from gn3.db.rdf * gn3/api/metadata_api/wiki.py: Ditto. Import "get_wiki_entries_by_symbol" from gn3.db.rdf.wiki. * gn3/db/constants.py: Delete file and move all constants ... * gn3/db/rdf.py: ... and functions ... * gn3/db/rdf/__init__.py: ... here. Signed-off-by: Munyoki Kilyungi --- gn3/api/metadata.py | 2 +- gn3/api/metadata_api/wiki.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'gn3/api') diff --git a/gn3/api/metadata.py b/gn3/api/metadata.py index 3f28f5d..6110880 100644 --- a/gn3/api/metadata.py +++ b/gn3/api/metadata.py @@ -15,7 +15,7 @@ from gn3.db.datasets import (retrieve_metadata, get_history) from gn3.db.rdf import (query_frame_and_compact, query_and_compact) -from gn3.db.constants import ( +from gn3.db.rdf import ( RDF_PREFIXES, BASE_CONTEXT, DATASET_CONTEXT, DATASET_SEARCH_CONTEXT, PUBLICATION_CONTEXT, diff --git a/gn3/api/metadata_api/wiki.py b/gn3/api/metadata_api/wiki.py index a4abef6..b9942a0 100644 --- a/gn3/api/metadata_api/wiki.py +++ b/gn3/api/metadata_api/wiki.py @@ -5,8 +5,8 @@ from typing import Any, Dict from flask import Blueprint, request, jsonify, current_app, make_response from gn3 import db_utils from gn3.db import wiki -from gn3.db.rdf import (query_frame_and_compact, - get_wiki_entries_by_symbol) +from gn3.db.rdf import query_frame_and_compact +from gn3.db.rdf.wiki import get_wiki_entries_by_symbol wiki_blueprint = Blueprint("wiki", __name__, url_prefix="wiki") -- cgit v1.2.3