yunruse / Noether

Just another units package
MIT License
9 stars 0 forks source link

Problematic display issues with dimensionless units #41

Closed yunruse closed 11 months ago

yunruse commented 1 year ago
>>> {k: v for k, v in CODATA.items() if 'fine-structure' in k}
{
    'fine-structure constant': fine-structure constant  # dimensionless, 0.0072973525693 ± 1.1e-12 , CODATA 2018,
    'hyperfine transition frequency of Cs-133': hyperfine transition frequency of Cs-133  # frequency, 9192631770 Hz, CODATA 2018,
    'inverse fine-structure constant': inverse fine-structure constant  # dimensionless, 137.035999084 ± 2.1e-08 , CODATA 2018
}
>>> fine_structure_constant   # or `alpha`
fine_structure_constant  # dimensionless, 0.007297352565305213 
>>> inverse_fine structure_constant  # <- this was auto-completed

The following errors exist, and as the main dev I invoke my right to be lazy and list them all in one issue:

Recall Hyrum's law:

With a sufficient number of users of an API, it does not matter what you promise in the contract: all observable behaviors of your system will be depended on by somebody.

Best to make sure 1.0 is tidy before you accidentally break backwards compatibility on a hidden feature. Actual features can wait.