Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-commit hooks, black formatting, and style fixes #1341

Merged
merged 28 commits into from
Jan 4, 2023

Conversation

mgrover1
Copy link
Collaborator

@mgrover1 mgrover1 commented Dec 5, 2022

This make sure our code is style-compliant, and adds tools to help with this.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@mgrover1
Copy link
Collaborator Author

mgrover1 commented Dec 5, 2022

These are the remaining code styling issues:

tests/retrieve/test_echo_class.py:193:26: E711 comparison to None should be 'if cond is None:'
tests/io/test_arm_sonde.py:5:1: F401 'numpy as np' imported but unused
tests/retrieve/test_spectra_calculations.py:10:5: F401 'xarray as xr' imported but unused
pyart/graph/cm_colorblind.py:18:1: F401 '._cm_colorblind.yuv_rainbow_24' imported but unused
pyart/graph/cm_colorblind.py:19:1: F401 '.cm._reverser' imported but unused
pyart/graph/cm_colorblind.py:19:1: F401 '.cm.revcmap' imported but unused
pyart/map/__init__.py:7:1: F401 '.gate_mapper.GateMapper' imported but unused
pyart/map/__init__.py:8:1: F401 '.gates_to_grid.map_gates_to_grid' imported but unused
pyart/map/__init__.py:9:1: F401 '.grid_mapper.example_roi_func_constant' imported but unused
pyart/map/__init__.py:9:1: F401 '.grid_mapper.example_roi_func_dist' imported but unused
pyart/map/__init__.py:9:1: F401 '.grid_mapper.example_roi_func_dist_beam' imported but unused
pyart/map/__init__.py:9:1: F401 '.grid_mapper.grid_from_radars' imported but unused
pyart/map/__init__.py:9:1: F401 '.grid_mapper.map_to_grid' imported but unused
pyart/io/mdv_common.py:697:36: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:711:9: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:727:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:739:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:749:9: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:775:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:786:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:813:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:818:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:845:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:851:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:924:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:928:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:946:9: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:949:28: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:962:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:965:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:980:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:982:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:1012:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:1014:13: E741 ambiguous variable name 'l'
pyart/io/mdv_common.py:1024:9: E741 ambiguous variable name 'l'
pyart/graph/gridmapdisplay_basemap.py:6:1: F401 'warnings' imported but unused
pyart/graph/gridmapdisplay_basemap.py:12:5: F401 'mpl_toolkits.basemap.pyproj' imported but unused
pyart/retrieve/kdp_proc.py:972:5: E741 ambiguous variable name 'l'
pyart/graph/convstrat_scheme_plot.py:57:5: F841 local variable 'fig' is assigned to but never used
pyart/testing/data/make_small_mdv_ppi.py:57:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_ppi.py:70:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_ppi.py:91:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_ppi.py:107:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_ppi.py:113:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_ppi.py:119:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_ppi.py:127:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_ppi.py:128:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_ppi.py:134:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_ppi.py:146:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_ppi.py:154:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_ppi.py:160:1: E741 ambiguous variable name 'l'
pyart/io/auto_read.py:81:9: E722 do not use bare 'except'
pyart/io/auto_read.py:94:9: E722 do not use bare 'except'
pyart/core/__init__.py:6:1: F401 '.grid.Grid' imported but unused
pyart/core/__init__.py:7:1: F401 '.radar.Radar' imported but unused
pyart/core/__init__.py:8:1: F401 '.radar_spectra.RadarSpectra' imported but unused
pyart/core/__init__.py:9:1: F401 '.transforms.antenna_to_cartesian' imported but unused
pyart/core/__init__.py:9:1: F401 '.transforms.antenna_vectors_to_cartesian' imported but unused
pyart/core/__init__.py:9:1: F401 '.transforms.cartesian_to_geographic' imported but unused
pyart/core/__init__.py:9:1: F401 '.transforms.cartesian_to_geographic_aeqd' imported but unused
pyart/core/__init__.py:9:1: F401 '.transforms.cartesian_vectors_to_geographic' imported but unused
pyart/core/__init__.py:9:1: F401 '.transforms.geographic_to_cartesian' imported but unused
pyart/core/__init__.py:9:1: F401 '.transforms.geographic_to_cartesian_aeqd' imported but unused
pyart/core/__init__.py:18:1: F401 '.wind_profile.HorizontalWindProfile' imported but unused
tests/correct/test_phase_proc.py:18:5: F401 'cvxopt' imported but unused
tests/correct/test_phase_proc.py:25:5: F401 'glpk' imported but unused
tests/correct/test_phase_proc.py:33:5: F401 'cylp.cy' imported but unused
pyart/aux_io/rainbow_wrl.py:10:5: F401 'wradlib' imported but unused
pyart/aux_io/rainbow_wrl.py:18:1: E722 do not use bare 'except'
pyart/aux_io/rainbow_wrl.py:196:5: F841 local variable 'scan_rate' is assigned to but never used
pyart/testing/tmpdirs.py:39:1: E266 too many leading '#' for block comment
pyart/testing/tmpdirs.py:44:1: E266 too many leading '#' for block comment
pyart/retrieve/echo_class.py:278:9: E722 do not use bare 'except'
pyart/retrieve/echo_class.py:657:5: F841 local variable 'dist_sorted' is assigned to but never used
pyart/correct/phase_proc.py:224:5: F841 local variable 'data_wind' is assigned to but never used
pyart/correct/phase_proc.py:827:5: F401 'cylp.py.modeling.CyLPModel.CyLPArray' imported but unused
pyart/correct/phase_proc.py:827:5: F401 'cylp.py.modeling.CyLPModel.CyLPModel' imported but unused
pyart/correct/phase_proc.py:830:5: F841 local variable 'n_rays' is assigned to but never used
pyart/correct/phase_proc.py:887:5: F401 'cylp.cy.CyClpSimplex.CyClpSimplex' imported but unused
pyart/correct/__init__.py:7:1: F401 '..filters.gatefilter.GateFilter' imported but unused
pyart/correct/__init__.py:7:1: F401 '..filters.gatefilter.moment_based_gate_filter' imported but unused
pyart/correct/__init__.py:8:1: F401 '.attenuation.calculate_attenuation' imported but unused
pyart/correct/__init__.py:8:1: F401 '.attenuation.calculate_attenuation_philinear' imported but unused
pyart/correct/__init__.py:8:1: F401 '.attenuation.calculate_attenuation_zphi' imported but unused
pyart/correct/__init__.py:13:1: F401 '.bias_and_noise.correct_bias' imported but unused
pyart/correct/__init__.py:13:1: F401 '.bias_and_noise.correct_noise_rhohv' imported but unused
pyart/correct/__init__.py:14:1: F401 '.dealias.dealias_fourdd' imported but unused
pyart/correct/__init__.py:15:1: F401 '.despeckle.despeckle_field' imported but unused
pyart/correct/__init__.py:15:1: F401 '.despeckle.find_objects' imported but unused
pyart/correct/__init__.py:16:1: F401 '.phase_proc.phase_proc_lp' imported but unused
pyart/correct/__init__.py:16:1: F401 '.phase_proc.phase_proc_lp_gf' imported but unused
pyart/correct/__init__.py:17:1: F401 '.region_dealias.dealias_region_based' imported but unused
pyart/correct/__init__.py:18:1: F401 '.unwrap.dealias_unwrap_phase' imported but unused
tests/io/test_chl.py:286:5: F841 local variable 'radar' is assigned to but never used
pyart/retrieve/simple_moment_calculations.py:184:5: E741 ambiguous variable name 'l'
pyart/aux_io/noxp_iphex_nc.py:194:47: E713 test for membership should be 'not in'
pyart/graph/gridmapdisplay.py:20:5: F401 'metpy' imported but unused
pyart/graph/gridmapdisplay.py:31:5: F401 'xarray' imported but unused
pyart/graph/gridmapdisplay.py:38:5: F401 'netCDF4' imported but unused
tests/graph/test_radarmapdisplay_basemap.py:24:5: F841 local variable 'ax' is assigned to but never used
tests/graph/test_radarmapdisplay_basemap.py:56:5: F841 local variable 'ax' is assigned to but never used
tests/graph/test_cm.py:37:5: F841 local variable 'spec_reversed' is assigned to but never used
tests/graph/test_cm.py:40:5: F841 local variable 'cmap' is assigned to but never used
pyart/graph/__init__.py:57:1: F401 '.cm' imported but unused
pyart/graph/__init__.py:57:1: F401 '.cm_colorblind' imported but unused
pyart/graph/__init__.py:58:1: F401 '.convstrat_scheme_plot.plot_convstrat_scheme' imported but unused
pyart/graph/__init__.py:59:1: F401 '.gridmapdisplay.GridMapDisplay' imported but unused
pyart/graph/__init__.py:60:1: F401 '.gridmapdisplay_basemap.GridMapDisplayBasemap' imported but unused
pyart/graph/__init__.py:61:1: F401 '.radardisplay.RadarDisplay' imported but unused
pyart/graph/__init__.py:62:1: F401 '.radardisplay_airborne.AirborneRadarDisplay' imported but unused
pyart/graph/__init__.py:63:1: F401 '.radarmapdisplay.RadarMapDisplay' imported but unused
pyart/graph/__init__.py:64:1: F401 '.radarmapdisplay_basemap.RadarMapDisplayBasemap' imported but unused
scripts/check_cfradial:18:10: F821 undefined name 'unicode'
scripts/check_cfradial:311:9: E722 do not use bare 'except'
scripts/check_cfradial:518:13: E722 do not use bare 'except'
scripts/check_cfradial:930:17: E722 do not use bare 'except'
pyart/retrieve/qpe.py:315:9: F841 local variable 'secondary_field' is assigned to but never used
pyart/retrieve/qpe.py:411:9: F841 local variable 'secondary_field' is assigned to but never used
pyart/retrieve/qpe.py:554:9: F841 local variable 'secondary_field' is assigned to but never used
tests/io/test_uf.py:12:1: F401 'numpy.testing.assert_raises' imported but unused
tests/io/test_uf.py:102:5: F841 local variable 'radar' is assigned to but never used
tests/io/test_uf.py:165:1: F811 redefinition of unused 'test_scan_type' from line 49
examples/io/plot_nexrad_data_aws.py:20:1: E265 block comment should start with '# '
examples/io/plot_nexrad_data_aws.py:81:1: E265 block comment should start with '# '
pyart/retrieve/comp_z.py:115:13: F841 local variable 'az_final' is assigned to but never used
pyart/correct/despeckle.py:189:9: F841 local variable 'cond' is assigned to but never used
pyart/config.py:88:5: E722 do not use bare 'except'
pyart/config.py:318:16: E713 test for membership should be 'not in'
tests/retrieve/test_comp_z.py:19:5: E266 too many leading '#' for block comment
tests/retrieve/test_comp_z.py:34:5: E266 too many leading '#' for block comment
tests/retrieve/test_comp_z.py:56:5: E266 too many leading '#' for block comment
pyart/retrieve/vad.py:141:35: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
pyart/testing/data/make_small_mdv_rhi.py:56:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_rhi.py:68:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_rhi.py:88:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_rhi.py:104:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_rhi.py:110:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_rhi.py:116:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_rhi.py:124:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_rhi.py:129:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_rhi.py:141:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_rhi.py:149:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_mdv_rhi.py:155:1: E741 ambiguous variable name 'l'
pyart/core/radar_spectra.py:6:1: F401 'copy' imported but unused
pyart/core/radar_spectra.py:7:1: F401 'sys' imported but unused
pyart/__check_build/__init__.py:49:5: F401 '._check_build.check_build' imported but unused
pyart/_debug_info.py:39:5: E722 do not use bare 'except'
pyart/_debug_info.py:46:5: E722 do not use bare 'except'
pyart/_debug_info.py:53:5: E722 do not use bare 'except'
pyart/_debug_info.py:60:5: E722 do not use bare 'except'
pyart/_debug_info.py:67:5: E722 do not use bare 'except'
pyart/_debug_info.py:74:5: E722 do not use bare 'except'
pyart/_debug_info.py:81:5: E722 do not use bare 'except'
pyart/_debug_info.py:85:9: F401 'cylp' imported but unused
pyart/_debug_info.py:88:5: E722 do not use bare 'except'
pyart/_debug_info.py:95:5: E722 do not use bare 'except'
pyart/_debug_info.py:102:5: E722 do not use bare 'except'
pyart/_debug_info.py:109:5: E722 do not use bare 'except'
pyart/_debug_info.py:116:5: E722 do not use bare 'except'
tests/util/test_simulated_vel.py:4:1: F401 'pytest' imported but unused
pyart/aux_io/gamic_hdf5.py:239:13: E722 do not use bare 'except'
pyart/aux_io/gamic_hdf5.py:246:13: E722 do not use bare 'except'
pyart/retrieve/gate_id.py:10:5: F401 'cftime.datetime' imported but unused
pyart/aux_io/__init__.py:16:1: F401 '.arm_vpt.read_kazr' imported but unused
pyart/aux_io/__init__.py:17:1: F401 '.d3r_gcpex_nc.read_d3r_gcpex_nc' imported but unused
pyart/aux_io/__init__.py:18:1: F401 '.edge_netcdf.read_edge_netcdf' imported but unused
pyart/aux_io/__init__.py:19:1: F401 '.gamic_hdf5.read_gamic' imported but unused
pyart/aux_io/__init__.py:20:1: F401 '.kazr_spectra.read_kazr_spectra' imported but unused
pyart/aux_io/__init__.py:21:1: F401 '.noxp_iphex_nc.read_noxp_iphex_nc' imported but unused
pyart/aux_io/__init__.py:22:1: F401 '.odim_h5.read_odim_h5' imported but unused
pyart/aux_io/__init__.py:23:1: F401 '.pattern.read_pattern' imported but unused
pyart/aux_io/__init__.py:24:1: F401 '.radx.read_radx' imported but unused
pyart/aux_io/__init__.py:25:1: F401 '.radx_grid.read_radx_grid' imported but unused
pyart/aux_io/__init__.py:26:1: F401 '.rainbow_wrl.read_rainbow_wrl' imported but unused
pyart/aux_io/__init__.py:27:1: F401 '.rxm25.read_rxm25' imported but unused
pyart/aux_io/__init__.py:28:1: F401 '.sinarame_h5.read_sinarame_h5' imported but unused
pyart/aux_io/__init__.py:28:1: F401 '.sinarame_h5.write_sinarame_cfradial' imported but unused
tests/io/test_uf_write.py:14:1: F401 'numpy.testing.assert_almost_equal' imported but unused
tests/io/test_uf_write.py:14:1: F401 'numpy.testing.assert_raises' imported but unused
pyart/testing/data/make_small_chl_rhi.py:9:1: F401 'struct' imported but unused
pyart/testing/data/make_small_chl_rhi.py:11:1: F401 'numpy as np' imported but unused
pyart/testing/data/check_nexrad_dummy.py:3:1: F401 'numpy as np' imported but unused
pyart/testing/data/check_nexrad_dummy.py:4:1: F401 'numpy.testing.assert_allclose' imported but unused
pyart/testing/data/check_nexrad_dummy.py:4:1: F401 'numpy.testing.assert_array_equal' imported but unused
pyart/retrieve/__init__.py:6:1: F401 '.advection.grid_displacement_pc' imported but unused
pyart/retrieve/__init__.py:6:1: F401 '.advection.grid_shift' imported but unused
pyart/retrieve/__init__.py:7:1: F401 '.comp_z.composite_reflectivity' imported but unused
pyart/retrieve/__init__.py:8:1: F401 '.echo_class.conv_strat_yuter' imported but unused
pyart/retrieve/__init__.py:8:1: F401 '.echo_class.get_freq_band' imported but unused
pyart/retrieve/__init__.py:8:1: F401 '.echo_class.hydroclass_semisupervised' imported but unused
pyart/retrieve/__init__.py:8:1: F401 '.echo_class.steiner_conv_strat' imported but unused
pyart/retrieve/__init__.py:14:1: F401 '.gate_id.fetch_radar_time_profile' imported but unused
pyart/retrieve/__init__.py:14:1: F401 '.gate_id.map_profile_to_gates' imported but unused
pyart/retrieve/__init__.py:15:1: F401 '.kdp_proc.kdp_maesaka' imported but unused
pyart/retrieve/__init__.py:15:1: F401 '.kdp_proc.kdp_schneebeli' imported but unused
pyart/retrieve/__init__.py:15:1: F401 '.kdp_proc.kdp_vulpiani' imported but unused
pyart/retrieve/__init__.py:16:1: F401 '.qpe.est_rain_rate_a' imported but unused
pyart/retrieve/__init__.py:16:1: F401 '.qpe.est_rain_rate_hydro' imported but unused
pyart/retrieve/__init__.py:16:1: F401 '.qpe.est_rain_rate_kdp' imported but unused
pyart/retrieve/__init__.py:16:1: F401 '.qpe.est_rain_rate_z' imported but unused
pyart/retrieve/__init__.py:16:1: F401 '.qpe.est_rain_rate_za' imported but unused
pyart/retrieve/__init__.py:16:1: F401 '.qpe.est_rain_rate_zkdp' imported but unused
pyart/retrieve/__init__.py:16:1: F401 '.qpe.est_rain_rate_zpoly' imported but unused
pyart/retrieve/__init__.py:25:1: F401 '.qvp.quasi_vertical_profile' imported but unused
pyart/retrieve/__init__.py:26:1: F401 '.simple_moment_calculations.calculate_snr_from_reflectivity' imported but unused
pyart/retrieve/__init__.py:26:1: F401 '.simple_moment_calculations.calculate_velocity_texture' imported but unused
pyart/retrieve/__init__.py:26:1: F401 '.simple_moment_calculations.compute_cdr' imported but unused
pyart/retrieve/__init__.py:26:1: F401 '.simple_moment_calculations.compute_l' imported but unused
pyart/retrieve/__init__.py:26:1: F401 '.simple_moment_calculations.compute_noisedBZ' imported but unused
pyart/retrieve/__init__.py:26:1: F401 '.simple_moment_calculations.compute_snr' imported but unused
pyart/retrieve/__init__.py:34:1: F401 '.spectra_calculations.dealias_spectra' imported but unused
pyart/retrieve/__init__.py:34:1: F401 '.spectra_calculations.spectra_moments' imported but unused
pyart/retrieve/__init__.py:35:1: F401 '.vad.vad_browning' imported but unused
pyart/retrieve/__init__.py:35:1: F401 '.vad.vad_michelson' imported but unused
tests/io/test_mdv_radar.py:361:5: F841 local variable 'radar' is assigned to but never used
pyart/aux_io/arm_vpt.py:157:47: E713 test for membership should be 'not in'
pyart/testing/data/make_small_sigmet_ppi.py:43:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_sigmet_ppi.py:62:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_sigmet_ppi.py:81:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_sigmet_ppi.py:95:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_sigmet_ppi.py:103:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_sigmet_ppi.py:141:1: E741 ambiguous variable name 'l'
pyart/aux_io/sinarame_h5.py:452:9: F841 local variable 'cal_temps' is assigned to but never used
pyart/testing/data/make_small_sigmet_rhi.py:43:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_sigmet_rhi.py:62:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_sigmet_rhi.py:81:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_sigmet_rhi.py:95:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_sigmet_rhi.py:103:1: E741 ambiguous variable name 'l'
pyart/testing/data/make_small_sigmet_rhi.py:141:1: E741 ambiguous variable name 'l'
pyart/io/__init__.py:11:1: F401 '.arm_sonde.read_arm_sonde' imported but unused
pyart/io/__init__.py:11:1: F401 '.arm_sonde.read_arm_sonde_vap' imported but unused
pyart/io/__init__.py:12:1: F401 '.auto_read.read' imported but unused
pyart/io/__init__.py:13:1: F401 '.cfradial.read_cfradial' imported but unused
pyart/io/__init__.py:13:1: F401 '.cfradial.write_cfradial' imported but unused
pyart/io/__init__.py:14:1: F401 '.chl.read_chl' imported but unused
pyart/io/__init__.py:15:1: F401 '.common.prepare_for_read' imported but unused
pyart/io/__init__.py:16:1: F401 '.grid_io.read_grid' imported but unused
pyart/io/__init__.py:16:1: F401 '.grid_io.write_grid' imported but unused
pyart/io/__init__.py:17:1: F401 '.mdv_grid.read_grid_mdv' imported but unused
pyart/io/__init__.py:17:1: F401 '.mdv_grid.write_grid_mdv' imported but unused
pyart/io/__init__.py:18:1: F401 '.mdv_radar.read_mdv' imported but unused
pyart/io/__init__.py:19:1: F401 '.nexrad_archive.read_nexrad_archive' imported but unused
pyart/io/__init__.py:20:1: F401 '.nexrad_cdm.read_nexrad_cdm' imported but unused
pyart/io/__init__.py:21:1: F401 '.nexradl3_read.read_nexrad_level3' imported but unused
pyart/io/__init__.py:22:1: F401 '.output_to_geotiff.write_grid_geotiff' imported but unused
pyart/io/__init__.py:23:1: F401 '.rsl.read_rsl' imported but unused
pyart/io/__init__.py:24:1: F401 '.sigmet.read_sigmet' imported but unused
pyart/io/__init__.py:25:1: F401 '.uf.read_uf' imported but unused
pyart/io/__init__.py:26:1: F401 '.uf_write.write_uf' imported but unused
setup.py:18:1: F401 'subprocess' imported but unused
setup.py:22:1: F401 'Cython' imported but unused
setup.py:104:1: E302 expected 2 blank lines, found 1
tests/graph/test_gridmapdisplay.py:54:5: F841 local variable 'ax1' is assigned to but never used
tests/graph/test_gridmapdisplay.py:66:5: F841 local variable 'ax2' is assigned to but never used
tests/graph/test_gridmapdisplay.py:72:5: F841 local variable 'ax4' is assigned to but never used
tests/graph/test_gridmapdisplay.py:75:5: F841 local variable 'ax5' is assigned to but never used
tests/graph/test_gridmapdisplay.py:78:5: F841 local variable 'ax6' is assigned to but never used
tests/graph/test_gridmapdisplay.py:83:5: F841 local variable 'ax7' is assigned to but never used
pyart/graph/radardisplay.py:9:1: F401 'netCDF4' imported but unused
pyart/graph/radardisplay.py:14:1: F401 '..core.transforms.antenna_to_cartesian' imported but unused
pyart/__init__.py:30:1: F401 'functools as _functools' imported but unused
pyart/__init__.py:31:1: F401 'os.path as _osp' imported but unused
pyart/__init__.py:32:1: F401 'sys as _sys' imported but unused
pyart/__init__.py:38:1: F401 '.map' imported but unused
pyart/__init__.py:38:1: F401 '.__check_build' imported but unused
pyart/__init__.py:38:1: F401 '.aux_io' imported but unused
pyart/__init__.py:38:1: F401 '.bridge' imported but unused
pyart/__init__.py:38:1: F401 '.config' imported but unused
pyart/__init__.py:38:1: F401 '.core' imported but unused
pyart/__init__.py:38:1: F401 '.correct' imported but unused
pyart/__init__.py:38:1: F401 '.filters' imported but unused
pyart/__init__.py:38:1: F401 '.graph' imported but unused
pyart/__init__.py:38:1: F401 '.io' imported but unused
pyart/__init__.py:38:1: F401 '.retrieve' imported but unused
pyart/__init__.py:38:1: F401 '.testing' imported but unused
pyart/__init__.py:38:1: F401 '.util' imported but unused
pyart/__init__.py:53:1: F401 '._debug_info._debug_info' imported but unused
pyart/__init__.py:56:1: F401 '.config.load_config' imported but unused
tests/graph/test_gridmapdisplay_basemap.py:129:5: F841 local variable 'basemap' is assigned to but never used
examples/plotting/plot_modify_colorbar.py:17:1: F401 'numpy as np' imported but unused
pyart/aux_io/rxm25.py:21:1: F401 '..core.radar.Radar' imported but unused
pyart/util/__init__.py:9:1: F401 '.circular_stats.angular_mean' imported but unused
pyart/util/__init__.py:9:1: F401 '.circular_stats.angular_mean_deg' imported but unused
pyart/util/__init__.py:9:1: F401 '.circular_stats.angular_std' imported but unused
pyart/util/__init__.py:9:1: F401 '.circular_stats.angular_std_deg' imported but unused
pyart/util/__init__.py:9:1: F401 '.circular_stats.interval_mean' imported but unused
pyart/util/__init__.py:9:1: F401 '.circular_stats.interval_std' imported but unused
pyart/util/__init__.py:9:1: F401 '.circular_stats.mean_of_two_angles' imported but unused
pyart/util/__init__.py:9:1: F401 '.circular_stats.mean_of_two_angles_deg' imported but unused
pyart/util/__init__.py:19:1: F401 '.columnsect.for_azimuth' imported but unused
pyart/util/__init__.py:19:1: F401 '.columnsect.get_column_rays' imported but unused
pyart/util/__init__.py:19:1: F401 '.columnsect.get_field_location' imported but unused
pyart/util/__init__.py:19:1: F401 '.columnsect.sphere_distance' imported but unused
pyart/util/__init__.py:25:1: F401 '.datetime_utils.datetime_from_dataset' imported but unused
pyart/util/__init__.py:25:1: F401 '.datetime_utils.datetime_from_grid' imported but unused
pyart/util/__init__.py:25:1: F401 '.datetime_utils.datetime_from_radar' imported but unused
pyart/util/__init__.py:25:1: F401 '.datetime_utils.datetimes_from_dataset' imported but unused
pyart/util/__init__.py:25:1: F401 '.datetime_utils.datetimes_from_radar' imported but unused
pyart/util/__init__.py:32:1: F401 '.hildebrand_sekhon.estimate_noise_hs74' imported but unused
pyart/util/__init__.py:33:1: F401 '.radar_utils.image_mute_radar' imported but unused
pyart/util/__init__.py:33:1: F401 '.radar_utils.is_vpt' imported but unused
pyart/util/__init__.py:33:1: F401 '.radar_utils.join_radar' imported but unused
pyart/util/__init__.py:33:1: F401 '.radar_utils.subset_radar' imported but unused
pyart/util/__init__.py:33:1: F401 '.radar_utils.to_vpt' imported but unused
pyart/util/__init__.py:34:1: F401 '.sigmath.angular_texture_2d' imported but unused
pyart/util/__init__.py:34:1: F401 '.sigmath.rolling_window' imported but unused
pyart/util/__init__.py:34:1: F401 '.sigmath.texture' imported but unused
pyart/util/__init__.py:34:1: F401 '.sigmath.texture_along_ray' imported but unused
pyart/util/__init__.py:35:1: F401 '.simulated_vel.simulated_vel_from_profile' imported but unused
pyart/util/__init__.py:36:1: F401 '.xsect.cross_section_ppi' imported but unused
pyart/util/__init__.py:36:1: F401 '.xsect.cross_section_rhi' imported but unused
tests/core/test_grid.py:18:5: F401 'xarray' imported but unused
tests/core/test_grid.py:24:1: F401 'datetime' imported but unused
pyart/filters/__init__.py:6:1: F401 '.gatefilter.GateFilter' imported but unused
pyart/filters/__init__.py:6:1: F401 '.gatefilter.iso0_based_gate_filter' imported but unused
pyart/filters/__init__.py:6:1: F401 '.gatefilter.moment_and_texture_based_gate_filter' imported but unused
pyart/filters/__init__.py:6:1: F401 '.gatefilter.moment_based_gate_filter' imported but unused
pyart/filters/__init__.py:6:1: F401 '.gatefilter.temp_based_gate_filter' imported but unused
pyart/correct/_common_dealias.py:30:9: E722 do not use bare 'except'
pyart/io/mdv_grid.py:139:9: E741 ambiguous variable name 'l'
pyart/correct/region_dealias.py:510:13: F841 local variable 'vel_wo_cur' is assigned to but never used

Hoping to finish this up this week.

@mgrover1 mgrover1 force-pushed the add-pre-commit-hooks-black-formatting branch from 2e42f93 to cce5fb7 Compare December 7, 2022 21:07
@mgrover1
Copy link
Collaborator Author

mgrover1 commented Dec 7, 2022

Home stretch... these are the remaining updates required

tests/retrieve/test_echo_class.py:193:26: E711 comparison to None should be 'if cond is None:'
tests/io/test_arm_sonde.py:5:1: F401 'numpy as np' imported but unused
tests/retrieve/test_spectra_calculations.py:10:5: F401 'xarray as xr' imported but unused
pyart/graph/cm_colorblind.py:18:1: F401 '._cm_colorblind.yuv_rainbow_24' imported but unused
pyart/graph/cm_colorblind.py:19:1: F401 '.cm._reverser' imported but unused
pyart/graph/cm_colorblind.py:19:1: F401 '.cm.revcmap' imported but unused
pyart/graph/gridmapdisplay_basemap.py:6:1: F401 'warnings' imported but unused
pyart/graph/gridmapdisplay_basemap.py:12:5: F401 'mpl_toolkits.basemap.pyproj' imported but unused
pyart/retrieve/kdp_proc.py:972:5: E741 ambiguous variable name 'l'
pyart/graph/convstrat_scheme_plot.py:57:5: F841 local variable 'fig' is assigned to but never used
pyart/io/auto_read.py:81:9: E722 do not use bare 'except'
pyart/io/auto_read.py:94:9: E722 do not use bare 'except'
tests/correct/test_phase_proc.py:18:5: F401 'cvxopt' imported but unused
tests/correct/test_phase_proc.py:25:5: F401 'glpk' imported but unused
tests/correct/test_phase_proc.py:33:5: F401 'cylp.cy' imported but unused
pyart/aux_io/rainbow_wrl.py:10:5: F401 'wradlib' imported but unused
pyart/aux_io/rainbow_wrl.py:18:1: E722 do not use bare 'except'
pyart/aux_io/rainbow_wrl.py:196:5: F841 local variable 'scan_rate' is assigned to but never used
pyart/testing/tmpdirs.py:39:1: E266 too many leading '#' for block comment
pyart/testing/tmpdirs.py:44:1: E266 too many leading '#' for block comment
pyart/retrieve/echo_class.py:278:9: E722 do not use bare 'except'
pyart/retrieve/echo_class.py:657:5: F841 local variable 'dist_sorted' is assigned to but never used
pyart/correct/phase_proc.py:224:5: F841 local variable 'data_wind' is assigned to but never used
pyart/correct/phase_proc.py:827:5: F401 'cylp.py.modeling.CyLPModel.CyLPArray' imported but unused
pyart/correct/phase_proc.py:827:5: F401 'cylp.py.modeling.CyLPModel.CyLPModel' imported but unused
pyart/correct/phase_proc.py:830:5: F841 local variable 'n_rays' is assigned to but never used
pyart/correct/phase_proc.py:887:5: F401 'cylp.cy.CyClpSimplex.CyClpSimplex' imported but unused
tests/io/test_chl.py:286:5: F841 local variable 'radar' is assigned to but never used
pyart/retrieve/simple_moment_calculations.py:184:5: E741 ambiguous variable name 'l'
pyart/aux_io/noxp_iphex_nc.py:194:47: E713 test for membership should be 'not in'
pyart/graph/gridmapdisplay.py:20:5: F401 'metpy' imported but unused
pyart/graph/gridmapdisplay.py:31:5: F401 'xarray' imported but unused
pyart/graph/gridmapdisplay.py:38:5: F401 'netCDF4' imported but unused
tests/graph/test_radarmapdisplay_basemap.py:24:5: F841 local variable 'ax' is assigned to but never used
tests/graph/test_radarmapdisplay_basemap.py:56:5: F841 local variable 'ax' is assigned to but never used
tests/graph/test_cm.py:37:5: F841 local variable 'spec_reversed' is assigned to but never used
tests/graph/test_cm.py:40:5: F841 local variable 'cmap' is assigned to but never used
scripts/check_cfradial:18:10: F821 undefined name 'unicode'
scripts/check_cfradial:311:9: E722 do not use bare 'except'
scripts/check_cfradial:518:13: E722 do not use bare 'except'
scripts/check_cfradial:930:17: E722 do not use bare 'except'
pyart/retrieve/qpe.py:315:9: F841 local variable 'secondary_field' is assigned to but never used
pyart/retrieve/qpe.py:411:9: F841 local variable 'secondary_field' is assigned to but never used
pyart/retrieve/qpe.py:554:9: F841 local variable 'secondary_field' is assigned to but never used
tests/io/test_uf.py:12:1: F401 'numpy.testing.assert_raises' imported but unused
tests/io/test_uf.py:102:5: F841 local variable 'radar' is assigned to but never used
tests/io/test_uf.py:165:1: F811 redefinition of unused 'test_scan_type' from line 49
examples/io/plot_nexrad_data_aws.py:20:1: E265 block comment should start with '# '
examples/io/plot_nexrad_data_aws.py:81:1: E265 block comment should start with '# '
pyart/retrieve/comp_z.py:115:13: F841 local variable 'az_final' is assigned to but never used
pyart/correct/despeckle.py:189:9: F841 local variable 'cond' is assigned to but never used
pyart/config.py:88:5: E722 do not use bare 'except'
pyart/config.py:318:16: E713 test for membership should be 'not in'
tests/retrieve/test_comp_z.py:19:5: E266 too many leading '#' for block comment
tests/retrieve/test_comp_z.py:34:5: E266 too many leading '#' for block comment
tests/retrieve/test_comp_z.py:56:5: E266 too many leading '#' for block comment
pyart/retrieve/vad.py:141:35: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
pyart/core/radar_spectra.py:6:1: F401 'copy' imported but unused
pyart/core/radar_spectra.py:7:1: F401 'sys' imported but unused
pyart/__check_build/__init__.py:49:5: F401 '._check_build.check_build' imported but unused
tests/util/test_simulated_vel.py:4:1: F401 'pytest' imported but unused
pyart/aux_io/gamic_hdf5.py:239:13: E722 do not use bare 'except'
pyart/aux_io/gamic_hdf5.py:246:13: E722 do not use bare 'except'
pyart/retrieve/gate_id.py:10:5: F401 'cftime.datetime' imported but unused
tests/io/test_uf_write.py:14:1: F401 'numpy.testing.assert_almost_equal' imported but unused
tests/io/test_uf_write.py:14:1: F401 'numpy.testing.assert_raises' imported but unused
pyart/testing/data/make_small_chl_rhi.py:9:1: F401 'struct' imported but unused
pyart/testing/data/make_small_chl_rhi.py:11:1: F401 'numpy as np' imported but unused
pyart/testing/data/check_nexrad_dummy.py:3:1: F401 'numpy as np' imported but unused
pyart/testing/data/check_nexrad_dummy.py:4:1: F401 'numpy.testing.assert_allclose' imported but unused
pyart/testing/data/check_nexrad_dummy.py:4:1: F401 'numpy.testing.assert_array_equal' imported but unused
tests/io/test_mdv_radar.py:361:5: F841 local variable 'radar' is assigned to but never used
pyart/aux_io/arm_vpt.py:157:47: E713 test for membership should be 'not in'

@mgrover1 mgrover1 requested a review from zssherman December 21, 2022 20:00
@zssherman
Copy link
Collaborator

@mgrover1 Good work on this! I'll take a look, might take a bit with 230 files haha, but I'll get a review going

@mgrover1
Copy link
Collaborator Author

Great - thanks! Yeah... no worries about it taking a bit

- pip:
- wheel
- watchdog
- flake8
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want all of these in our user environment file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, if people are going to be developing with this, I think they should be? They are relatively straight forward packages to install (and well supported)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgrover1 I would say maybe a base environment.yml for users and an environment_dev.yml, for those who want more.

coverage, twine, sphinx etc I doubt a user will use, maybe pytest.

@mgrover1
Copy link
Collaborator Author

Alrighty thanks for the comments so far @zssherman - I made those suggested changes!

- pip:
- wheel
- watchdog
- flake8
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgrover1 I would say maybe a base environment.yml for users and an environment_dev.yml, for those who want more.

coverage, twine, sphinx etc I doubt a user will use, maybe pytest.

pyart/correct/attenuation.py Show resolved Hide resolved
pyart/graph/gridmapdisplay.py Outdated Show resolved Hide resolved
pyart/graph/gridmapdisplay_basemap.py Outdated Show resolved Hide resolved
pyart/graph/radarmapdisplay.py Outdated Show resolved Hide resolved
pyart/retrieve/qpe.py Show resolved Hide resolved
pyart/retrieve/qpe.py Show resolved Hide resolved
pyart/retrieve/qpe.py Show resolved Hide resolved
pyart/util/columnsect.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
@mgrover1
Copy link
Collaborator Author

mgrover1 commented Jan 3, 2023

#1341 (comment)

@zssherman I think its worth keeping it more simple, with everything in the environment.yml, since it would be more straightforward to develop from there instead of having to know pyart-env and pyart-dev.

The packages included here are pretty well maintained

@zssherman
Copy link
Collaborator

@mgrover1 Sounds good, reverted environment files.

@mgrover1
Copy link
Collaborator Author

mgrover1 commented Jan 4, 2023

This looks good to me!

@mgrover1
Copy link
Collaborator Author

mgrover1 commented Jan 4, 2023

@zssherman should we go ahead and merge?

@zssherman
Copy link
Collaborator

@mgrover1 Yeah I think this is good to go!

@mgrover1 mgrover1 merged commit 61fe772 into ARM-DOE:main Jan 4, 2023
@mgrover1 mgrover1 deleted the add-pre-commit-hooks-black-formatting branch March 8, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants