{"results":{"result":{"added-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-url":"https://github.com/pytroll/satpy/pull/3382","old-code-health":8.045048087642977,"modified-files":{"code-health":8.08618682496468,"old-code-health":8.045048087642977,"files":[{"file":"satpy/composites/aux_data.py","loc":121,"old-loc":121,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"satpy/composites/config_loader.py","loc":237,"old-loc":237,"code-health":10.0,"old-code-health":10.0},{"file":"satpy/composites/core.py","loc":412,"old-loc":421,"code-health":10.0,"old-code-health":10.0},{"file":"satpy/enhancements/enhancer.py","loc":161,"old-loc":161,"code-health":8.598774368581582,"old-code-health":8.598774368581582},{"file":"satpy/modifiers/_crefl_utils.py","loc":437,"old-loc":435,"code-health":9.240656298427343,"old-code-health":9.240656298427343},{"file":"satpy/modifiers/atmosphere.py","loc":145,"old-loc":138,"code-health":10.0,"old-code-health":10.0},{"file":"satpy/modifiers/spectral.py","loc":131,"old-loc":127,"code-health":9.536386775820924,"old-code-health":9.536386775820924},{"file":"satpy/readers/abi_l1b.py","loc":120,"old-loc":120,"code-health":9.842730062691357,"old-code-health":9.842730062691357},{"file":"satpy/readers/core/abi.py","loc":229,"old-loc":229,"code-health":9.096655465156704,"old-code-health":9.096655465156704},{"file":"satpy/readers/core/file_handlers.py","loc":197,"old-loc":197,"code-health":9.592551999935852,"old-code-health":9.592551999935852},{"file":"satpy/scene.py","loc":1360,"old-loc":1365,"code-health":6.958679722533031,"old-code-health":6.958679722533031},{"file":"satpy/utils.py","loc":735,"old-loc":712,"code-health":7.047147714384096,"old-code-health":7.047147714384096},{"file":"satpy/writers/core/base.py","loc":200,"old-loc":198,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"satpy/writers/mitiff.py","loc":623,"old-loc":625,"code-health":6.075503754659568,"old-code-health":5.729928617859117}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"3382","analysis-time":"2026-05-04T11:52:49Z","negative-impact-count":0,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":2,"commits":["78894c3ec4268cb6b78b5177495ffce84a798046"],"is-negative-review":false,"negative-findings":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"positive-impact-count":4,"repo":"satpy","code-health":8.08618682496468,"version":"3.0","authors":["Stephan Finkensieper"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":2,"number-of-files-touched":3,"findings":[{"name":"Overall Code Complexity","file":"satpy/enhancements/enhancer.py","change-type":"improved","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"Overall Code Complexity is measured by the mean cyclomatic complexity across all functions in the file. The lower the number, the better.\n\nCyclomatic complexity is a function level metric that measures the number of logical branches (if-else, loops, etc.). Cyclomatic complexity is a rough complexity measure, but useful as a way of estimating the minimum number of unit tests you would need. As such, prefer functions with low cyclomatic complexity (2-3 branches).","how-to-fix":"You address the overall cyclomatic complexity by a) modularizing the code, and b) abstract away the complexity. Let's look at some examples:\n\nModularizing the Code: Do an X-Ray and inspect the local hotspots. Are there any complex conditional expressions? If yes, then do a [DECOMPOSE CONDITIONAL](https://refactoring.com/catalog/decomposeConditional.html) refactoring. Extract the conditional logic into a separate function and put a good name on that function. This clarifies the intent and makes the original function easier to read. Repeat until all complex conditional expressions have been simplified.\n\n","what-changed":"The mean cyclomatic complexity decreases from 4.40 to 4.30, threshold = 4"},{"name":"Lines of Code in a Single File","file":"satpy/scene.py","change-type":"improved","change-level":"improvement","is-hotspot?":true,"why-it-occurs":"This module has 1316 lines of code (comments stripped away). This puts the module at risk of evolving into a Brain Class. Brain Classes are problematic since changes become more complex over time, harder to test, and challenging to refactor. Act now to prevent future maintenance issues.","how-to-fix":"Look for opportunities to modularize the design. This is done by identifying groups of functions that represent different responsibilities and/or operate on different data. Once you have identified the different responsibilities, then use refactorings like [EXTRACT CLASS](https://refactoring.com/catalog/extractClass.html).","what-changed":"The lines of code decreases from 1321 to 1316, improve code health by reducing it to 600"},{"name":"Lines of Code in a Single File","file":"satpy/writers/mitiff.py","change-type":"fixed","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"This module has 600 lines of code (comments stripped away). This puts the module at risk of evolving into a Brain Class. Brain Classes are problematic since changes become more complex over time, harder to test, and challenging to refactor. Act now to prevent future maintenance issues.","how-to-fix":"Look for opportunities to modularize the design. This is done by identifying groups of functions that represent different responsibilities and/or operate on different data. Once you have identified the different responsibilities, then use refactorings like [EXTRACT CLASS](https://refactoring.com/catalog/extractClass.html).","what-changed":"The lines of code in this module is no longer above the threshold"},{"name":"Overall Code Complexity","file":"satpy/writers/mitiff.py","change-type":"improved","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"Overall Code Complexity is measured by the mean cyclomatic complexity across all functions in the file. The lower the number, the better.\n\nCyclomatic complexity is a function level metric that measures the number of logical branches (if-else, loops, etc.). Cyclomatic complexity is a rough complexity measure, but useful as a way of estimating the minimum number of unit tests you would need. As such, prefer functions with low cyclomatic complexity (2-3 branches).","how-to-fix":"You address the overall cyclomatic complexity by a) modularizing the code, and b) abstract away the complexity. Let's look at some examples:\n\nModularizing the Code: Do an X-Ray and inspect the local hotspots. Are there any complex conditional expressions? If yes, then do a [DECOMPOSE CONDITIONAL](https://refactoring.com/catalog/decomposeConditional.html) refactoring. Extract the conditional logic into a separate function and put a good name on that function. This clarifies the intent and makes the original function easier to read. Repeat until all complex conditional expressions have been simplified.\n\n","what-changed":"The mean cyclomatic complexity decreases from 6.19 to 6.15, threshold = 4"}]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2026-05-04T11:52:48.000Z","project-name":"satpy","repository":"https://github.com/pytroll/satpy.git"}}