Avatar for the hgrecco user
hgrecco
pint
BlogDocsChangelog

Add ureg.constants for accessing physical constants

#2299
Comparing
andrewgsavage:fix/constants-1078-v2
(
8c87251
) with
master
(
af29dc0
)
CodSpeed Performance Gauge
-3%
Untouched
448
Skipped
448

Benchmarks

448 total
test_pint_eval[10 m-uncertainty_tokenizer]
pint/testsuite/benchmarks/test_01_eval.py
Skipped
166 µs*
test_parse_expression[True-minute]
pint/testsuite/benchmarks/test_10_registry.py
Skipped
398.2 µs*
test_import
pint/testsuite/benchmarks/test_00_common.py
Skipped
667.9 µs*
test_pint_eval[1 + 2 + 5-uncertainty_tokenizer]
pint/testsuite/benchmarks/test_01_eval.py
Skipped
190.3 µs*
test_pint_eval[1-plain_tokenizer]
pint/testsuite/benchmarks/test_01_eval.py
Skipped
136.1 µs*
test_pint_eval[1-uncertainty_tokenizer]
pint/testsuite/benchmarks/test_01_eval.py
Skipped
164.8 µs*
test_pint_eval[10 metros * (5 segundos)-plain_tokenizer]
pint/testsuite/benchmarks/test_01_eval.py
Skipped
159.4 µs*
test_pint_eval[1 + 2 + 5-plain_tokenizer]
pint/testsuite/benchmarks/test_01_eval.py
Skipped
151.4 µs*
test_parse_expression[True-millisecond]
pint/testsuite/benchmarks/test_10_registry.py
Skipped
405.5 µs*
test_pint_eval[10 m-plain_tokenizer]
pint/testsuite/benchmarks/test_01_eval.py
Skipped
134.5 µs*
test_parse_unit_name[False-angstrom]
pint/testsuite/benchmarks/test_10_registry.py
Skipped
132.6 µs*
test_pint_eval[10 metros * (5 segundos)-uncertainty_tokenizer]
pint/testsuite/benchmarks/test_01_eval.py
Skipped
206.8 µs*
test_create_default_registry
pint/testsuite/benchmarks/test_05_registry_creation.py
Skipped
777 ms*
test_parse_expression[True-second]
pint/testsuite/benchmarks/test_10_registry.py
Skipped
392.5 µs*
test_create_default_registry_use_cache
pint/testsuite/benchmarks/test_05_registry_creation.py
Skipped
57.2 ms*
test_parse_expression[True-ms]
pint/testsuite/benchmarks/test_10_registry.py
Skipped
640.6 µs*
test_pint_eval[10 metros + 5 segundos-plain_tokenizer]
pint/testsuite/benchmarks/test_01_eval.py
Skipped
151 µs*
test_parse_unit_name[False-kilometer]
pint/testsuite/benchmarks/test_10_registry.py
Skipped
140.8 µs*
test_base_units[False-angstrom/minute]
pint/testsuite/benchmarks/test_10_registry.py
Skipped
73.1 µs*
test_parse_unit_name[False-meter]
pint/testsuite/benchmarks/test_10_registry.py
Skipped
132.6 µs*
test_parse_unit_name[False-millisecond]
pint/testsuite/benchmarks/test_10_registry.py
Skipped
140.6 µs*
test_parse_math_expression
pint/testsuite/benchmarks/test_10_registry.py
Skipped
539.3 µs*
test_create_tiny_registry
pint/testsuite/benchmarks/test_05_registry_creation.py
Skipped
15.1 ms*
test_create_empty_registry
pint/testsuite/benchmarks/test_05_registry_creation.py
Skipped
624.2 µs*
test_pint_eval[10 metros + 5 segundos-uncertainty_tokenizer]
pint/testsuite/benchmarks/test_01_eval.py
Skipped
188.7 µs*

Commits

Click on a commit to change the comparison range
Base
master
af29dc0
-3.15%
Add __dir__ to Group for autocomplete support
3eb9653
2 months ago
by andrewgsavage
+2.94%
Remove SystemConstantsAccessor from System
3b8387a
2 months ago
by andrewgsavage
-2.23%
Add changelog entry for ureg.constants (#1078)
aaad02f
2 months ago
by andrewgsavage
-0.02%
Add test for ureg.constants returning Quantity vs Unit (#1078)
0aec246
2 months ago
by andrewgsavage
+6.77%
Apply ruff formatting to test_issues.py
3927ad3
2 months ago
by andrewgsavage
-6.89%
Fix Group.__getattr__ to resolve aliases before checking constants membership
256cb97
2 months ago
by andrewgsavage
+1.72%
Parametrize test_issue1078 to cover alias access via ureg.constants.c
4a02de8
2 months ago
by andrewgsavage
-1.68%
Fix doctest value for speed.to(ureg.speed_of_light) in tutorial
38ad46e
2 months ago
by andrewgsavage
-0.32%
Apply ruff formatting
8c87251
2 months ago
by andrewgsavage
© 2026 CodSpeed Technology
Home Terms Privacy Docs