RedHatInsights / aiops-insights-clustering

Clustering of systems
GNU General Public License v3.0
1 stars 14 forks source link

make tests run from pytest #24

Closed durandom closed 5 years ago

durandom commented 5 years ago
❯ make test
pipenv run pytest
Loading .env environment variables…
============================================================================== test session starts ==============================================================================
platform darwin -- Python 3.6.7, pytest-4.0.1, py-1.7.0, pluggy-0.8.0
rootdir: /Users/hild/src/aicoe/insights-aiops/aiops-insights-clustering, inifile:
collected 2 items

tests/test_clustering.py ..                                                                                                                                               [100%]

=============================================================================== warnings summary ================================================================================
tests/test_clustering.py::test_training
  /Users/hild/.local/share/virtualenvs/aiops-insights-clustering--0IA9VN8/lib/python3.6/site-packages/sklearn/preprocessing/data.py:625: DataConversionWarning: Data with input dtype uint8, int64, float64 were all converted to float64 by StandardScaler.
    return self.partial_fit(X, y)
  /Users/hild/.local/share/virtualenvs/aiops-insights-clustering--0IA9VN8/lib/python3.6/site-packages/sklearn/base.py:462: DataConversionWarning: Data with input dtype uint8, int64, float64 were all converted to float64 by StandardScaler.
    return self.fit(X, **fit_params).transform(X)

tests/test_clustering.py::test_inference
  /Users/hild/src/aicoe/insights-aiops/aiops-insights-clustering/clustering/inference.py:35: DataConversionWarning: Data with input dtype uint8, int64, float64 were all converted to float64 by StandardScaler.
    df_prepca_scaled = self.prepca_scaler.transform(self.data)

-- Docs: https://docs.pytest.org/en/latest/warnings.html
===================================================================== 2 passed, 3 warnings in 1.31 seconds ======================================================================

also added .travis.yml to run tests on travis

durandom commented 5 years ago

@TreeinRandomForest you might want to add some more meaningful tests :)

durandom commented 5 years ago

look with travis 💚

durandom commented 5 years ago

@TreeinRandomForest please review and merge if you like it

TreeinRandomForest commented 5 years ago

Looks good. Merging