Skip to content

Update pint requirement from >=0.25.2 to >=0.25.3 - #4

Merged
wpfleger96 merged 1 commit into
mainfrom
dependabot/uv/pint-gte-0.25.3
Apr 24, 2026
Merged

Update pint requirement from >=0.25.2 to >=0.25.3#4
wpfleger96 merged 1 commit into
mainfrom
dependabot/uv/pint-gte-0.25.3

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Apr 24, 2026

Copy link
Copy Markdown

Updates the requirements on pint to permit the latest version.

Changelog

Sourced from pint's changelog.

0.25.3 (2026-03-19)

  • GenericPlainRegistry.parse_expression now correctly returns a dimensionless Quantity when taking a float, int, or NaN (#2259)
  • Replace MIP with scipy in Quantity.to_preferred (#2264)
  • New unit formatting modifier added (^) to format unit with negative exponents (#2256)
  • Add atomic unit of electric field gradient (atomic_unit_of_electric_field_gradient, a_u_efg) (#2269)
  • Defer expensive loading of dask.array (#2265)
  • Add support for numpy's vdot, inner, outer, linalg.outer, matvec, vecmat, tensordot, and linalg.tensordot (#2279)

0.25.2 (2025-11-06)

  • Revert typing change in pint.Unit

0.25.1 (2025-11-01)

  • Fix raising exception in Quantity.from_tuple with invalid units (#2199)
  • Several unit definition fixes.
  • Add devcontainer.json to add GitHub Codespace support (#2208)
  • Add support for numpy.geomspace (#2206)
  • Add support for linalg.diagonal, linalg.matrix_transpose, diag, tril, triu, linalg.eigvals, linalg.eigvalsh, linalg.matrix_norm and linalg.vector_norm (#2210)
  • An example of performing currency conversions that change over time has been added to the docs. (#2240)
  • Add support for pint.Quantity being used as Generic. (#2231)
  • Add a typing and IDE autocomplete page to the documentation. (#2243)
  • Fixed nan/nan to return nan rather than 1 in unit conversion (#2228)

0.25.0 (2025-08-25)

  • Bump minimum Python version to 3.11.
  • Upgrade code to Python 3.11.
  • Move to pixi/uv/ruff.
  • Refactor compat to make it easier to test.
  • Implemented several pixi environment and tasks to simplify development.
  • Add docs to the functions in pint.testing (PR #2070)
  • Fix round function returning float instead of int (#2081)
  • Fix return type of PlainQuantity.to (#2088)
  • Update constants to CODATA 2022 recommended values. (#2049)
  • Fixed issue with .to_compact and Magnitudes with uncertainties / Quantities with units (PR #2069, issue #2044)
  • Fixed issue in unit conversion which led to loss of precision when using decimal. (#2107)
  • Add conductivity dimension. (#2112)
  • Add absorbance unit and dimension. (#2114)
  • Add membrane filtration flux and permeability dimensionality, and shorthand "LMH". (#2116)
  • Fix find_shortest_path to use breadth first search (#2146)
  • Fix typo in pyproject.toml: rename AS_MIP to HAS_MIP so that MIP support is correctly detected. (#2152)

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [pint](https://github.com/hgrecco/pint) to permit the latest version.
- [Changelog](https://github.com/hgrecco/pint/blob/master/CHANGES)
- [Commits](hgrecco/pint@0.25.2...0.25.3)

---
updated-dependencies:
- dependency-name: pint
  dependency-version: 0.25.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Apr 24, 2026
@wpfleger96
wpfleger96 merged commit 7c18b36 into main Apr 24, 2026
1 check passed
@dependabot
dependabot Bot deleted the dependabot/uv/pint-gte-0.25.3 branch April 24, 2026 23:22
wpfleger96 added a commit that referenced this pull request Aug 3, 2026
…context, compliance denominator

Address all Thufir pass-1 CRITICAL and IMPORTANT findings:

CRITICAL — BreathService cross-profile read isolation
- Add profile_id to BreathService.__init__ (required arg).
- _resolve_session_for_date, get_breath_table, find_windows,
  compare_epochs, get_nightly_summary, get_analysis_status all join
  through Device.profile_id == self._profile_id.
- get_device_capabilities verifies device ownership; returns null/empty
  for foreign devices.
- fetch_waveform_window_raw accepts optional profile_id and enforces
  ownership when supplied.
- get_waveform_window passes self._profile_id through.
- 7 two-profile adversarial tests: foreign session/device IDs, date
  auto-selection, capabilities, find_windows, compare_epochs, waveform.

IMPORTANT — AnalysisFacade latest-run selector inconsistency
- analysis_facade.py: add id DESC tie-breaker to all 3 row_number()
  ORDER BY clauses (list_status, delete_latest, get_analysis_result).

IMPORTANT — compliance denominator
- get_nightly_range_summary: divide by n_calendar not n_nights.

IMPORTANT — waveform corruption swallowed as CHANNEL_ABSENT
- compute_waveform_window: re-raise ValueError (corrupt blob / sample
  mismatch); only unknown exceptions collapse to missing_channels.

IMPORTANT — contextual event values were session means not at-event
- get_contextual_events: use waveform window seam (pressure/leak ±5 s,
  MV over prior 120 s). null + NOT_AVAILABLE when channel absent.

IMPORTANT — CA analysis used proxy instead of persisted data
- get_ca_analysis: periodic_breathing_pct from persisted
  periodic_breathing_episodes (total duration / session duration * 100).
  MV rolling variance from MV waveform binned into 10-min windows.

IMPORTANT — breath-table zero-coercion and missing peak_exp_flow
- Add peak_exp_flow_lpm to models.Breath (nullable, no migration per
  ruling #4), ComputedBreath, and store_result().
- _build_computed_breaths threads peak_expiratory_flow through.
- BreathRow fields (timing, amplitude, shape, class) made nullable;
  get_breath_table passes None instead of or-0.0/or-1/or-False.

IMPORTANT — compare_epochs metrics filter and cross-epoch identity
- metrics filter: only requested DistributionMetric fields are computed;
  unrequested fields receive null DistributionStats.
- Cross-epoch CROSS_VERSION_REFUSAL_KEYS comparison added at return.

MINOR
- Replace datetime.utcfromtimestamp deprecation in TZ test with
  datetime.fromtimestamp(epoch, tz=UTC).replace(tzinfo=None).

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
wpfleger96 added a commit that referenced this pull request Aug 3, 2026
…metrics, epoch refusal, capabilities, validation

Addresses all Thufir pass-2 CRITICAL and IMPORTANT findings.

CRITICAL:
- Add DeviceAmbiguityError raised when ≥2 devices have sessions on same date
- Add _resolve_device() centralizing profile-scoped device resolution
- Add _fetch_day_sessions() returning all sessions for a resolved device/date
- Add _reduce_day_status() pure reducer implementing 5-case precedence:
  mixed identities → MIXED_VERSION; all-OK → OK; all-NOT_RUN → NOT_RUN;
  all-STALE → STALE; anything else (incl. stale+not-run) → PARTIAL
- Update find_windows(), get_nightly_summary(), get_nightly_range_summary(),
  compare_epochs(), get_contextual_events(), get_ca_analysis() to use helpers

IMPORTANT #4 (status test):
- Rename test_stale_and_not_run_find_windows_status_is_stale to _is_partial
- Flip expectation to PARTIAL (stale+not-run → PARTIAL per plan §1 line 864)
- Add plan-line citation comments to all status/precedence assertions

IMPORTANT #5 (compliance):
- get_nightly_summary() reads Day.total_therapy_hours instead of summing Session.duration_seconds
- get_nightly_range_summary() validates date_end >= date_start

IMPORTANT #6 (capabilities):
- rx_keys_present uses RX_KEYS from rx_tracker (not CROSS_VERSION_REFUSAL_KEYS)
- Add list_supported_models() to ParserRegistry aggregating parser metadata
- get_device_capabilities() uses list_supported_models()

IMPORTANT #7 (epoch refusal):
- Move RX homogeneity check before any breath queries
- Check ALL contributing sessions per night (not just first session)
- Immediately refuse with null distributions when RX violation detected

IMPORTANT #8 (corruption propagation):
- get_contextual_events() and get_ca_analysis() narrow except-Exception catches
  to re-raise ValueError (corrupt blob) while swallowing absent-channel errors

IMPORTANT #9 (input validation):
- get_contextual_events() validates event_types (non-empty strings or None)
  and min_duration (>= 0 or None)

IMPORTANT #2 (CA metrics):
- Implement preceding_mv_slope via linear regression over prior 120s MV
- Implement ps_delivered_cmh2o via mean(THERAPY_PRESSURE - EPAP) over ±5s
- Implement stability_index as CV (std/mean) of MV over prior 120s
- Fix WaveformWindowRequest window_cap_seconds bypass for full-session MV fetch
- get_ca_analysis() and get_contextual_events() now aggregate across ALL sessions

New tests:
- TestSameProfileTwoDevice: DeviceAmbiguityError for methods without device_id
- TestSplitNight: contextual events and CA analysis return from both sessions
- TestContextualEventsInputValidation: invalid event_types and min_duration
- TestNightlyRangeDateValidation: reversed date range raises ValueError

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant