• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bluesky / hklpy2 / 25187899633
100%

Build:
DEFAULT BRANCH: main
Ran 30 Apr 2026 08:38PM UTC
Jobs 1
Files 26
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Apr 2026 08:32PM UTC coverage: 100.0%. Remained the same
25187899633

push

github

web-flow
fix #384 #386 stale solver state after calc_UB and sample switch (#392)

Replace the single-boolean ``Core._solver_needs_update`` with a
fine-grained ``_SolverDirty`` bitfield (in ``hklpy2.utils``) tracking
the SAMPLE / UB / MODE / EXTRAS / WAVELENGTH domains independently.

Fix two stale-state bugs surfaced by the new tracking:

* ``Core.sample`` setter (#386): now flags ``SAMPLE | UB`` and drops
  the partial U / UB push to the previous sample's solver state, so
  the new sample's lattice + stored UB are re-pushed together on the
  next ``inverse()`` / ``forward()``.  Unknown sample names now raise
  ``KeyError`` instead of silently corrupting state.
* ``Core.calc_UB`` (#384): no longer falsely clears all dirty domains
  after computing UB; the U / UB setters' legitimate UB flag persists
  and is honestly cleared by an immediate ``update_solver()``.

Also:

* Hoist ``request_solver_update`` into a back-compat shim that
  accepts either a bool (legacy) or ``_SolverDirty`` (additive).
* Lattice mutations and ``Sample.U`` / ``Sample.UB`` setters now
  flag only the appropriate domains.
* ``Core.mode`` getter / setter flag ``MODE | EXTRAS`` (a mode change
  may reset the solver's extra-axis values).
* SAMPLE re-push in ``update_solver()`` implies a re-push of MODE,
  EXTRAS, U, UB (some backends discard those when accepting a new
  sample state).
* New regression tests (``test_i384_i386.py``, 19 cases) cover sample
  switch, round-trip switch, calc_UB-then-inverse, switch-then-calc_UB,
  unknown-sample KeyError, per-domain flag granularity, and back-compat
  for the boolean and property API surfaces.
* ``AGENTS.md``: add a mandatory "Solver-Backend Agnosticism" section
  formalising the rule that backend-specific names and side effects
  must not appear outside ``hklpy2/backends/*``.
* ``@versionchanged`` decorators on ``Core.sample`` setter and
  ``Core.calc_UB``; ``@versionadded`` on ``_SolverDirty``.
* Release-notes entries under Fixes (#384, #386) a... (continued)

56 of 56 new or added lines in 3 files covered. (100.0%)

3390 of 3390 relevant lines covered (100.0%)

4.99 hits per line

Jobs
ID Job ID Ran Files Coverage
1 25187899633.1 30 Apr 2026 08:40PM UTC 26
100.0
GitHub Action Run
Source Files on build 25187899633
  • Tree
  • List 26
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d212ab0b on github
  • Prev Build on main (#25178606747)
  • Next Build on main (#25193189621)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc