Fix genetic algorithm crash + broken weather tests#185
Open
knQzx wants to merge 2 commits into52North:mainfrom
Open
Fix genetic algorithm crash + broken weather tests#185knQzx wants to merge 2 commits into52North:mainfrom
knQzx wants to merge 2 commits into52North:mainfrom
Conversation
pymoo returns None for res.F/res.X when all candidates violate constraints, which crashes terminate() with AttributeError. Now catches that and raises a proper error message. Fixes 52North#164
these had like 5 things wrong at once — no test_ prefix, wrong number of params, assertions comparing a variable to itself, wrong expected values, copy-pasted param names. rewrote them properly with correct values and added edge cases + a roundtrip test. Fixes 52North#161
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.
Found a couple of issues while reading through the code:
Genetic algorithm crashes with AttributeError when no feasible solution exists (res.F is None). Added a guard that catches this and gives a clear error message instead. (Fix: Genetic algorithm crashes when no feasible solution exists #164)
get_u/get_v tests in test_weather.py were never actually running — no test_ prefix, wrong param count, self-referential asserts, wrong expected values. Rewrote them with proper values and added some extra edge cases. (fix(tests): test_get_u and test_get_v are never collected by pytest and contain self-referential assertions #161)
I also emailed gsoc@52north.org about GSoC 2026 (knqzx0@gmail.com).