{"results":{"result":{"added-files":{"code-health":10.0,"old-code-health":0.0,"files":[{"file":"satpy/_instruments.py","loc":132,"code-health":10.0},{"file":"satpy/tests/test_instruments.py","loc":74,"code-health":10.0}]},"external-review-url":"https://github.com/pytroll/satpy/pull/3390","old-code-health":8.608507482158368,"modified-files":{"code-health":8.639086725485745,"old-code-health":8.608507482158368,"files":[{"file":"satpy/composites/aux_data.py","loc":122,"old-loc":121,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"satpy/composites/config_loader.py","loc":238,"old-loc":237,"code-health":10.0,"old-code-health":10.0},{"file":"satpy/composites/core.py","loc":413,"old-loc":421,"code-health":10.0,"old-code-health":10.0},{"file":"satpy/enhancements/enhancer.py","loc":174,"old-loc":161,"code-health":9.153951349905014,"old-code-health":8.598774368581582},{"file":"satpy/modifiers/_crefl_utils.py","loc":438,"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":198,"old-loc":198,"code-health":9.592551999935852,"old-code-health":9.592551999935852},{"file":"satpy/scene.py","loc":1396,"old-loc":1365,"code-health":6.958679722533031,"old-code-health":6.958679722533031},{"file":"satpy/utils.py","loc":712,"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},{"file":"satpy/composites/fill.py","loc":330,"old-loc":328,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"satpy/composites/glm.py","loc":75,"old-loc":76,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"satpy/dependency_tree.py","loc":476,"old-loc":474,"code-health":9.35180736302492,"old-code-health":9.35180736302492},{"file":"satpy/_config.py","loc":124,"old-loc":123,"code-health":10.0,"old-code-health":10.0},{"file":"satpy/tests/compositor_tests/test_aux_data.py","loc":82,"old-loc":82,"code-health":10.0,"old-code-health":10.0},{"file":"satpy/tests/compositor_tests/test_core.py","loc":405,"old-loc":405,"code-health":9.387218218812514,"old-code-health":9.387218218812514},{"file":"satpy/tests/reader_tests/test_abi_l1b.py","loc":388,"old-loc":388,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"satpy/tests/scene_tests/test_load.py","loc":526,"old-loc":526,"code-health":9.387218218812514,"old-code-health":9.387218218812514},{"file":"satpy/tests/test_utils.py","loc":528,"old-loc":528,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"satpy/tests/reader_tests/test_iasi_l2.py","loc":334,"old-loc":334,"code-health":10.0,"old-code-health":10.0},{"file":"satpy/tests/reader_tests/test_iasi_l2_so2_bufr.py","loc":325,"old-loc":325,"code-health":10.0,"old-code-health":10.0},{"file":"satpy/tests/reader_tests/test_seviri_l1b_native.py","loc":1224,"old-loc":1224,"code-health":7.545948593178235,"old-code-health":7.545948593178235},{"file":"satpy/tests/scene_tests/test_data_access.py","loc":357,"old-loc":331,"code-health":10.0,"old-code-health":10.0}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"3390","analysis-time":"2026-05-22T14:03:03Z","negative-impact-count":0,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":2,"commits":["78894c3ec4268cb6b78b5177495ffce84a798046","dac04571a88774c8311dd8116540173d0be74afb","8ffb67196c0e91b00652a46a1cbee554e34ee830","2d730ea73fd586217f6e322c88251dbc9d337f21","180a040d1add950511a052d4d95ed7a40a45f4bb","46b08c29df381d506f44f70ce40e9911fecb9537","fe1d232708a987fd92c00b1ffb241837b859d86d","32ee183d63e51f3f543994ad3e8fd2e962b9d8fd","bb04e29e28d35dbab461fa33c77733f170a603a7","fbb55cf450df149dde5775058b23abb5d01f6a9e","9633197b1fce4d3bcc9f93de78dd9f0f9cb4f829","1d362c7fceec86b30f6f04599e005e29e805a865","ae1d8e712b0a958ca86d552a544f5e55e302429b","d95a3f3492116fcac882c35a870d780abc81c3ed","2107f44cb32206b7622db402bb3deaa99dd79095","78e0de97b39bcf1e9efc152069289def6f74fc4b","32a8e024b7508ab44ab557782f04cbc4dc282c3b","1e69183e15f7453dc05928d8262ebd3678b2cea9","e4a53b6f167cc6649333821d36be440c64e64724","db7731ddedf59ca72822c16f15e607af1ccabc5f","8d50a8d9525969727f22a758982464c94937f72c","f0970e39eec8d1b2c288fccc605f8bf6eabdadf1","9ca9b79b9d689e94481e568ada6f4f7fc09c8d27","6fa9743dc3c8c92d92b23fb10895b41cbd8c067a","677a3886562961760cfc8739739762812f3caba4","0f9c99c838ce854684fe8f6af13e8864f59931b0","5ecfa7f693b1c4035af689664281238ff34c22d3","020a1d9ba98a6d2089f4284af355750db436c2ae","18744ea539e220ceb71b62fd7cec1f3ab7cd0c1b","98eaa15a8f59841ede59b2527a553726d6a967e5","8afd9f254fde1eda3b180b7ba744df2f326462cc","bd2a3555c9c51e18a610b4ea6dca28a49d405e19","e0e76de83333f5b009878fed4cef00077f5ed19c","f6a5fee34eb59b47b719cb36afb7acc9ce6689d3","02c455a1abc7ea94d0b27eabbd8915f82a3a312d","c147e098d84d5f371e1d8fcbb462791c957174de","e9e3e9f3b2c7a19fdc30b8f122885572ec53f6f4","bbe02e14e831fe30e4b8854af23fd48ce8e2620c","831938d4ca409468722985f0d029fe1fa77c21bd","da4b46018de59d2b150260b505276ee4d4ef5a29"],"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.665738321126959,"version":"3.0","authors":["Stephan Finkensieper"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":3,"number-of-files-touched":3,"findings":[{"name":"Overall Code Complexity","file":"satpy/enhancements/enhancer.py","change-type":"fixed","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 in this module is no longer above the threshold"},{"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"},{"name":"Code Duplication","file":"satpy/tests/scene_tests/test_load.py","change-type":"improved","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"Duplicated code often leads to code that's harder to change since the same logical change has to be done in multiple functions. More duplication gives lower code health.","how-to-fix":"A certain degree of duplicated code might be acceptable. The problems start when it is the same behavior that is duplicated across the functions in the module, ie. a violation of the Don't Repeat Yourself (DRY) principle. DRY violations lead to code that is changed together in predictable patterns, which is both expensive and risky. DRY violations can be identified using CodeScene's X-Ray analysis to detect clusters of change coupled functions with high code similarity. [Read More](https://codescene.com/blog/software-revolution-part3/)\n\nOnce you have identified the similarities across functions, look to extract and encapsulate the concept that varies into its own function(s). These shared abstractions can then be re-used, which minimizes the amount of duplication and simplifies change.","what-changed":"reduced similar code in: TestLoadingComposites.test_load_when_sensor_none_in_preloaded_dataarrays,TestSceneAllAvailableDatasets.test_available_when_sensor_none_in_preloaded_dataarrays"}]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2026-05-22T14:03:03.000Z","project-name":"satpy","repository":"https://github.com/pytroll/satpy.git"}}