Skip to content

Conversation

@philipc2
Copy link
Member

@philipc2 philipc2 commented Aug 11, 2025

Overview

  • Removed macos-14 workflow, which is no longer needed as macos-latest now defaults to ARM architecture
  • Removed CodeCov from this workflow, which was taking a significant amount of time and should not run each time.

@philipc2 philipc2 changed the title Create main.yml DRAFT: Record Test Execution Time Aug 11, 2025
@philipc2 philipc2 self-assigned this Aug 11, 2025
@philipc2
Copy link
Member Author

@rajeeja

I've added a CI workflow to time our tests and see which ones are contributing to the significant slowdowns. I'll share some reports once they finish running, and we can delegate fixes to each as well.

@philipc2
Copy link
Member Author

For the slowest run (windows), looks like:

  • Unit Tests: ~12 minutes
  • Coverage Tests: ~28 minutes

We run our coverage tests with Numba disabled, which is probably one of the issues.

Slowest Unit Tests

Time (s) Test
85.74 test/test_cross_sections.py::test_constant_lat_cross_section_grid
59.83 test/test_geometry.py::test_populate_bounds_GCAList_mix_latlon_bounds_mix
59.60 test/test_spatial_hashing.py::test_construction
54.85 test/test_cross_sections.py::test_north_pole
51.58 test/test_spatial_hashing.py::test_is_inside
51.11 test/test_cross_sections.py::TestArcs::test_latitude_along_arc
50.94 test/test_geometry.py::test_populate_bounds_GCA_mix_latlon_bounds_mix
42.75 test/test_remap.py::test_b_return_types_and_counts
26.27 test/test_remap.py::test_b_edge_centers_dim_change
22.72 test/test_point_in_face.py::test_face_centers[healpix]
21.34 test/test_weighted_mean.py::test_csne30_equal_area_dask[1]
19.06 test/test_plot.py::test_to_raster
12.32 test/test_point_in_face.py::test_face_centers[quadhex]
11.81 test/test_point_in_face.py::test_coordinates[quadhex]
10.58 test/test_integrate.py::test_get_zonal_faces_weight_at_constLat_on_pole_one_face
9.81 test/test_integrate.py::test_get_zonal_faces_weight_at_constLat_regular
9.70 test/test_api.py::test_open_grid
9.57 test/test_weighted_mean.py::test_csne30_equal_area_dask[2]
7.74 test/test_geopandas.py::test_read_shpfile
7.27 test/test_geometry.py::test_populate_bounds_normal_latlon_bounds_gca
6.98 test/test_geometry.py::test_populate_bounds_normal_latlon_bounds_gca_list
6.89 test/test_dataarray.py::test_get_dual
6.80 test/test_geometry.py::test_populate_bounds_normal_latlon_bounds_latlonface
4.36 test/test_weighted_mean.py::test_csne30_equal_area_dask[4]
3.66 test/test_integrate.py::test_compare_zonal_weights
3.42 test/test_geometry.py::test_pole_point_inside_polygon_from_vertice_north
2.96 test/test_integrate.py::test_get_faces_constLat_intersection_info_one_intersection
2.91 test/test_helpers.py::test_face_area_coords
2.71 test/test_dataarray.py::test_to_geodataframe
2.44 test/test_grid.py::test_connectivity_node_face_connectivity_from_files

Slowest Coverage Tests

Time (s) Test
613.80 test/test_plot.py::test_to_raster
324.69 test/test_spatial_hashing.py::test_construction
94.93 test/test_subset.py::test_grid_bounding_box_subset
54.58 test/test_integrate.py::test_compare_zonal_weights
49.98 test/test_zonal.py::TestZonalCSne30::test_zonal_mean_dask
47.94 test/test_zonal.py::TestZonalCSne30::test_lat_inputs
47.81 test/test_zonal.py::TestZonalCSne30::test_non_conservative_zonal_mean
34.69 test/test_weighted_mean.py::test_csne30_equal_area_dask[1]
27.24 test/test_geometry.py::test_face_bounds_latlon_bounds_files
25.30 test/test_remap.py::test_b_return_types_and_counts
24.85 test/test_zonal.py::TestZonalCSne30::test_zonal_weights
21.68 test/test_cross_sections.py::test_south_pole
21.64 test/test_cross_sections.py::test_north_pole
21.53 test/test_zonal.py::TestZonalCSne30::test_non_conservative_zonal_mean_equator
21.45 test/test_zonal.py::TestZonalCSne30::test_non_conservative_zonal_mean_at_pole
18.78 test/test_weighted_mean.py::test_csne30_equal_area_dask[2]
18.04 test/test_from_points.py::test_spherical_voronoi
17.81 test/test_spatial_hashing.py::test_list_of_coords_fesom
13.58 test/test_structured.py::test_read_structured_uxds_from_ds[ersstv5]
13.50 test/test_structured.py::test_read_structured_grid_from_ds[ersstv5]
13.41 test/test_structured.py::test_read_structured_grid_from_latlon[ersstv5]
12.74 test/test_plot.py::test_scatter
12.67 test/test_plot.py::test_line
11.38 test/test_weighted_mean.py::test_csne30_equal_area_dask[4]
10.64 test/test_subset.py::test_inverse_indices
10.55 test/test_grid.py::test_latlon_bounds_populate_bounds_MPAS
9.55 test/test_from_points.py::test_spherical_delaunay
5.60 test/test_dask.py::test_grid_chunking
4.86 test/test_grid.py::test_connectivity_node_face_connectivity_from_files
4.62 test/test_dataset.py::test_integrate
4.58 test/test_weighted_mean.py::test_csne30_equal_area
4.54 test/test_integrate.py::test_single_dim
4.50 test/test_integrate.py::test_multi_dim
4.47 test/test_grid.py::test_face_areas_calculate_total_face_area_file
3.21 test/test_api.py::test_open_grid

@philipc2 philipc2 changed the title DRAFT: Record Test Execution Time DRAFT: Record Test Execution Time in CI Workflow Aug 12, 2025
@philipc2
Copy link
Member Author

I think we should try and keep most of our unit tests to under a few seconds.

@rajeeja
Copy link
Contributor

rajeeja commented Aug 12, 2025

This is a good PR. Was worried about the same last week

@philipc2 philipc2 changed the title DRAFT: Record Test Execution Time in CI Workflow DRAFT: Update CI workflow to improve execution time Aug 14, 2025
@philipc2 philipc2 changed the title DRAFT: Update CI workflow to improve execution time Update CI workflow to improve execution time Aug 22, 2025
@philipc2 philipc2 marked this pull request as ready for review August 22, 2025 16:01
@philipc2 philipc2 merged commit f4f405f into main Aug 22, 2025
14 of 15 checks passed
@erogluorhan erogluorhan deleted the test-time-workflow branch September 26, 2025 17:47
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