Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
danymukesha committed Jan 11, 2024
1 parent 8645831 commit abb2e3d
Show file tree
Hide file tree
Showing 18 changed files with 13 additions and 11 deletions.
Binary file removed dist/pca_pwa-1.0.4-py3-none-any.whl
Binary file not shown.
Binary file removed dist/pca_pwa-1.0.4.tar.gz
Binary file not shown.
Binary file modified dist/pca_pwa-1.0.5-py3-none-any.whl
Binary file not shown.
Binary file modified dist/pca_pwa-1.0.5.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
console.log("");
console.log("pca_pwa");
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@danymukesha/pca-pwa",
"version": "1.0.4",
"version": "1.0.5",
"description": "simplified manner for insights and decision-making by visualizing complex relationships with PCA web application",
"main": "index.js",
"directories": {
Expand All @@ -23,6 +23,6 @@
"@danymukesha:registry": "https://npm.pkg.github.com"
},
"keywords": [
"pca"
"pca" "danymukesha"
]
}
Binary file modified pca_pwa/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file not shown.
Binary file modified pca_pwa/__pycache__/app.cpython-311.pyc
Binary file not shown.
Binary file modified tests/__pycache__/test_app.cpython-311-pytest-7.4.4.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions tests/path
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="4" time="2.034" timestamp="2024-01-10T20:22:17.086864" hostname="FIR189"><testcase classname="tests.test_app" name="test_verion" time="0.005" /><testcase classname="tests.test_app.FlaskAppTestCase" name="test_index_route" time="0.019" /><testcase classname="tests.test_app.FlaskAppTestCase" name="test_perform_pca_route" time="0.004" /><testcase classname="tests.test_app.FlaskAppTestCase" name="test_save_results_to_folder" time="0.185" /></testsuite></testsuites>
13 changes: 7 additions & 6 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
from pca_pwa import app, __version__

def test_verion():
# Check app version
assert __version__ == '1.0.5'

class FlaskAppTestCase(unittest.TestCase):
def setUp(self):
# Create a test client
self.app = app.app.test_client()
self.app.testing = True

def tearDown(self):
pass

Expand Down Expand Up @@ -39,18 +40,18 @@ def test_perform_pca_route(self, mock_imputer, mock_pca):
response = self.app.post('/perform_pca', data={'file': str(mock_file), 'imputation_method': 'mean'})

self.assertEqual(response.status_code, 200)
# Add more assertions based on other expected behavior
# more assertions to be added based on other expected behavior

def test_save_results_to_folder(self):
# Extract data from the DataFrame
original_data = [["A", 1, 2], ["B", 3, 4]]
header = [row[0] for row in original_data]
data_array = [row[1:] for row in original_data]

pca = app.PCA(n_components=2)
transformed_data = pca.fit_transform(data_array)
base64_image_string = app.plot_pca(transformed_data, header, pca)

# Mock the result and folder path
result = {
'original_data': [[1, 2], [3, 4]],
Expand All @@ -66,7 +67,7 @@ def test_save_results_to_folder(self):
mock_mkdtemp.return_value = folder_path
app.save_results_to_folder(result, folder_path)

# Add assertions based on other expected behavior
# more assertions to be added based on other expected behavior

if __name__ == '__main__':
unittest.main()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.

0 comments on commit abb2e3d

Please sign in to comment.