aboutsummaryrefslogtreecommitdiff
path: root/quality_control
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-04-11 14:00:30 +0300
committerFrederick Muriuki Muriithi2022-04-11 14:00:30 +0300
commit7bd0a4c58dc1d238027c593b24c2d783e88b8f49 (patch)
treeef78984ef3b7cf9cdec5005df5a4a06a253b06bb /quality_control
parenta126edd7a9f2a72bf744a34c57aa9cb23568ba29 (diff)
downloadgn-uploader-7bd0a4c58dc1d238027c593b24c2d783e88b8f49.tar.gz
Implement tests and stubs for functions under test
Diffstat (limited to 'quality_control')
-rw-r--r--quality_control/__init__.py4
-rw-r--r--quality_control/average.py7
-rw-r--r--quality_control/errors.py8
-rw-r--r--quality_control/standard_error.py7
4 files changed, 26 insertions, 0 deletions
diff --git a/quality_control/__init__.py b/quality_control/__init__.py
new file mode 100644
index 0000000..a5df3aa
--- /dev/null
+++ b/quality_control/__init__.py
@@ -0,0 +1,4 @@
+"""
+Quality Control (qc): contains the logic for testing validity of values in the
+ uploaded files.
+"""
diff --git a/quality_control/average.py b/quality_control/average.py
new file mode 100644
index 0000000..6ed0da7
--- /dev/null
+++ b/quality_control/average.py
@@ -0,0 +1,7 @@
+"""Contain logic for checking average files"""
+import re
+
+from .errors import InvalidValue
+
+def valid_value(val):
+ return None
diff --git a/quality_control/errors.py b/quality_control/errors.py
new file mode 100644
index 0000000..961ce8e
--- /dev/null
+++ b/quality_control/errors.py
@@ -0,0 +1,8 @@
+"""Hold exceptions for QC package"""
+
+class InvalidValue(Exception):
+ """Raised when a function encounters an invalid value"""
+
+ def __init__(self, args):
+ Exception.__init__(self, args)
+
diff --git a/quality_control/standard_error.py b/quality_control/standard_error.py
new file mode 100644
index 0000000..9a91d1b
--- /dev/null
+++ b/quality_control/standard_error.py
@@ -0,0 +1,7 @@
+"""Contain logic for checking standard error files"""
+import re
+
+from .errors import InvalidValue
+
+def valid_value(val):
+ return None