holobench 1.25.0__tar.gz → 1.25.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {holobench-1.25.0/holobench.egg-info → holobench-1.25.1}/PKG-INFO +5 -5
- {holobench-1.25.0 → holobench-1.25.1}/bencher/bencher.py +5 -2
- {holobench-1.25.0 → holobench-1.25.1/holobench.egg-info}/PKG-INFO +5 -5
- {holobench-1.25.0 → holobench-1.25.1}/holobench.egg-info/SOURCES.txt +1 -0
- {holobench-1.25.0 → holobench-1.25.1}/holobench.egg-info/requires.txt +4 -4
- {holobench-1.25.0 → holobench-1.25.1}/pyproject.toml +16 -9
- holobench-1.25.1/test/test_bch_p.py +37 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_bench_examples.py +11 -0
- {holobench-1.25.0 → holobench-1.25.1}/LICENSE +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/README.md +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/bencher/__init__.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/bencher/bench_cfg.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/bencher/bench_plot_server.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/bencher/bench_report.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/bencher/bench_runner.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/bencher/caching.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/bencher/class_enum.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/bencher/job.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/bencher/optuna_conversions.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/bencher/utils.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/bencher/video_writer.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/bencher/worker_job.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/holobench.egg-info/dependency_links.txt +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/holobench.egg-info/not-zip-safe +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/holobench.egg-info/top_level.txt +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/package.xml +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/resource/bencher +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/setup.cfg +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/setup.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_bench_report.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_bench_result_base.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_bench_runner.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_bencher.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_cache.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_class_enum.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_combinations.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_composable_container_base.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_composable_container_video.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_float_formatter.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_job.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_meta_tests.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_parametrized_sweep.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_plot_filter.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_plot_server.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_sample_cache.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_sweep_base.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_sweep_vars.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_utils.py +0 -0
- {holobench-1.25.0 → holobench-1.25.1}/test/test_vars.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: holobench
|
3
|
-
Version: 1.25.
|
3
|
+
Version: 1.25.1
|
4
4
|
Summary: A package for benchmarking the performance of arbitrary functions
|
5
5
|
Author-email: Austin Gregg-Smith <blooop@gmail.com>
|
6
6
|
Maintainer: austin.gregg-smith
|
@@ -29,11 +29,11 @@ Requires-Dist: scoop<=0.7.2.0,>=0.7.0
|
|
29
29
|
Requires-Dist: moviepy<=1.0.3,>=1.0.3
|
30
30
|
Provides-Extra: test
|
31
31
|
Requires-Dist: black<=24.4.2,>=23; extra == "test"
|
32
|
-
Requires-Dist: pylint<=3.2.
|
32
|
+
Requires-Dist: pylint<=3.2.3,>=2.17.7; extra == "test"
|
33
33
|
Requires-Dist: pytest-cov<=5.0.0,>=4.1; extra == "test"
|
34
|
-
Requires-Dist: pytest<=8.2.
|
35
|
-
Requires-Dist: hypothesis<=6.103.
|
36
|
-
Requires-Dist: ruff<=0.4.
|
34
|
+
Requires-Dist: pytest<=8.2.2,>=7.4; extra == "test"
|
35
|
+
Requires-Dist: hypothesis<=6.103.1,>=6.82; extra == "test"
|
36
|
+
Requires-Dist: ruff<=0.4.8,>=0.0.280; extra == "test"
|
37
37
|
Requires-Dist: coverage<=7.5.3,>=7.2.7; extra == "test"
|
38
38
|
|
39
39
|
# Bencher
|
@@ -505,9 +505,12 @@ class Bench(BenchPlotServer):
|
|
505
505
|
variable = self.worker_class_instance.param.objects(instance=False)[variable]
|
506
506
|
if isinstance(variable, dict):
|
507
507
|
param_var = self.worker_class_instance.param.objects(instance=False)[variable["name"]]
|
508
|
-
if variable
|
508
|
+
if variable.get("values"):
|
509
509
|
param_var = param_var.with_sample_values(variable["values"])
|
510
|
-
|
510
|
+
|
511
|
+
if variable.get("samples"):
|
512
|
+
param_var = param_var.with_samples(variable["samples"])
|
513
|
+
if variable.get("max_level"):
|
511
514
|
if run_cfg is not None:
|
512
515
|
param_var = param_var.with_level(run_cfg.level, variable["max_level"])
|
513
516
|
variable = param_var
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: holobench
|
3
|
-
Version: 1.25.
|
3
|
+
Version: 1.25.1
|
4
4
|
Summary: A package for benchmarking the performance of arbitrary functions
|
5
5
|
Author-email: Austin Gregg-Smith <blooop@gmail.com>
|
6
6
|
Maintainer: austin.gregg-smith
|
@@ -29,11 +29,11 @@ Requires-Dist: scoop<=0.7.2.0,>=0.7.0
|
|
29
29
|
Requires-Dist: moviepy<=1.0.3,>=1.0.3
|
30
30
|
Provides-Extra: test
|
31
31
|
Requires-Dist: black<=24.4.2,>=23; extra == "test"
|
32
|
-
Requires-Dist: pylint<=3.2.
|
32
|
+
Requires-Dist: pylint<=3.2.3,>=2.17.7; extra == "test"
|
33
33
|
Requires-Dist: pytest-cov<=5.0.0,>=4.1; extra == "test"
|
34
|
-
Requires-Dist: pytest<=8.2.
|
35
|
-
Requires-Dist: hypothesis<=6.103.
|
36
|
-
Requires-Dist: ruff<=0.4.
|
34
|
+
Requires-Dist: pytest<=8.2.2,>=7.4; extra == "test"
|
35
|
+
Requires-Dist: hypothesis<=6.103.1,>=6.82; extra == "test"
|
36
|
+
Requires-Dist: ruff<=0.4.8,>=0.0.280; extra == "test"
|
37
37
|
Requires-Dist: coverage<=7.5.3,>=7.2.7; extra == "test"
|
38
38
|
|
39
39
|
# Bencher
|
@@ -18,9 +18,9 @@ moviepy<=1.0.3,>=1.0.3
|
|
18
18
|
|
19
19
|
[test]
|
20
20
|
black<=24.4.2,>=23
|
21
|
-
pylint<=3.2.
|
21
|
+
pylint<=3.2.3,>=2.17.7
|
22
22
|
pytest-cov<=5.0.0,>=4.1
|
23
|
-
pytest<=8.2.
|
24
|
-
hypothesis<=6.103.
|
25
|
-
ruff<=0.4.
|
23
|
+
pytest<=8.2.2,>=7.4
|
24
|
+
hypothesis<=6.103.1,>=6.82
|
25
|
+
ruff<=0.4.8,>=0.0.280
|
26
26
|
coverage<=7.5.3,>=7.2.7
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "holobench"
|
3
|
-
version = "1.25.
|
3
|
+
version = "1.25.1"
|
4
4
|
|
5
5
|
authors = [{ name = "Austin Gregg-Smith", email = "blooop@gmail.com" }]
|
6
6
|
description = "A package for benchmarking the performance of arbitrary functions"
|
@@ -42,14 +42,17 @@ python = "3.11.*"
|
|
42
42
|
[tool.pixi.pypi-dependencies]
|
43
43
|
holobench = { path = ".", editable = true }
|
44
44
|
|
45
|
+
[tool.pixi.feature.devenv.pypi-dependencies]
|
46
|
+
deps-rocker = ">=0.2"
|
47
|
+
|
45
48
|
[project.optional-dependencies]
|
46
49
|
test = [
|
47
50
|
"black>=23,<=24.4.2",
|
48
|
-
"pylint>=2.17.7,<=3.2.
|
51
|
+
"pylint>=2.17.7,<=3.2.3",
|
49
52
|
"pytest-cov>=4.1,<=5.0.0",
|
50
|
-
"pytest>=7.4,<=8.2.
|
51
|
-
"hypothesis>=6.82,<=6.103.
|
52
|
-
"ruff>=0.
|
53
|
+
"pytest>=7.4,<=8.2.2",
|
54
|
+
"hypothesis>=6.82,<=6.103.1",
|
55
|
+
"ruff>=0.0.280,<=0.4.8",
|
53
56
|
"coverage>=7.2.7,<=7.5.3",
|
54
57
|
]
|
55
58
|
|
@@ -64,9 +67,13 @@ build-backend = "setuptools.build_meta"
|
|
64
67
|
|
65
68
|
# Environments
|
66
69
|
[tool.pixi.environments]
|
67
|
-
default = {
|
68
|
-
py310 = ["py310",
|
69
|
-
py311 = ["py311",
|
70
|
+
default = {features = ["test"], solve-group = "default" }
|
71
|
+
py310 = ["py310","test"]
|
72
|
+
py311 = ["py311","test"]
|
73
|
+
devenv =["devenv"]
|
74
|
+
|
75
|
+
[tool.pixi.feature.devenv.tasks]
|
76
|
+
code = "scripts/launch_vscode.sh"
|
70
77
|
|
71
78
|
[tool.pixi.tasks]
|
72
79
|
format = "black ."
|
@@ -106,7 +113,7 @@ extension-pkg-whitelist = ["numpy", "scipy"]
|
|
106
113
|
jobs = 16 #detect number of cores
|
107
114
|
|
108
115
|
[tool.pylint.'MESSAGES CONTROL']
|
109
|
-
disable = "C,logging-fstring-interpolation,line-too-long,fixme,missing-module-docstring,too-many-instance-attributes,too-few-public-methods,too-many-arguments,too-many-locals,too-many-branches,too-many-statements,use-dict-literal,duplicate-code,too-many-public-methods,too-many-nested-blocks"
|
116
|
+
disable = "C,logging-fstring-interpolation,line-too-long,fixme,missing-module-docstring,too-many-instance-attributes,too-few-public-methods,too-many-arguments,too-many-locals,too-many-branches,too-many-statements,use-dict-literal,duplicate-code,too-many-public-methods,too-many-nested-blocks,cyclic-import"
|
110
117
|
enable = "no-else-return,consider-using-in"
|
111
118
|
|
112
119
|
[tool.black]
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Generated by CodiumAI
|
2
|
+
|
3
|
+
import pytest
|
4
|
+
from bencher import p
|
5
|
+
|
6
|
+
|
7
|
+
class TestP:
|
8
|
+
|
9
|
+
# returns correct dictionary with all parameters provided
|
10
|
+
def test_returns_correct_dict_all_params(self):
|
11
|
+
result = p(name="param1", values=[1, 2, 3], samples=10, max_level=5)
|
12
|
+
assert result == {"name": "param1", "values": [1, 2, 3], "samples": 10, "max_level": 5}
|
13
|
+
|
14
|
+
# returns correct dictionary with only name provided
|
15
|
+
def test_returns_correct_dict_name_only(self):
|
16
|
+
result = p(name="param1")
|
17
|
+
assert result == {"name": "param1", "values": None, "samples": None, "max_level": None}
|
18
|
+
|
19
|
+
# returns correct dictionary with name and values provided
|
20
|
+
def test_returns_correct_dict_name_and_values(self):
|
21
|
+
result = p(name="param1", values=[1, 2, 3])
|
22
|
+
assert result == {"name": "param1", "values": [1, 2, 3], "samples": None, "max_level": None}
|
23
|
+
|
24
|
+
# raises ValueError when max_level is 0
|
25
|
+
def test_raises_value_error_max_level_zero(self):
|
26
|
+
with pytest.raises(ValueError, match="max_level must be greater than 0"):
|
27
|
+
p(name="param1", max_level=0)
|
28
|
+
|
29
|
+
# raises ValueError when max_level is negative
|
30
|
+
def test_raises_value_error_max_level_negative(self):
|
31
|
+
with pytest.raises(ValueError, match="max_level must be greater than 0"):
|
32
|
+
p(name="param1", max_level=-1)
|
33
|
+
|
34
|
+
# raises ValueError when samples is 0
|
35
|
+
def test_raises_value_error_samples_zero(self):
|
36
|
+
with pytest.raises(ValueError, match="samples must be greater than 0"):
|
37
|
+
p(name="param1", samples=0)
|
@@ -4,6 +4,8 @@ from bencher.example.example_floats2D import example_floats2D
|
|
4
4
|
from bencher.example.example_pareto import example_pareto
|
5
5
|
from bencher.example.example_simple_cat import example_1D_cat
|
6
6
|
from bencher.example.example_simple_float import example_1D_float
|
7
|
+
from bencher.example.example_simple_float2d import example_2D_float
|
8
|
+
from bencher.example.example_consts import example_2D_float_const
|
7
9
|
from bencher.example.example_float_cat import run_example_float_cat
|
8
10
|
from bencher.example.example_time_event import run_example_time_event
|
9
11
|
from bencher.example.example_float3D import example_floats3D
|
@@ -75,6 +77,15 @@ class TestBenchExamples(unittest.TestCase):
|
|
75
77
|
def test_example_simple_float(self) -> None:
|
76
78
|
self.examples_asserts(example_1D_float(self.create_run_cfg()))
|
77
79
|
|
80
|
+
def test_example_simple_float1D(self) -> None:
|
81
|
+
self.examples_asserts(example_1D_float(self.create_run_cfg()))
|
82
|
+
|
83
|
+
def test_example_simple_float2D(self) -> None:
|
84
|
+
self.examples_asserts(example_2D_float(self.create_run_cfg()))
|
85
|
+
|
86
|
+
def test_example_2D_float_const(self) -> None:
|
87
|
+
self.examples_asserts(example_2D_float_const(self.create_run_cfg()))
|
88
|
+
|
78
89
|
def test_example_float_cat(self) -> None:
|
79
90
|
self.examples_asserts(run_example_float_cat(self.create_run_cfg()))
|
80
91
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|