diff --git a/Dockerfile b/Dockerfile index 5731cbe..ccf6603 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,13 +26,13 @@ RUN mkdir $HOME/datasets ENV CODE $HOME/mozi_snet_service RUN mkdir $CODE +RUN wget -O grpc-proxy https://github.com/improbable-eng/grpc-web/releases/download/0.6.3/grpcwebproxy-0.6.3-linux-x86_64 +RUN chmod 755 grpc-proxy + COPY requirements.txt $CODE/requirements.txt WORKDIR $CODE RUN pip install -r requirements.txt COPY . $CODE -RUN wget -O grpc-proxy https://github.com/improbable-eng/grpc-web/releases/download/0.6.3/grpcwebproxy-0.6.3-linux-x86_64 -RUN chmod 755 grpc-proxy -RUN chmod 755 build.sh && ./build.sh - +RUN chmod 755 build.sh && ./build.sh \ No newline at end of file diff --git a/service_metadata.ropsten.json b/service_metadata.ropsten.json index 5d6a581..611473b 100644 --- a/service_metadata.ropsten.json +++ b/service_metadata.ropsten.json @@ -25,6 +25,6 @@ ], "service_description": { "url": "https://mozi-ai.github.io/moses-service/", - "description": "The service uses the OpenCog meta optimising semantic evolutionary search algorithm MOSES to generate a supervised binary classification model of genomic or other high dimensional binary feature data sets using boolean regression" + "description": "The service uses the OpenCog meta optimising semantic evolutionary search algorithm MOSES to generate a supervised binary classification model of genomic or other high dimensional binary feature data sets using evolutionary methods" } } \ No newline at end of file diff --git a/snetd_configs/snetd.kovan.json b/snetd_configs/snetd.kovan.json index b295076..6c78367 100644 --- a/snetd_configs/snetd.kovan.json +++ b/snetd_configs/snetd.kovan.json @@ -1,5 +1,5 @@ { - "daemon_end_point": "https://mozi.ai/moses-service", + "daemon_end_point": "0.0.0.0:5002", "ethereum_json_rpc_endpoint": "https://kovan.infura.io", "ipfs_end_point": "http://ipfs.singularitynet.io:80", "registry_address_key": "0xe331bf20044a5b24c1a744abc90c1fd711d2c08d", diff --git a/tests/test_start_analysis.py b/tests/test_start_analysis.py index e1d8ab1..ad9182e 100644 --- a/tests/test_start_analysis.py +++ b/tests/test_start_analysis.py @@ -28,7 +28,8 @@ def setUp(self): @patch("pymongo.MongoClient") @patch("task.task_runner.CrossValidation") - def test_start_analysis(self, cross_val, client): + @patch("task.task_runner.write_dataset") + def test_start_analysis(self, write_dataset, cross_val, client): mock_db = mongomock.MongoClient().db client().__getitem__.return_value = mock_db session = { @@ -37,8 +38,8 @@ def test_start_analysis(self, cross_val, client): "filter_opts": {"score": "precision", "value": 0.4} } - mock_db.sessions.insert_one(session) cross_val.return_value.run_folds.return_value = "Run folds" + write_dataset.return_value = ("", "") start_analysis.delay(**session) @@ -48,7 +49,8 @@ def test_start_analysis(self, cross_val, client): @patch("pymongo.MongoClient") @patch("task.task_runner.CrossValidation") - def test_start_analysis_error_path(self, cross_val, client): + @patch("task.task_runner.write_dataset") + def test_start_analysis_error_path(self, write_dataset, cross_val, client): mock_db = mongomock.MongoClient().db client().__getitem__.return_value = mock_db session = { @@ -57,8 +59,8 @@ def test_start_analysis_error_path(self, cross_val, client): "filter_opts": {"score": "precision", "value": 0.4} } - mock_db.sessions.insert_one(session) cross_val.side_effect = Exception("Mock exception") + write_dataset.return_value = ("", "") self.assertRaises(Exception, start_analysis.delay(**session))