-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature clusterer import method #76
Conversation
d = clue.clusterer(20., 10., 20.) | ||
d.import_clusterer('./', 'test_sissa_import.csv') | ||
|
||
assert c.clust_prop == d.clust_prop |
Check notice
Code scanning / Bandit (reported by Codacy)
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test
''' | ||
''' | ||
|
||
from check_result import check_result |
Check warning
Code scanning / Prospector (reported by Codacy)
Unused check_result imported from check_result (unused-import) Warning test
from check_result import check_result | ||
import os | ||
import sys | ||
import pandas as pd |
Check warning
Code scanning / Prospector (reported by Codacy)
Unable to import 'pandas' (import-error) Warning test
import os | ||
import sys | ||
import pandas as pd | ||
import pytest |
Check warning
Code scanning / Prospector (reported by Codacy)
Unable to import 'pytest' (import-error) Warning test
import pandas as pd | ||
import pytest | ||
sys.path.insert(1, '../CLUEstering/') | ||
import CLUEstering as clue |
Check warning
Code scanning / Prospector (reported by Codacy)
Import "import CLUEstering as clue" should be placed at the top of the module (wrong-import-position) Warning test
|
||
assert c.clust_prop == d.clust_prop | ||
|
||
if __name__ == "__main__": |
Check warning
Code scanning / Prospector (reported by Codacy)
expected 2 blank lines after class or function definition, found 1 (E305) Warning test
@@ -0,0 +1,47 @@ | |||
''' |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Similar lines in 2 files Warning test
''' | ||
''' | ||
|
||
from check_result import check_result |
Check notice
Code scanning / Pylintpython3 (reported by Codacy)
Unused check_result imported from check_result Note test
''' | ||
|
||
from check_result import check_result | ||
import os |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
standard import "import os" should be placed before "from check_result import check_result" Warning test
|
||
from check_result import check_result | ||
import os | ||
import sys |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
standard import "import sys" should be placed before "from check_result import check_result" Warning test
if os.path.isfile('./test_sissa_import.csv'): | ||
os.remove('./test_sissa_import.csv') | ||
|
||
c = clue.clusterer(20., 10., 20.) |
Check notice
Code scanning / Pylintpython3 (reported by Codacy)
Redefining name 'c' from outer scope (line 39) Note test
if os.path.isfile('./test_sissa_import.csv'): | ||
os.remove('./test_sissa_import.csv') | ||
|
||
c = clue.clusterer(20., 10., 20.) |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Variable name "c" doesn't conform to snake_case naming style Warning test
c.run_clue() | ||
c.to_csv('./', 'test_sissa_import.csv') | ||
|
||
d = clue.clusterer(20., 10., 20.) |
Check notice
Code scanning / Pylintpython3 (reported by Codacy)
Redefining name 'd' from outer scope (line 45) Note test
c.run_clue() | ||
c.to_csv('./', 'test_sissa_import.csv') | ||
|
||
d = clue.clusterer(20., 10., 20.) |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Variable name "d" doesn't conform to snake_case naming style Warning test
@@ -0,0 +1,47 @@ | |||
''' |
Check warning
Code scanning / Pylint (reported by Codacy)
Similar lines in 2 files Warning test
''' | ||
''' | ||
|
||
from check_result import check_result |
Check notice
Code scanning / Pylint (reported by Codacy)
Unused check_result imported from check_result Note test
''' | ||
|
||
from check_result import check_result | ||
import os |
Check warning
Code scanning / Pylint (reported by Codacy)
standard import "import os" should be placed before "from check_result import check_result" Warning test
|
||
from check_result import check_result | ||
import os | ||
import sys |
Check warning
Code scanning / Pylint (reported by Codacy)
standard import "import sys" should be placed before "from check_result import check_result" Warning test
c.run_clue() | ||
c.to_csv('./', 'test_sissa_import.csv') | ||
|
||
d = clue.clusterer(20., 10., 20.) |
Check warning
Code scanning / Pylint (reported by Codacy)
Variable name "d" doesn't conform to snake_case naming style Warning test
c.run_clue() | ||
c.to_csv('./', 'test_sissa_import.csv') | ||
|
||
d = clue.clusterer(20., 10., 20.) |
Check notice
Code scanning / Pylint (reported by Codacy)
Redefining name 'd' from outer scope (line 45) Note test
assert c.clust_prop == d.clust_prop | ||
|
||
if __name__ == "__main__": | ||
c = clue.clusterer(20., 10., 20.) |
Check warning
Code scanning / Pylint (reported by Codacy)
Variable name "c" doesn't conform to snake_case naming style Warning test
c.cluster_plotter() | ||
c.to_csv('./', 'test_sissa_import.csv') | ||
|
||
d = clue.clusterer(20., 10., 20.) |
Check warning
Code scanning / Pylint (reported by Codacy)
Constant name "d" doesn't conform to UPPER_CASE naming style Warning test
* Add `import_clusterer` method * Add test for new clusterer import * Add docstring * Fix "if main" of test file * Addition to gitignore
* Rework points as SoA Update backend code Update binding modules Update python API Add tests for host-side point SoA Update run_clue for CUDA and HIP Update benchmarking scripts Move test folder Fix device memory access in memcpy * Feature clusterer import method (#76) * Add `import_clusterer` method * Add test for new clusterer import * Add docstring * Fix "if main" of test file * Addition to gitignore * Small fix in getGlobalBin (#75) * Small fix in getGlobalBin * Update version * Formatting Fix after merge * Separate alpaka input and result buffers Fix partial dimensional clustering Update package version
* Add `import_clusterer` method * Add test for new clusterer import * Add docstring * Fix "if main" of test file * Addition to gitignore
* Rework points as SoA Update backend code Update binding modules Update python API Add tests for host-side point SoA Update run_clue for CUDA and HIP Update benchmarking scripts Move test folder Fix device memory access in memcpy * Feature clusterer import method (cms-patatrack#76) * Add `import_clusterer` method * Add test for new clusterer import * Add docstring * Fix "if main" of test file * Addition to gitignore * Small fix in getGlobalBin (cms-patatrack#75) * Small fix in getGlobalBin * Update version * Formatting Fix after merge * Separate alpaka input and result buffers Fix partial dimensional clustering Update package version
This PR adds a method to the Python API for importing the results of a clustering done previously and saved to a csv file using the
to_csv
method.NOTE: it also adds the weight columnt to the csv generated with
to_csv
.