feat: adds cli probs
This commit is contained in:
0
tests/indexify/__init__.py
Normal file
0
tests/indexify/__init__.py
Normal file
12
tests/indexify/test_indexify.py
Normal file
12
tests/indexify/test_indexify.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import deepdog.indexify
|
||||
import logging
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def test_indexifier():
|
||||
weight_dict = {"key_1": [1, 2, 3], "key_2": ["a", "b", "c"]}
|
||||
indexifier = deepdog.indexify.Indexifier(weight_dict)
|
||||
_logger.debug(f"setting up indexifier {indexifier}")
|
||||
assert indexifier.indexify(0) == {"key_1": 1, "key_2": "a"}
|
||||
assert indexifier.indexify(5) == {"key_1": 2, "key_2": "c"}
|
0
tests/results/__init__.py
Normal file
0
tests/results/__init__.py
Normal file
28
tests/results/test_column_results.py
Normal file
28
tests/results/test_column_results.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import deepdog.results
|
||||
|
||||
|
||||
def test_parse_groupdict():
|
||||
example_column_name = (
|
||||
"geom_-20_20_-10_10_0_5-orientation_free-dipole_count_100_success"
|
||||
)
|
||||
|
||||
parsed = deepdog.results._parse_bayesrun_column(example_column_name)
|
||||
expected = deepdog.results.BayesrunColumnParsed(
|
||||
{
|
||||
"xmin": "-20",
|
||||
"xmax": "20",
|
||||
"ymin": "-10",
|
||||
"ymax": "10",
|
||||
"zmin": "0",
|
||||
"zmax": "5",
|
||||
"orientation": "free",
|
||||
"avg_filled": "100",
|
||||
"field_name": "success",
|
||||
}
|
||||
)
|
||||
assert parsed == expected
|
||||
|
||||
|
||||
# def test_parse_no_match_column_name():
|
||||
# parsed = deepdog.results.parse_bayesrun_column("There's nothing here")
|
||||
# assert parsed is None
|
Reference in New Issue
Block a user