Incosistent rekenresultaat debug - #113
Merged
Merged
Conversation
chrispijo
commented
Aug 21, 2026
|
|
||
| def _run_calculation(row_unique: dict) -> SystemCalculation: | ||
| debug: bool = os.environ.get("GEOPROB_DEBUG", False) | ||
| if debug: logger.debug("Start berekening voor %s", row_unique) |
Collaborator
Author
There was a problem hiding this comment.
Ik heb het overzichtelijker gemaakt door if debug: te gebruiken.
chrispijo
commented
Aug 21, 2026
| ), None, None | ||
| # logger = logging.getLogger(__name__) | ||
| calc = _run_calculation(row_unique) | ||
| result = _collect_results(calc) |
Collaborator
Author
There was a problem hiding this comment.
Zoals eerder al besproken, de regels code in _worker korter gemaakt door de logica op te splitsen naar twee sub-functies.
chrispijo
commented
Aug 21, 2026
| error_count_append = "" | ||
| if self.log_errors > 0: | ||
| error_count_append = f" (of which {self.log_errors} failed calculations)" | ||
| if self.n_calc_totaal == self.done: |
Collaborator
Author
There was a problem hiding this comment.
Ook een progress report toegevoegd na het uitvoeren van de laatste berekening.
chrispijo
commented
Aug 21, 2026
| CALCULATION_MAPPER[geohydrologisch_model]['system_builder']( | ||
| geopackage_filepath=geopackage_filepath, | ||
| to_run_vakken_ids=to_run_vakken_ids)) | ||
| class BuildAndRunCalculations: |
Collaborator
Author
There was a problem hiding this comment.
Zoals eerder besproken, functie omgezet naar class zodat alle onderdelen in aparte methods te zetten zijn met elk een beperkt aantal regels.
Collaborator
Author
|
Na aanleiding van review de code wat heringedeeld. @VincentJilesen. Kun jij deze aanpassingen nog een keer reviewen? |
VincentJilesen
approved these changes
Aug 21, 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.
Zie issue met verdere uitleg.