CodeScene PR Check
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 114 findings(s) 🚩
- Improving Code Health: 40 findings(s) ✅
Details
🚩 Declining Code Health (highest to lowest):
- Low Cohesion test_partitioning.py
- Code Duplication test_partitioning.py
- Code Duplication geospatial.py
- Low Cohesion partitioning.py
- Code Duplication checks.py
- Code Duplication test_geospatial.py
- Complex Method facetgrid.py: CustomFacetGrid.init
- Large Method test_manipulations.py: test_extract_dataset_above_bin
- Lines of Code in a Single File methods.py
- Lines of Code in a Single File partitioning.py
- Overall Code Complexity writers.py
- Code Duplication retrieval_1b_radar.py
- Lines of Code in a Single File test_partitioning.py
- Code Duplication test_writers.py
- Code Duplication test_checks.py
- Code Duplication test_manipulations.py
- Code Duplication test_xarray.py
- Code Duplication test_facetgrid.py
- Lines of Code in a Single File test_plot.py
- Code Duplication test_transect.py
- Lines of Code in a Single File checks.py
- Lines of Code in a Single File geospatial.py
- Code Duplication subsetting.py
- Code Duplication xarray.py
- Overall Code Complexity xarray.py
- Deep, Nested Complexity xarray.py: has_unique_chunking
- Overall Code Complexity orbit.py
- Overall Code Complexity profile.py
- Large Method animation.py: create_ffmpeg_gif
- Complex Method readers.py: read_bucket
- Large Method animation.py: create_gifski_gif
- Large Method find.py: find_filepaths
- Large Method test_manipulations.py: test_extract_dataset_below_bin
- Complex Method plot.py: _get_orientation_location
- Large Method plot.py: plot_map
- Large Method animation.py: create_ffmpeg_mp4
- Large Method retrieval_1b_radar.py: open_dataset_1b_ka_fs
- Complex Conditional partitioning.py: _apply_flatten_arrays
- Complex Method partitioning.py: Base2DPartitioning.to_xarray
- Large Method routines.py: write_granules_bucket
- Complex Method conf.py: linkcode_resolve
- Large Method retrieval_2a_radar.py: retrieve_SHI
- Complex Method readers.py: _read_dataframe
- Complex Method test_routines.py: test_write_granules_bucket
- Number of Functions in a Single Module methods.py
- Complex Conditional readers.py: read_bucket
- Excess Number of Function Arguments readers.py: read_bucket
- Complex Method writers.py: preprocess_writer_kwargs
- Complex Conditional writers.py: preprocess_writer_kwargs
- Excess Number of Function Arguments checks.py: _check_xarray_conditions
- Complex Method datatree.py: _identify_error
- Complex Conditional coordinates.py: add_cmb_height
- Complex Conditional retrieval_1b_radar.py: get_dielectric_constant
- Excess Number of Function Arguments retrieval_1b_radar.py: open_dataset_1b_ka_fs
- Number of Functions in a Single Module test_plot.py
- Complex Method manipulations.py: _get_valid_da_bin
- Excess Number of Function Arguments subsetting.py: _subset
- Complex Method animation.py: check_frame_settings
- Missing Arguments Abstractions animation.py
- Missing Arguments Abstractions profile.py
- Complex Method xarray.py: squeeze_unsqueeze_dataarray
- Complex Method xarray.py: ensure_dim_order_dataset
- Complex Method geospatial.py: check_extent
- Complex Method xarray.py: squeeze_unsqueeze_dataset
- Complex Method orbit.py: infer_orbit_xy_dim
- Complex Method plot.py: get_valid_pcolormesh_inputs
- Complex Method partitioning.py: TilePartitioning.init
- Complex Method geospatial.py: _check_padding
- Complex Method geospatial.py: _check_size
- Complex Method orbit.py: infer_orbit_xy_coords
- Complex Method plot.py: preprocess_figure_args
- Bumpy Road Ahead xarray.py: squeeze_unsqueeze_dataarray
- Bumpy Road Ahead orbit.py: infer_orbit_xy_dim
- Complex Method profile.py: _ensure_valid_pcolormesh_coords
- Complex Method retrieval_1b_radar.py: resample_hs_to_fs
- Bumpy Road Ahead partitioning.py: Base2DPartitioning.to_xarray
- Bumpy Road Ahead readers.py: read_bucket
- Bumpy Road Ahead retrieval_1b_radar.py: get_dielectric_constant
- Bumpy Road Ahead retrieval_1b_radar.py: resample_hs_to_fs
- Bumpy Road Ahead test_routines.py: test_write_granules_bucket
- Excess Number of Function Arguments geospatial.py: crop_around_point
- Excess Number of Function Arguments geospatial.py: get_crop_slices_around_point
- Bumpy Road Ahead plot.py: _get_orientation_location
- Bumpy Road Ahead profile.py: _ensure_valid_pcolormesh_coords
- Complex Method retrieval_1b_radar.py: get_dielectric_constant
- Bumpy Road Ahead xarray.py: ensure_dim_order_dataset
- Bumpy Road Ahead xarray.py: squeeze_unsqueeze_dataset
- Bumpy Road Ahead orbit.py: infer_orbit_xy_coords
- Excess Number of Function Arguments routines.py: merge_granule_buckets
- Excess Number of Function Arguments routines.py: write_granules_bucket
- Excess Number of Function Arguments manipulations.py: get_bin_dataarray
- Excess Number of Function Arguments manipulations.py: _get_valid_da_bin
- Excess Number of Function Arguments manipulations.py: extract_dataset_above_bin
- Excess Number of Function Arguments manipulations.py: extract_dataset_below_bin
- Excess Number of Function Arguments animation.py: create_ffmpeg_gif
- Excess Number of Function Arguments routines.py: write_bucket
- Excess Number of Function Arguments animation.py: create_gifski_gif
- Excess Number of Function Arguments io.py: get_filepaths_within_paths
- Excess Number of Function Arguments io.py: get_filepaths_by_path
- Excess Number of Function Arguments io.py: search_leaf_files
- Excess Number of Function Arguments io.py: get_filepaths
- Excess Number of Function Arguments io.py: get_filepaths_by_partition
- Excess Number of Function Arguments partitioning.py: TilePartitioning.init
- Excess Number of Function Arguments routines.py: write_granule_bucket
- Excess Number of Function Arguments animation.py: create_ffmpeg_mp4
- Excess Number of Function Arguments partitioning.py: get_tile_id_labels
- Excess Number of Function Arguments partitioning.py: get_tile_xy_labels
- Excess Number of Function Arguments partitioning.py: Base2DPartitioning.add_centroids
- Excess Number of Function Arguments partitioning.py: XYPartitioning.init
- Excess Number of Function Arguments partitioning.py: LonLatPartitioning.init
- Excess Number of Function Arguments animation.py: _get_ffmpeg_filter_complex_value
- Excess Number of Function Arguments partitioning.py: Base2DPartitioning.init
- Excess Number of Function Arguments animation.py: create_pillow_gif
- Excess Number of Function Arguments animation.py: create_apng
✅ Improving Code Health:
- Code Duplication checks.py
- Overall Code Complexity facetgrid.py
- Missing Arguments Abstractions orbit.py
- Missing Arguments Abstractions plot.py
- Complex Method plot.py: _plot_cartopy_pcolormesh
- Complex Method orbit.py: _call_over_contiguous_scans
- Bumpy Road Ahead orbit.py: _call_over_contiguous_scans
- Excess Number of Function Arguments grid.py: _plot_grid_map_cartopy
- Excess Number of Function Arguments orbit.py: _plot_orbit_map_cartopy
- Excess Number of Function Arguments orbit.py: _plot_orbit_map_facetgrid
- Excess Number of Function Arguments orbit.py: plot_orbit_map
- Excess Number of Function Arguments grid.py: _plot_grid_image
- Excess Number of Function Arguments grid.py: plot_grid_image
- Excess Number of Function Arguments grid.py: _plot_grid_image_facetgrid
- Excess Number of Function Arguments writers.py: write_dataset_bucket
- Excess Number of Function Arguments writers.py: write_granule_bucket
- Excess Number of Function Arguments writers.py: write_granules_bucket
- Excess Number of Function Arguments orbit.py: _plot_orbit_image
- Excess Number of Function Arguments orbit.py: _plot_orbit_image_facetgrid
- Excess Number of Function Arguments orbit.py: plot_orbit_image
- Excess Number of Function Arguments methods.py: GPM_Dataset_Accessor.plot_map
- Excess Number of Function Arguments test_checks.py: test_is_spatial_2d
- Excess Number of Function Arguments test_checks.py: test_is_spatial_3d
- Excess Number of Function Arguments test_checks.py: test_is_transect
- Excess Number of Function Arguments test_checks.py: test__is_transect_datarray
- Excess Number of Function Arguments plot.py: plot_map
- Excess Number of Function Arguments methods.py: GPM_DataArray_Accessor.plot_map
- Excess Number of Function Arguments plot.py: _plot_cartopy_imshow
- Excess Number of Function Arguments plot.py: _plot_cartopy_pcolormesh
- Excess Number of Function Arguments plot.py: _plot_mpl_imshow
- Excess Number of Function Arguments plot.py: _plot_xr_imshow
- Excess Number of Function Arguments plot.py: _plot_xr_pcolormesh
- Excess Number of Function Arguments analysis.py: pl_add_geographic_bins
- Deep, Nested Complexity io.py: _retrieve_list_bin_dir_path
- Large Method writers.py: write_granules_bucket
- Excess Number of Function Arguments conftest.py: dataset_collection
- Code Duplication grid.py
- Missing Arguments Abstractions grid.py
- Low Cohesion plot.py
- Complex Conditional plot.py: _plot_cartopy_pcolormesh
Annotations
Check warning on line 224 in docs/source/conf.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
linkcode_resolve has a cyclomatic complexity of 15, 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/accessor/methods.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Lines of Code in a Single File
This module has 691 lines of code, improve code health by reducing it to 600. The number of Lines of Code in a single file. More Lines of Code lowers the code health.
Check warning on line 1 in gpm/accessor/methods.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Number of Functions in a Single Module
This module has 85 functions, threshold = 75. This file contains too many functions. Beyond a certain threshold, more functions lower the code health.
Check notice on line 485 in gpm/accessor/methods.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Excess Number of Function Arguments
GPM_Base_Accessor.plot_transect_line increases from 5 to 8 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 720 in gpm/accessor/methods.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Excess Number of Function Arguments
GPM_Dataset_Accessor.plot_map decreases from 13 to 12 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 779 in gpm/accessor/methods.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Excess Number of Function Arguments
GPM_Dataset_Accessor.plot_transect increases from 7 to 10 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 923 in gpm/accessor/methods.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Excess Number of Function Arguments
GPM_DataArray_Accessor.plot_map decreases from 12 to 11 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 978 in gpm/accessor/methods.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Excess Number of Function Arguments
GPM_DataArray_Accessor.plot_transect increases from 6 to 9 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 414 in gpm/accessor/methods.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Excess Number of Function Arguments
GPM_Base_Accessor.get_slices_contiguous_scans has 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 440 in gpm/accessor/methods.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Excess Number of Function Arguments
GPM_Base_Accessor.get_slices_valid_geolocation has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 462 in gpm/accessor/methods.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Excess Number of Function Arguments
GPM_Base_Accessor.get_slices_regular has 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check warning on line 270 in gpm/bucket/readers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
read_bucket has a cyclomatic complexity of 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 133 in gpm/bucket/readers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
_read_dataframe has a cyclomatic complexity of 11, 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 256 in gpm/bucket/readers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
read_bucket 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 270 in gpm/bucket/readers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
read_bucket has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
Check warning on line 270 in gpm/bucket/readers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Excess Number of Function Arguments
read_bucket has 13 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check warning on line 218 in gpm/bucket/writers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
preprocess_writer_kwargs has a cyclomatic complexity of 13, 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 173 in gpm/bucket/writers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
preprocess_writer_kwargs 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/bucket/writers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 4.08 across 13 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 notice on line 241 in gpm/bucket/writers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Excess Number of Function Arguments
write_dataset_bucket is no longer above the threshold for number of arguments. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 280 in gpm/bucket/writers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Excess Number of Function Arguments
write_granule_bucket is no longer above the threshold for number of arguments. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 367 in gpm/bucket/writers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Excess Number of Function Arguments
write_granules_bucket is no longer above the threshold for number of arguments. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 250 in gpm/bucket/writers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Excess Number of Function Arguments
write_arrow_partitioned_dataset has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 266 in gpm/bucket/writers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Excess Number of Function Arguments
write_pandas_partitioned_dataset has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 280 in gpm/bucket/writers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Excess Number of Function Arguments
write_polars_partitioned_dataset has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.