v2.0.0
What's Changed
π₯ Breaking Changes
- π₯ boom(unitsystems): no-arg unitsystem() is now dimensionless by @nstarman in #758
- π₯ boom(build): drop Python 3.11; adopt PEP 695 generics for v2.0 by @nstarman in #765
- π₯ boom(unitsystems): make unit-system identity order-independent by @nstarman in #778
β¨ New Features
- π init: unxt-api and unxt-hypothesis by @nstarman in #496
- β¨ feat: Quantity wadler-lindig short-name by @nstarman in #499
- β¨ feat: angles and from_type by @nstarman in #513
- β¨ feat(unxt): parse dim exprs by @nstarman in #520
- β¨ feat(unxt): StaticQuantity by @nstarman in #526
- β¨ feat(all):
uconvert_valuefor value conversion, not requiring Quantity by @nstarman in #550 - dimensions strat + bug fix + guide by @nstarman in #551
- β¨ feat(unxt): runtime configuration via traitlets by @nstarman in #604
- β¨ feat: numpy ufunc support on quantities via array_ufunc by @nstarman in #669
- π init: unxt-xarray by @nstarman in #498
- Add unxts.api, unxts.hypothesis, unxts.xarray namespace packages by @nstarman in #681
- v2: make the lightweight Quantity the default; rename parametric β ParametricQuantity by @nstarman in #682
- β¨feat:
unxts.parametricby @nstarman in #684 - β¨ feat: add
unxts.linalgpackage (QuantityMatrix) + docs + CI/CD by @nstarman in #686 - β¨ feat(quantity): support format specs, e.g. f"{q:.2f}" by @nstarman in #707
- β¨ feat(config): add config.reload() and deprecate [tool.unxt] section by @nstarman in #714
- π fix(quantity): unit-blind equality + consistent hash/ne for static quantities by @nstarman in #708
- β¨ feat(units): accept astropy function units (mag/dex/dB) by @nstarman in #759
- β¨ feat(experimental): add unit-checked where() by @nstarman in #764
- β¨ feat: add natural unit systems (Planck, HEP, geometrized, atomic) by @nstarman in #768
- β¨ feat(experimental): make unxt.experimental a public, importable module by @nstarman in #784
- β¨ feat(unxts-linalg): give
QuantityMatrixshort_name "QM" by @nstarman in #795 - β
test(unxts-linalg): cover
QuantityMatrixshort_name "QM" by @nstarman in #796
π Bug Fixes
- π fix(unxt-hypothesis): fix from_type registrations by @nstarman in #525
- π fix(unxt): fix unregistered primitives by @nstarman in #532
- π₯ catch(unxt-hypothesis): from_type strategy for StaticQuantity by @nstarman in #540
- π fix(unxt): StaticQuantity rich comparisons by @nstarman in #543
- π fix(unxt): StaticQuantity - Quantity, Quantity mod by @nstarman in #545
- π₯ catch: trim whitespace from dimension names in regex match by @nstarman in #555
- π fix(unxt): fix Q repr in jax tracebacks by @nstarman in #567
- π fix(unxt): printing AbstractQuantity under jit by @nstarman in #572
- π fix(unxt): dataclassish interop by @nstarman in #577
- π fix(unxt): ne_p by @nstarman in #580
- π fix(unxt): lt_p dispatch by @nstarman in #582
- π₯ catch: numpy array args by @nstarman in #584
- π fix(unxt): get fields of an AbstractQuantity by @nstarman in #599
- π fix(unxt): printing default-valued Quantity fields by @nstarman in #605
- π₯ catch: small fixes in test_config by @nstarman in #608
- π fix(unxt): max(StaticQ, StaticQ) by @nstarman in #615
- π fix(unxt): StaticQuantity integer pow by @nstarman in #618
- β¬οΈ dep-bump: python 3.14 by @nstarman in #659
- π fix: avoid numpy 2.5 NDArray ScalarT leak under beartype by @nstarman in #672
- π fix(parametric): make unxts.parametric release-ready by @nstarman in #689
- π fix(xarray): use u.Q in interop docstrings; ParametricQuantity was removed by @nstarman in #690
- π fix(unxt): relabel when converting to an equal but differently-named unit by @nstarman in #687
- π fix(unxt): align v2 quantity public surface (BareQuantity shim + docstrings) by @nstarman in #693
- π§Ή chore(unxt): astropy-interop cosmetics from the v2 audit by @nstarman in #696
- π fix(unxt): stop OptDeps aliasing the interop packages together by @nstarman in #688
- π fix(unitsystems): stop SI/CGS/dimensionless singletons corrupting globals by @nstarman in #704
- π fix(quantity): make StaticValue pickle- and deepcopy-safe by @nstarman in #706
- π fix(quantity): correct linalg.solve shape and unbreak linalg.inv by @nstarman in #710
- π fix(dimensions): strip whitespace on simple names; reject unary +/- by @nstarman in #713
- π fix(quantity): convert angle units in deg2rad/rad2deg numpy ufuncs by @nstarman in #705
- π fix(quantity): stop unxt * astropy.Quantity silently dropping the unit by @nstarman in #709
- π fix(quantity): preserve weak_type for scalar quantity values by @nstarman in #715
- π fix(unxts-linalg): update from_cdict doctests for weak_type values by @nstarman in #724
- π fix: keep true units for min/max/clamp of scaled-dimensionless quantities by @nstarman in #732
- π fix(quantity): unpack multiple-results top_k/approx_top_k on quantities by @nstarman in #734
- π fix(quantity): StaticQuantity dtype preservation + keep static across ops by @nstarman in #731
- π fix(quantity): give lax.rem_p on quantities truncated-remainder semantics by @nstarman in #740
- π fix(unxts-linalg): add (Quantity, QuantityMatrix) dot_general rule by @nstarman in #742
- π fix(interop): register 2-arg ustrip(AllowValue, astropy Quantity) by @nstarman in #737
- π fix(config): override(cfg) must not reset unmentioned traits by @nstarman in #736
- π fix(quantity): promote dtypes in ==/<=/>= on quantities by @nstarman in #726
- π fix(unitsystems): resolve getitem by stored dimensionβfield pairing by @nstarman in #728
- π Support Quantity extent in matplotlib imshow by @joseph-long in #725
- π fix(quantity): let Angle products/quotients degrade to Quantity by @nstarman in #730
- π fix(quantity): keep StaticQuantity.from_ on NumPy dtypes by @nstarman in #733
- π fix(quantity): make a 0-d Quantity non-iterable (np.iterable parity) by @nstarman in #738
- π fix(quantity): stop dimensionless-input math keeping a scaled unit label by @nstarman in #729
- π fix(interop): relabel unit in astropy uconvert_value by @nstarman in #746
- π fix: disable the hypothesis deadline suite-wide by @nstarman in #753
- π fix(ci): import hypothesis defensively in conftest by @nstarman in #754
- π fix(interop): drop consumed xarray units attr by @nstarman in #748
- π fix(quantity): compare unit labels in static equality by @nstarman in #749
- π fix(quantity): coerce astropy operands in //, %, ** and @ by @nstarman in #755
- π fix(quantity): truncate integer StaticQuantity division by @nstarman in #762
- π fix(unitsystems): clear error for an unknown unitsystem name by @nstarman in #766
- π§Ή chore(deps): raise the quax floor to >=0.4.0 by @nstarman in #770
- π fix(quantity): keep wrap_to in [min, max); export it from unxt top level by @nstarman in https://github.com//pull/782
- π fix(unitsystems): equivalent() consults units, not just dimensions by @nstarman in #783
- π fix(quantity): len() of a 0-d Quantity raises instead of returning 0 by @nstarman in #779
- π fix(packaging): correct package version exposure and an api docstring by @nstarman in #785
- π fix(quantity): StaticQuantity.mT, at[].get(fill_value=), at[].apply/power messages by @nstarman in #786
- π fix(config): make override() per-instance, not a global-leaking singleton by @nstarman in #789
- π fix(quantity): clear error for bitwise ops on dimensionful quantities by @nstarman in #791
- π fix(quantity): str(StaticQuantity) shows values, like str(Quantity) by @nstarman in #792
- π fix(config): make root update_config() work; document reload() by @nstarman in #793
- π fix(interop-xarray): reject quantify() unit specs for unknown names by @nstarman in #794
ποΈ Security
β‘οΈ Performance
- β‘οΈ perf: register usys as static by @nstarman in #597
- β‘οΈ perf: faithful jax.Array (quax 0.3.6), raw jax in primitive rules, memoized dimension_of by @nstarman in #674
- β‘οΈ perf(interop): identity fast path in uconvert by @nstarman in #745
π Documentation
- π docs: update by @nstarman in #497
- π docs: update unxt-api and unxt-hypothesis README by @nstarman in #504
- Unxt hypothesis/fix docs by @nstarman in #517
- π docs: add sharp-bits by @nstarman in #542
- π docs(unxt): update readme examples by @nstarman in #553
- π docs(unxt-hypothesis): update strategies enumeration and explanation by @nstarman in #557
- π docs(unxt): update dimensions by @nstarman in #575
- π docs(unxt): performance by @nstarman in #586
- Fix HTML formatting in README badges by @nstarman in #594
- π docs: prettier no break markdown by @nstarman in #601
- π docs: joss preprint by @nstarman in #602
- π docs: docs grid by @nstarman in #612
- Potential fix for 1 code quality finding by @nstarman in #660
- build(deps): bump quax to >=0.3.4 by @nstarman in #666
- π¨ style: use the u.Q alias instead of u.Quantity by @nstarman in #673
- Array-API-conformant boolean ops + dispatch consolidation by @nstarman in #679
- β»οΈ refactor: namespace the unxt config under
[tool.unxts.unxt]by @nstarman in #685 - π docs: fix duplicated https:// in install/clone commands by @nstarman in #691
- π docs: lead with the canonical packages, not the deprecated shims by @nstarman in #698
- π docs: update RELEASING.md for the full v2 package set by @nstarman in #697
- π license: adopt PEP 639 SPDX license metadata across the workspace by @nstarman in #702
- π docs(migration): document isinstance break; run the examples by @nstarman in #751
- π docs(quantity): document reflected mixed-arith jit break by @nstarman in #750
- π ci(docs): build docs and gate broken cross-references by @nstarman in #756
- π docs(readme): convert code blocks to verified doctests by @nstarman in #757
- π docs(guides): sharp bit for jnp.where adopting a raw-array unit by @nstarman in #763
- π docs(interop): direct-install tabs + API/guide for gala & matplotlib by @nstarman in #772
- π docs: restore the detailed unxts.api / unxts.hypothesis / unxts.interop.xarray docs lost in #681 by @nstarman in #771
- π docs: Phase 1 consistency sweep of package landing pages by @nstarman in #773
- π docs: Phase 2 audit remediation β nav, headings, Quickstart order, and guide content by @nstarman in #774
- π docs: fill parametric-interop and linalg cdict_units doc gaps (audit Phase 3) by @nstarman in #775
- π docs: raise myst_heading_anchors to 4 for H4 deep-links by @nstarman in #776
- π· build: fix v2 packaging metadata (sdist scope, license files, extras) by @nstarman in #780
- π docs(units): make the AbstractUnitSystem subclassing recipe runnable by @nstarman in #787
- π docs(hypothesis): correct inaccurate strategy docstrings by @nstarman in #788
- π docs: fill migration-guide gaps and fix doc-consistency findings by @nstarman in #781
- π docs(quantity): document select_n's raw-operand unit adoption as intentional by @nstarman in #790
π¨β»οΈ Code Quality & Refactoring
- β»οΈ refactor: update unxt_api imports by @nstarman in #506
- π¨ style: ensure public/private API separation by @nstarman in #511
- π₯ dump(unxt): UncheckedQuantity is removed, completing deprecation by @nstarman in #524
- π¨ style(unxt): use Q over Quantity by @nstarman in #530
- π¨ style(unxt-api): use Q over Quantity by @nstarman in #531
- π¨ style(unxt): clean up an import by @nstarman in #574
- π¨ script: fix tagging system for CD by @nstarman in #607
- β»οΈ refactor(unxt): remove dead eq line and the v2.0 compact_arrays shim by @nstarman in #694
- β»οΈ refactor(unitsystems): remove now-unused SingletonMixin by @nstarman in #712
- β»οΈ refactor(unitsystems): single dimensionβfield mapping by @nstarman in #744
β Testing
- β test: add taplo to pre-commit by @nstarman in #490
- π§ config: nox and warmup by @nstarman in #483
- π½οΈ external(jax): get_aval deprecated for typeof by @nstarman in #509
- β test(unxt): remove flaky test by @nstarman in #552
- π¨ script: update tagging system for CD by @nstarman in #595
π§ Configuration & Dependencies
- π§ config: sort pyproject by @nstarman in #495
- π§ config(cd): filter paths by @nstarman in #500
- π· build: exclude local name in builds by @nstarman in #501
- β dep-add: nox-uv by @nstarman in #508
- π§ config: update copilot instructions for uv-workspaces by @nstarman in #514
- β dep-rm(unxt-api): rm unused astropy by @nstarman in #516
- π§ config(unxt): workspace extra by @nstarman in #534
- β dep-add(unxt-api): add optional-dependencies to test deps by @nstarman in #536
- β dep-add(unxt-hypothesis): add pytest-arraydiff to test group by @nstarman in #538
- π§ config(unxt): change cancel-in-progress setting to false by @nstarman in #547
- β¬οΈ dep-bump(unxt): keep unxt-api minor version in lock-step by @nstarman in #569
- β¬οΈ dep-bump: bump plum>=2.7.0 by @nstarman in #589
- π· build: update conftest myst parsers by @nstarman in #622
- β dep-add(unxt): make packaging an explicit dependency by @nstarman in #623
- π pin: add v2.0 dependency floors; drop misleading unxt-api comment by @nstarman in #692
- π ci: run the older packages' src doctests in CI by @nstarman in #699
- π pin: add unxt>=2.0.0 floor to unxts.linalg and unxts.parametric by @nstarman in #727
- π¦ build: add a
parametricinstall extra for parity withlinalgby @nstarman in #777
ποΈ Architecture & Infrastructure
- π ci: fix labeler by @nstarman in #491
- π ci: prevent cross-uploads by @nstarman in #502
- Add OSSAR workflow for static analysis by @nstarman in #573
- π¨ script: fix CD triggers (#607) by @nstarman in #610
- π¨ script: CD TestPyPI on main by @nstarman in #611
- Harden PR auto-labeling with pull_request β workflow_run artifact handoff by @nstarman with @Copilot in #626
- Update GitHub Actions workflow for hook updates by @nstarman in #664
- π ci: fix test-oldest matrix so 'Check Oldest Dependencies' actually runs by @nstarman in #677
- π ci: make unxt a test-only dep of unxts.api so its src doctests run by @nstarman in #711
- π ci: add a weekly ecosystem run for per-package jobs by @nstarman in #752
βΏοΈ Accessibility & UX
π·οΈ Types & Validation
- π·οΈ types(unxt-hypothesis): add py.typed marker by @nstarman in #559
- π·οΈ types(unxt-api): add py.typed marker by @nstarman in #563
π¨ Development Experience
- π§βπ» devxp: add copilot instructions by @nstarman in #494
- π¨ script: update copilot instructions by @nstarman in #529
New Contributors
- @joseph-long made their first contribution in #725
Full Changelog: v1.7.2...v2.0.0