Skip to content

Releases: yunruse/Noether

v1.1

02 Aug 16:53
3f2a0f9

Choose a tag to compare

  • Various further bugfixes and improvements for display mechanisms
  • Support for logarithmic units, such as decibel
    • Like with temperature AffineUnits, call dB(3) or (3dB on the command-line) to use the scale; multiplication works as usual
    • Decibel-units are also supported, e.g. horsepower @ dB(kW)
  • Time-based measures and units now interoperable with datetime.timedelta
  • Added 58 new units:
    • Cooking: tablespoon, teaspoon, dessertspoon
    • Astronomy: solar_mass, solar_radius, solar_irradiance, solar_luminosity, solar_temperature, solar_mass_parameter, earth_radius_equatorial, earth_radius_polar, jupiter_radius_equatorial, jupiter_radius_polar, earth_mass_parameter, jupiter_mass_parameter
    • Scientific: amagat, dalton, torr, bubnoff, eotvos, dBZ
    • Historical scientific:
      • temperature: degN, degRe, degDe, degRo,
      • radioactive: curie, rutherford, thomson, roentgen, Mache
      • misc: spat_length, foot_lambert
    • Conventional:
      • logarithmic: bel, decibel, neper
      • volume: gill, quart
      • mass: scruple, apdram, apounce, appound, pennyweight
      • mechanical: mach, lbf, slug, psi, foot_pound, pound_foot, kip
      • misc: msw, fsw, mired, julian_month, rpm, rps, mpg
    • Unusual: flight_dose_rate, dog_year

v1.0.1

27 Jul 10:59
e329d54

Choose a tag to compare

  • Various bugfixes and improved testing for display mechanisms; units now display in scientific notation where otherwise would be unwieldy.
  • Fixed incorrect value for standard_gravity.
  • Added a very rudimentary GNU units-like interface (python -m noether.gnu)
  • New units:
    • horsepower
    • poundal
  • Deprecate unused internal features:
    • MultiplicationWithValue
    • "Ranged overlap" comparisons

v1.0.0

23 Jul 17:22

Choose a tag to compare

A complete rewrite from scratch. The original was made some 5 years ago, so this is definitely a 1.0 now :)

I wouldn't consider this yet to be amazing, feature-complete stable quality... but can that be said of any open source project?

Listing all the changes would be an effort itself! Here's the cliff notes:

  • Core code rewritten entirely from scratch

    • Measure is now frozen and can take any Real value
    • Measure.stddev is None by default rather than zero
    • Almost entirely strong-typed with pyright and partially unit-tested
    • API designed for both ease of use and expressiveness
  • Improved display mechanisms

    • You can use measure @ unit for quick display in that unit.
    • You can compose units with & for display purposes.
      • By default, for example, time is displayed in year & day & hour & minute & second
    • Support for rich API (automatic in python -im noether)
  • Improved catalogue mechanism

    • New optional catalogue shorthand (in development) for quicker development
    • Catalogue holds everything for analysis
    • Collation and display easier with UnitSet – display e.g. mile @ CGS
    • info tag provides context, definition and disambiguation on units
  • Extended catalogue

    • SI ronto, quecto, ronna, quetta prefixes
    • Some fictional and historical units
    • Some new scientific (astronomic) units
    • All CODATA constants direct from source
  • Config handler changed to toml

    • Now loads from ${XDG_CONFIG_HOME:-~/.config}/noether.toml.
    • Not created by default to avoid filespam
    • Presented in categories for user convenience

Some units were lost in the conversion, and I've kind of slowed down on my microfixation on obscure units.

Of course, I will add units as I get them, and any pull request to add more units is very appreciated.

Alpha 0.1.3

12 May 21:49

Choose a tag to compare

Alpha 0.1.3 Pre-release
Pre-release

Added really basic config support! Most settings are currently prefix and unit, which toggle the loading of units and prefixes. At the moment it's ran on namespaces, which might also be refactored, as it's a slight bit more slow if you enable everything up to the "hellapotrzebie".

This seems a bit petty, but it's an essential step towards finally refactoring things. It's likely to be tinkered with a little as things settle in; documentation comes after refactors. Which are due soon - but, in the meanwhile, you can install with pip install noether!

noe.conf.save and .load take a path (default.conf unless specified), which unless an absolute path will sleep safely in ~/.config/noether. Useful for personal settings, useful for ./project_settings.conf.

>>> import noether as noe
>>> noe.conf
 - measure_openlinear: False
 - measure_precision : 3
 - prefix_IEC        : False
 - prefix_fun        : False
 - unicode_exponent  : True
 - unit_cgs          : True
 - unit_historical   : True
 - unit_imperial     : True
 - unit_unusual      : True
>>> a = nanometre(2)
>>> a
10⁻⁹m <length, distance, height, width, breadth, depth>
>>> noe.conf.unicode_exponent = False
>>> noe.
>>> a
10^-9m <length, distance, height, width, breadth, depth>
>>> noe.conf.save()