Skip to content

Fix units registry for pint 0.26.2 CODATA unit braces - #418

Merged
loriab merged 2 commits into
MolSSI:masterfrom
loriab:fix-pint-0262
Oct 21, 2026
Merged

loriab merged 2 commits into
MolSSI:masterfrom
loriab:fix-pint-0262

Conversation

@loriab

@loriab loriab commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

pint 0.26.2 raises on unknown operators instead of ignoring them, so the LaTeX-style exponents in CODATA unit strings (e.g., "J^{-2}") broke build_units_registry and thus test collection. Convert braces to parentheses before defining the atomic units. Tested with pint 0.24.4, 0.25.3, and 0.26.2.

Fixes #417

Description

Changelog description

Status

  • Code base linted
  • Ready to go

pint 0.26.2 raises on unknown operators instead of ignoring them, so the
LaTeX-style exponents in CODATA unit strings (e.g., "J^{-2}") broke
build_units_registry and thus test collection. Convert braces to
parentheses before defining the atomic units. Tested with pint 0.24.4,
0.25.3, and 0.26.2.

Fixes MolSSI#417

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.36%. Comparing base (1391f04) to head (66a3d2c).
⚠️ Report is 45 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (1391f04) and HEAD (66a3d2c). Click for more details.

HEAD has 7 uploads less than BASE
Flag BASE (1391f04) HEAD (66a3d2c)
19 12
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@loriab
loriab merged commit 90fda8f into MolSSI:master Oct 21, 2026
23 checks passed
@loriab
loriab deleted the fix-pint-0262 branch October 21, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Physical constants registry fails with Pint 0.26.2 on braced negative exponents

1 participant