aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-08-28 17:40:56 -0500
committerFrederick Muriuki Muriithi2024-08-28 18:00:05 -0500
commitf95037b93329d5a4953b81ba1b58e4028a6274e8 (patch)
tree756659066daf92fd3e119864f6fca9ca7677d36d
parent06c6a7f7f42e8ff2d33a934ff695efde24d26d65 (diff)
downloadgn-uploader-f95037b93329d5a4953b81ba1b58e4028a6274e8.tar.gz
Fix imports, and minor bugs.
-rw-r--r--r_qtl/r_qtl2_qc.py3
-rw-r--r--uploader/base_routes.py6
-rw-r--r--uploader/expression_data/index.py3
3 files changed, 8 insertions, 4 deletions
diff --git a/r_qtl/r_qtl2_qc.py b/r_qtl/r_qtl2_qc.py
index 6f7b374..7b26b50 100644
--- a/r_qtl/r_qtl2_qc.py
+++ b/r_qtl/r_qtl2_qc.py
@@ -8,6 +8,7 @@ from r_qtl import r_qtl2 as rqtl2
from r_qtl import exceptions as rqe
from r_qtl.r_qtl2 import FILE_TYPES
from r_qtl.fileerrors import MissingFile
+from r_qtl.exceptions import InvalidFormat
from quality_control.errors import InvalidValue
from quality_control.checks import decimal_points_error
@@ -86,7 +87,7 @@ def missing_files(bundlesrc: Union[Path, ZipFile]) -> tuple[tuple[str, str], ...
return __missing_from_zipfile__(bundlesrc, cdata)
if isinstance(bundlesrc, Path):
if is_zipfile(bundlesrc):
- return __missing_from_zipfile__(ZipFile(bundlesrc, cdata))
+ return __missing_from_zipfile__(ZipFile(bundlesrc), cdata)
if bundlesrc.is_dir():
return __missing_from_dirpath__(bundlesrc, cdata)
raise InvalidFormat(
diff --git a/uploader/base_routes.py b/uploader/base_routes.py
index 39db31f..88247b2 100644
--- a/uploader/base_routes.py
+++ b/uploader/base_routes.py
@@ -1,7 +1,11 @@
"""Basic routes required for all pages"""
import os
-from flask import Blueprint, render_template, send_from_directory
+from flask import (
+ Blueprint,
+ render_template,
+ current_app as app,
+ send_from_directory)
from uploader.oauth2.client import user_logged_in
diff --git a/uploader/expression_data/index.py b/uploader/expression_data/index.py
index a334c51..799989e 100644
--- a/uploader/expression_data/index.py
+++ b/uploader/expression_data/index.py
@@ -12,8 +12,7 @@ from flask import (
redirect,
Blueprint,
render_template,
- current_app as app,
- send_from_directory)
+ current_app as app)
from uploader.db import species
from uploader.authorisation import require_login