Releases: yunruse/Noether
v1.1
- Various further bugfixes and improvements for display mechanisms
- Support for logarithmic units, such as
decibel- Like with temperature
AffineUnits, calldB(3)or (3dBon the command-line) to use the scale; multiplication works as usual - Decibel-units are also supported, e.g.
horsepower @ dB(kW)
- Like with temperature
- 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
- temperature:
- 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
- logarithmic:
- Unusual:
flight_dose_rate,dog_year
- Cooking:
v1.0.1
- 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:
horsepowerpoundal
- Deprecate unused internal features:
MultiplicationWithValue- "Ranged overlap" comparisons
v1.0.0
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
Measureis now frozen and can take anyRealvalueMeasure.stddevisNoneby default rather than zero- Almost entirely strong-typed with
pyrightand partially unit-tested - API designed for both ease of use and expressiveness
-
Improved display mechanisms
- You can use
measure @ unitfor 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
- By default, for example, time is displayed in
- Support for
richAPI (automatic inpython -im noether)
- You can use
-
Improved catalogue mechanism
- New optional catalogue shorthand (in development) for quicker development
Catalogueholds everything for analysis- Collation and display easier with
UnitSet– display e.g.mile @ CGS infotag provides context, definition and disambiguation on units
-
Extended catalogue
- SI
ronto,quecto,ronna,quettaprefixes - Some fictional and historical units
- Some new scientific (astronomic) units
- All CODATA constants direct from source
- SI
-
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
- Now loads from
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
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()