Skip to content

Fix polars categorical casting to float

61a3bbb
Select commit
Loading
Failed to load commit list.
Open

Add open_files function to read GPM files from list of file paths #81

Fix polars categorical casting to float
61a3bbb
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Aug 25, 2025 in 1m 8s

CodeScene PR Check

Quality Gate Failed

Gates Failed
Enforce advisory code health rules (3 files with Complex Method, Code Duplication, Complex Conditional, Overall Code Complexity, Missing Arguments Abstractions)

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce advisory code health rules Violations Code Health Impact
dataset.py 4 advisory rules 7.97 → 6.64 Suppress
conventions.py 1 advisory rule 8.72 → 8.70 Suppress
coordinates.py 1 advisory rule 8.82 → 8.79 Suppress

Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Code Duplication dataset.py
  • Overall Code Complexity dataset.py
  • Complex Method conventions.py: finalize_dataset
  • Complex Method coordinates.py: set_coordinates
  • Complex Conditional dataset.py: _infer_product_name
  • Missing Arguments Abstractions dataset.py

Annotations

Check warning on line 217 in gpm/dataset/conventions.py

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

finalize_dataset increases in cyclomatic complexity from 16 to 17, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 1 in gpm/dataset/dataset.py

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Code Duplication

The module contains 2 functions with similar structure: open_dataset,open_datatree. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 505 in gpm/dataset/dataset.py

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Conditional

_infer_product_name has 1 complex conditionals with 2 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.

Check warning on line 1 in gpm/dataset/dataset.py

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Overall Code Complexity

This module has a mean cyclomatic complexity of 6.57 across 7 functions. The mean complexity threshold is 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.

Check warning on line 1 in gpm/dataset/dataset.py

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Missing Arguments Abstractions

The average number of function arguments in this module is 8.00 across 7 functions. The average arguments threshold is 4.00. The functions in this file have too many arguments, indicating a lack of encapsulation or too many responsibilities in the same functions. Avoid adding more.

Check warning on line 268 in gpm/dataset/decoding/coordinates.py

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

set_coordinates increases in cyclomatic complexity from 11 to 12, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.