Skip to content

v2.0.0

Choose a tag to compare

@nstarman nstarman released this 24 Jul 16:06
· 84 commits to main since this release
26f8c18

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_value for 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.parametric by @nstarman in #684
  • ✨ feat: add unxts.linalg package (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 QuantityMatrix short_name "QM" by @nstarman in #795
  • βœ… test(unxts-linalg): cover QuantityMatrix short_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

  • πŸ”’οΈ security: clarify backport policy for older versions by @nstarman in #548

⚑️ 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

πŸ”§ 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 parametric install extra for parity with linalg by @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

  • 🚸 ux(unxt-hypothesis): match quantities shape argument to that in arrays by @nstarman in #521

🏷️ 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

Full Changelog: v1.7.2...v2.0.0