-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
199 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from CLUEstering.CLUEstering import clusterer | ||
from CLUEstering.CLUEstering import test_blobs | ||
from CLUEstering.CLUEstering import test_blobs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,14 @@ | |
|
||
__version__ = "1.4.0" | ||
this_directory = Path(__file__).parent | ||
long_description = (this_directory/'README.md').read_text() | ||
long_description = (this_directory / 'README.md').read_text() | ||
|
||
ext_modules = [ | ||
Pybind11Extension( | ||
"CLUEsteringCPP", | ||
['CLUEstering/binding.cc'], | ||
include_dirs = ['CLUEstering/include/'] | ||
), | ||
Pybind11Extension( | ||
"CLUEsteringCPP", | ||
['CLUEstering/binding.cc'], | ||
include_dirs=['CLUEstering/include/'] | ||
), | ||
] | ||
|
||
setup( | ||
|
@@ -21,18 +21,18 @@ | |
author_email="[email protected]", | ||
description='''A library that generalizes the original 2-dimensional CLUE | ||
algorithm made at CERN.''', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
packages=find_packages(), | ||
install_requires=['scikit-learn','numpy','matplotlib','pandas'], | ||
ext_modules=ext_modules, | ||
keywords=['Python','Clustering','Binding'], | ||
python_requires='>=3.7', | ||
classifiers=[ | ||
'Intended Audience :: Developers', | ||
'Programming Language :: Python :: 3', | ||
'Operating System :: Unix', | ||
'Operating System :: MacOS :: MacOS X', | ||
'Operating System :: Microsoft :: Windows', | ||
] | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
packages=find_packages(), | ||
install_requires=['scikit-learn', 'numpy', 'matplotlib', 'pandas'], | ||
ext_modules=ext_modules, | ||
keywords=['Python', 'Clustering', 'Binding'], | ||
python_requires='>=3.7', | ||
classifiers=[ | ||
'Intended Audience :: Developers', | ||
'Programming Language :: Python :: 3', | ||
'Operating System :: Unix', | ||
'Operating System :: MacOS :: MacOS X', | ||
'Operating System :: Microsoft :: Windows', | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
from filecmp import cmp | ||
import CLUEstering as clue | ||
import numpy as np | ||
import os | ||
import pandas as pd | ||
import pytest | ||
import sys | ||
sys.path.insert(1, '../CLUEstering/') | ||
import CLUEstering as clue | ||
from filecmp import cmp | ||
|
||
|
||
@pytest.fixture | ||
def blobs(): | ||
return pd.read_csv("./test_datasets/blob.csv") | ||
|
||
|
||
def test_blobs_clustering(blobs): | ||
# Check if the output file already exists and if it does, delete it | ||
if os.path.isfile('./blobs_output.csv'): | ||
os.remove('./blobs_output.csv') | ||
|
||
c = clue.clusterer(0.8,5,1.5) | ||
c = clue.clusterer(0.8, 5, 1.5) | ||
c.read_data(blobs) | ||
c.run_clue() | ||
c.to_csv('./','blobs_output.csv') | ||
c.to_csv('./', 'blobs_output.csv') | ||
|
||
assert cmp('./blobs_output.csv', './test_datasets/truth_files/blobs_truth.csv') | ||
assert cmp('./blobs_output.csv', | ||
'./test_datasets/truth_files/blobs_truth.csv') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.