From c9f35e54d5d894051ceb446d1dce54915dcb20f6 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 7 Aug 2023 07:19:16 +0300 Subject: Update module name/path Change from gn3 to gn_auth --- gn_auth/auth/authorisation/data/genotypes.py | 10 ++++---- gn_auth/auth/authorisation/data/mrna.py | 10 ++++---- gn_auth/auth/authorisation/data/phenotypes.py | 10 ++++---- gn_auth/auth/authorisation/data/views.py | 34 +++++++++++++-------------- 4 files changed, 32 insertions(+), 32 deletions(-) (limited to 'gn_auth/auth/authorisation/data') diff --git a/gn_auth/auth/authorisation/data/genotypes.py b/gn_auth/auth/authorisation/data/genotypes.py index 8f901a5..41822a1 100644 --- a/gn_auth/auth/authorisation/data/genotypes.py +++ b/gn_auth/auth/authorisation/data/genotypes.py @@ -4,11 +4,11 @@ from typing import Iterable from MySQLdb.cursors import DictCursor -import gn3.auth.db as authdb -import gn3.db_utils as gn3db -from gn3.auth.dictify import dictify -from gn3.auth.authorisation.checks import authorised_p -from gn3.auth.authorisation.groups.models import Group +import gn_auth.auth.db as authdb +import gn_auth.db_utils as gn3db +from gn_auth.auth.dictify import dictify +from gn_auth.auth.authorisation.checks import authorised_p +from gn_auth.auth.authorisation.groups.models import Group def linked_genotype_data(conn: authdb.DbConnection) -> Iterable[dict]: """Retrive genotype data that is linked to user groups.""" diff --git a/gn_auth/auth/authorisation/data/mrna.py b/gn_auth/auth/authorisation/data/mrna.py index bdfc5c1..0b08571 100644 --- a/gn_auth/auth/authorisation/data/mrna.py +++ b/gn_auth/auth/authorisation/data/mrna.py @@ -3,11 +3,11 @@ import uuid from typing import Iterable from MySQLdb.cursors import DictCursor -import gn3.auth.db as authdb -import gn3.db_utils as gn3db -from gn3.auth.dictify import dictify -from gn3.auth.authorisation.checks import authorised_p -from gn3.auth.authorisation.groups.models import Group +import gn_auth.auth.db as authdb +import gn_auth.db_utils as gn3db +from gn_auth.auth.dictify import dictify +from gn_auth.auth.authorisation.checks import authorised_p +from gn_auth.auth.authorisation.groups.models import Group def linked_mrna_data(conn: authdb.DbConnection) -> Iterable[dict]: """Retrieve mRNA Assay data that is linked to user groups.""" diff --git a/gn_auth/auth/authorisation/data/phenotypes.py b/gn_auth/auth/authorisation/data/phenotypes.py index ff98295..2f4c564 100644 --- a/gn_auth/auth/authorisation/data/phenotypes.py +++ b/gn_auth/auth/authorisation/data/phenotypes.py @@ -4,11 +4,11 @@ from typing import Any, Iterable from MySQLdb.cursors import DictCursor -import gn3.auth.db as authdb -import gn3.db_utils as gn3db -from gn3.auth.dictify import dictify -from gn3.auth.authorisation.checks import authorised_p -from gn3.auth.authorisation.groups.models import Group +import gn_auth.auth.db as authdb +import gn_auth.db_utils as gn3db +from gn_auth.auth.dictify import dictify +from gn_auth.auth.authorisation.checks import authorised_p +from gn_auth.auth.authorisation.groups.models import Group def linked_phenotype_data( authconn: authdb.DbConnection, gn3conn: gn3db.Connection, diff --git a/gn_auth/auth/authorisation/data/views.py b/gn_auth/auth/authorisation/data/views.py index 8adf862..a25e9a2 100644 --- a/gn_auth/auth/authorisation/data/views.py +++ b/gn_auth/auth/authorisation/data/views.py @@ -10,31 +10,31 @@ from MySQLdb.cursors import DictCursor from authlib.integrations.flask_oauth2.errors import _HTTPException from flask import request, jsonify, Response, Blueprint, current_app as app -import gn3.db_utils as gn3db -from gn3 import jobs -from gn3.commands import run_async_cmd -from gn3.db.traits import build_trait_name +import gn_auth.db_utils as gn3db +from gn_auth import jobs +from gn_auth.commands import run_async_cmd +from gn_auth.db.traits import build_trait_name -from gn3.auth import db -from gn3.auth.db_utils import with_db_connection +from gn_auth.auth import db +from gn_auth.auth.db_utils import with_db_connection -from gn3.auth.authorisation.checks import require_json -from gn3.auth.authorisation.errors import InvalidData, NotFoundError +from gn_auth.auth.authorisation.checks import require_json +from gn_auth.auth.authorisation.errors import InvalidData, NotFoundError -from gn3.auth.authorisation.groups.models import group_by_id +from gn_auth.auth.authorisation.groups.models import group_by_id -from gn3.auth.authorisation.users.models import user_resource_roles +from gn_auth.auth.authorisation.users.models import user_resource_roles -from gn3.auth.authorisation.resources.checks import authorised_for -from gn3.auth.authorisation.resources.models import ( +from gn_auth.auth.authorisation.resources.checks import authorised_for +from gn_auth.auth.authorisation.resources.models import ( user_resources, public_resources, attach_resources_data) -from gn3.auth.authentication.users import User -from gn3.auth.authentication.oauth2.resource_server import require_oauth +from gn_auth.auth.authentication.users import User +from gn_auth.auth.authentication.oauth2.resource_server import require_oauth -from gn3.auth.authorisation.data.phenotypes import link_phenotype_data -from gn3.auth.authorisation.data.mrna import link_mrna_data, ungrouped_mrna_data -from gn3.auth.authorisation.data.genotypes import ( +from gn_auth.auth.authorisation.data.phenotypes import link_phenotype_data +from gn_auth.auth.authorisation.data.mrna import link_mrna_data, ungrouped_mrna_data +from gn_auth.auth.authorisation.data.genotypes import ( link_genotype_data, ungrouped_genotype_data) data = Blueprint("data", __name__) -- cgit v1.2.3