NRLMMD-GEOIPS / geoips

Main Geolocated Information Processing System code base with basic functionality enabled.
https://nrlmmd-geoips.github.io/geoips/
Other
15 stars 11 forks source link

OBP - Dead Code Elimination #768

Open srikanth-kumar opened 1 month ago

srikanth-kumar commented 1 month ago

Description & background

As part of Order-Based Procflow, we ran all the products to trace the sequence of functions invoked throughout their lifespan. The function mentioned in this issue was not found to be utilized by any product we ran. This issue is created to confirm whether this function call is truly unused and not part of any product or is only meant for NRL internal codebase.

Motivation

Ensure the GeoIPS codebase remains up-to-date and free of any dead code.

Workflow

Specify the product(s) associated with each function call, and/or check the "internal codebase" box if applicable to close this issue.

Reference File :

Check this file for any reference. Please do let @srikanth-kumar know if you have issue accessing this file.

Function

[x] after means I think it is referenced in open source

File path : geoips_utils.py

File path : data_manipulations/info.py

File path : data_manipulations/corrections.py

File path : data_manipulations/merge.py

File path : dev/output_config.py

File path : dev/product.py

File path : interfaces/base.py

File path : image_utils/colormap_utils.py

File path : mpl_utils.py

File path : maps.py

File path : sector_utils/estimate_area_extent.py

File path : sector_utils/overpass_predictor.py

File path : sector_utils/projections.py

File path : sector_utils/tc_tracks.py

File path : sector_utils/utils.py

File path : sector_utils/yaml_utils.py

File path : utils/decorators.py

File path : xarray_utils/data.py

File path : xarray_utils/time.py

File path : xarray_utils/xr_to_dtree.py

mindyls commented 2 weeks ago

geoips/geoips/geoips_utils.py:def find_ascii_palette(name): geoips/geoips/plugins/modules/colormappers/matplotlib_linear_norm.py:from geoips.geoips_utils import find_ascii_palette geoips/geoips/plugins/modules/colormappers/matplotlib_linear_norm.py: ascii_path = find_ascii_palette(cmap_name) geoips/geoips/plugins/modules/colormappers/tpw/tpw_pwat.py: from geoips.geoips_utils import find_ascii_palette geoips/geoips/plugins/modules/colormappers/tpw/tpw_pwat.py: mpl_cmap = from_ascii(find_ascii_palette(name))

mindyls commented 2 weeks ago

bash$ bash check_these.sh find_all_txt_plugins geoips/geoips/geoips_utils.py: all_plugins = find_all_txt_plugins("txt/ascii_palettes") geoips/geoips/geoips_utils.py:def find_all_txt_plugins(subdir=""):

mindyls commented 2 weeks ago

called from "write_yamldict" which does not appear in the "not used" list ?

geoips/geoips/geoips_utils.py:def replace_geoips_paths_in_list( geoips/geoips/geoips_utils.py: dump_dict[key] = replace_geoips_paths_in_list(

geoips/geoips/geoips_utils.py:def replace_geoips_paths_in_dict( geoips/geoips/sector_utils/yaml_utils.py: from geoips.geoips_utils import replace_geoips_paths_in_dict geoips/geoips/sector_utils/yaml_utils.py: dump_yamldict = replace_geoips_paths_in_dict(yamldict)