Fix test suite failures: NumPy 2.0 compatibility, API regressions, and FIRE algorithm initialization#26
Draft
Copilot wants to merge 4 commits into5-fix-issue-with-geometry-breaking-from-time-to-timefrom
Conversation
Co-authored-by: Pablo1990 <1974224+Pablo1990@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix issue with geometry breaking from time to time
Enable CI tests on pull requests
Mar 18, 2026
Co-authored-by: Pablo1990 <1974224+Pablo1990@users.noreply.github.com>
…h handling Co-authored-by: Pablo1990 <1974224+Pablo1990@users.noreply.github.com>
Copilot
AI
changed the title
Enable CI tests on pull requests
Fix test suite failures: NumPy 2.0 compatibility, API regressions, and FIRE algorithm initialization
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests were failing due to a mix of NumPy 2.0 breaking changes, API mismatches between test expectations and implementation, and a FIRE algorithm initialization bug introduced in the previous PR.
NumPy 2.0 compatibility
np.in1d→np.isininutils.pynp.Inf→np.infin test fileSet/VertexModelAPI fixesVertexModel.__init__now accepts aSetinstance as the first positional argument (tests callVertexModelBubbles(set_test))Set.__init__gainsset_optionkeyword to call a named preset method after constructionSet.read_mat_fileconverts numpy integer scalars to Python native types, preventing silent uint8 overflow in arithmeticSet.__getattr__fallback added for attributes absent from old.pklfiles (integrator, allfire_*params,noise_random, etc.) — avoidsAttributeErroron deserialized stateFIRE algorithm
fire_minimization_loopwas unconditionally settinggeo._fire_velocitybefore checkinghasattr, soinitialize_fire()(which sets_fire_dt,_fire_alpha, etc.) was never called. Fixed to always callinitialize_fire()at loop entry.VertexModelBubblesfixesgenerate_Xscreates aGeo()instance whenself.geo is None(standalone call without priorinitialize())initialize_cellshandlesfilename=None(skips save) and initializesgeowhen absentrange(len(nCells))→range(nCells)typoface.pyArea0 = Area * Set.ref_A0guarded forref_A0 is None(old mat files omit this field)Test infrastructure
tests.py:load_datauses absolute paths viaTEST_DIRECTORY; callsupdate_lmin0()+update_barrier_tri0()after loading geometry from.matso downstream computations (kgTriAREnergyBarrier,kgTriEnergyBarrier) have non-Noneinputstest_vertexModel.py: all CWD-relative paths replaced withos.path.join(TEST_DIRECTORY, 'Tests_data', ...)CI
pull_requesttrigger totests.yamlso the workflow actually runs on PRs📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.