aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kabui2021-04-06 22:30:02 +0300
committerAlexander Kabui2021-04-06 22:30:02 +0300
commitea610aa797d4c859fa9b9fa59a1eaa86ff7fd41c (patch)
tree86131edaf05446afcff702d9215b627a0759a501
parenta301093ce9ea825606db29bd1f1f40e1971897dd (diff)
downloadgenenetwork3-ea610aa797d4c859fa9b9fa59a1eaa86ff7fd41c.tar.gz
delete unnecessary functions and comments
-rw-r--r--gn3/api/datasets.py5
-rw-r--r--gn3/api/traits.py5
-rw-r--r--gn3/computations/datasets.py2
-rw-r--r--gn3/computations/traits.py5
-rw-r--r--tests/integration/test_traits.py6
-rw-r--r--tests/unit/computations/test_trait.py6
6 files changed, 2 insertions, 27 deletions
diff --git a/gn3/api/datasets.py b/gn3/api/datasets.py
index eb4097d..a6951fb 100644
--- a/gn3/api/datasets.py
+++ b/gn3/api/datasets.py
@@ -10,11 +10,6 @@ from gn3.experimental_db import database_connector
dataset = Blueprint("dataset", __name__)
-@dataset.route("/")
-def dataset_home():
- """initial test endpont for dataset"""
- return jsonify({"results": "ok"})
-
@dataset.route("/create/<dataset_name>/")
@dataset.route("/create/<dataset_name>/<dataset_type>")
diff --git a/gn3/api/traits.py b/gn3/api/traits.py
index 758dcca..cf445e1 100644
--- a/gn3/api/traits.py
+++ b/gn3/api/traits.py
@@ -12,11 +12,6 @@ from gn3.experimental_db import database_connector
trait = Blueprint("trait", __name__)
-@trait.route("/")
-def home():
- """initial endpoint for traits"""
- return jsonify({"results": "success"})
-
@trait.route("/<string:trait_name>/<string:dataset_name>")
def create_trait(trait_name, dataset_name):
diff --git a/gn3/computations/datasets.py b/gn3/computations/datasets.py
index 3664e4a..57e1fe1 100644
--- a/gn3/computations/datasets.py
+++ b/gn3/computations/datasets.py
@@ -317,5 +317,7 @@ def get_traits_data(sample_ids, database_instance, dataset_name, dataset_type):
dataset_type, dataset_type,
full_dataset_type))
+ # print(query)
+
_results = fetch_from_db_sample_data(query, database_instance)
return {}
diff --git a/gn3/computations/traits.py b/gn3/computations/traits.py
index 38072ed..1aa2970 100644
--- a/gn3/computations/traits.py
+++ b/gn3/computations/traits.py
@@ -2,11 +2,6 @@
from gn3.computations.datasets import retrieve_trait_sample_data
-def compute_sum(rhs_val: int, lhs_val: int) -> int:
- """initial function for trait module"""
- return rhs_val + lhs_val
-
-
def fetch_trait(dataset, trait_name: str, database) -> dict:
"""this method creates a trait by\
fetching required data given the\
diff --git a/tests/integration/test_traits.py b/tests/integration/test_traits.py
index 7cf0a9f..426bdd7 100644
--- a/tests/integration/test_traits.py
+++ b/tests/integration/test_traits.py
@@ -12,12 +12,6 @@ class TraitIntegrationTest(TestCase):
def setUp(self):
self.app = create_app().test_client()
- def test_home(self):
- """test for initial endpoint for trait"""
- results = self.app.get("/api/trait", follow_redirects=True)
-
- self.assertEqual(200, results.status_code)
-
@mock.patch("gn3.api.traits.fetch_trait")
def test_create_trait(self, mock_fetch_trait):
"""test the endpoint for creating traits\
diff --git a/tests/unit/computations/test_trait.py b/tests/unit/computations/test_trait.py
index 49c08d4..cdd8078 100644
--- a/tests/unit/computations/test_trait.py
+++ b/tests/unit/computations/test_trait.py
@@ -2,7 +2,6 @@
from unittest import TestCase
from unittest import mock
-from gn3.computations.traits import compute_sum
from gn3.computations.traits import fetch_trait
from gn3.computations.traits import get_trait_sample_data
from gn3.computations.traits import get_trait_info_data
@@ -11,11 +10,6 @@ from gn3.computations.traits import get_trait_info_data
class TestTrait(TestCase):
"""class contains tests for creating traits"""
- def test_sum(self):
- """initial faling tests"""
- results = compute_sum(2, 5)
- self.assertEqual(results, 7)
-
@mock.patch("gn3.computations.traits.get_trait_sample_data")
def test_fetch_trait(self, get_sample_data):
"""test for creating/fetching trait"""