Skip to content

refactor: adjust format of logfiles - #188

Merged
tsutterley merged 2 commits into
productionfrom
prod
Aug 11, 2026
Merged

refactor: adjust format of logfiles#188
tsutterley merged 2 commits into
productionfrom
prod

Conversation

@tsutterley

Copy link
Copy Markdown
Member

refactor: reorganize for modern setuptools builds
fix: simplify Clenshaw summations to reduce memory usage

refactor: reorganize for modern `setuptools` builds
fix: simplify Clenshaw summations to reduce memory usage

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes packaging/CLI distribution by moving script installation into pyproject.toml, refactors logging output formatting for file-based logs, and simplifies Clenshaw summation update steps to reduce memory usage.

Changes:

  • Remove legacy setup.py script discovery and declare console scripts via [project.scripts] in pyproject.toml (plus version bump to 1.2.7).
  • Refactor log file creation to attach “parent filename” context via LoggerAdapter, and adjust log formatting/output sections.
  • Simplify iterative Clenshaw summation accumulator updates (in both sea_level_equation and clenshaw_summation) and update/expand documentation + API reference structure.

Reviewed changes

Copilot reviewed 109 out of 209 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
setup.py Removed legacy setup-based script inclusion.
pyproject.toml Bumped version; defined entry points for scripts via [project.scripts].
gravity_toolkit/utilities.py Updated log file creation/formatting and parent-file context.
gravity_toolkit/sea_level_equation.py Simplified Clenshaw accumulator update; docstring formatting tweaks.
gravity_toolkit/scripts/upload_to_figshare.py Added CLI script for uploading geocenter files to Figshare.
gravity_toolkit/scripts/simple_parallel_shell.py Added CLI script to run shell commands in parallel.
gravity_toolkit/scripts/sea_level_differences.py Added CLI script for SLF Monte Carlo error map generation.
gravity_toolkit/scripts/run_grace_date.py Added wrapper CLI for GRACE date/month index generation.
gravity_toolkit/scripts/remove_sea_level_fields.py Added cleanup CLI for removing SLF fields.
gravity_toolkit/scripts/remove_sea_level_errors.py Added cleanup CLI for removing SLF Monte Carlo error artifacts.
gravity_toolkit/scripts/remove_mascon_reconstruct.py Added cleanup CLI for removing reconstructed mascon outputs listed in an index file.
gravity_toolkit/scripts/remove_grace_spatial.py Added cleanup CLI for removing monthly GRACE spatial files.
gravity_toolkit/scripts/quick_mascon_regress.py Added CLI script to generate regression summary for mascon time series.
gravity_toolkit/scripts/quick_mascon_plot.py Added CLI script to plot mascon time series.
gravity_toolkit/scripts/nominal_grace_date.py Added CLI script to generate nominal GRACE date files.
gravity_toolkit/scripts/make_grace_index.py Added CLI script to build GRACE L2 index files.
gravity_toolkit/scripts/geocenter_processing_centers.py Added plotting CLI for geocenter comparisons across processing centers.
gravity_toolkit/scripts/geocenter_ocean_models.py Added plotting CLI comparing geocenter results across OBP/ocean models.
gravity_toolkit/scripts/geocenter_monte_carlo.py Added plotting CLI for geocenter Monte Carlo solution visualization.
gravity_toolkit/scripts/geocenter_compare_tellus.py Added plotting CLI comparing geocenter solutions vs JPL Tellus (and optionally GravIS).
gravity_toolkit/scripts/combine_sea_level_data.py Added CLI to combine SLF spatial fields with harmonic datasets.
gravity_toolkit/scripts/calc_harmonic_resolution.py Added CLI script to compute spatial resolution vs spherical harmonic degree.
gravity_toolkit/scripts/init.py Package marker for scripts module.
gravity_toolkit/mapping/init.py Package marker for mapping module.
gravity_toolkit/datasets/esa_costg_swarm_sync.py Added dataset sync CLI for ESA Swarm COST-G products (JSON API).
gravity_toolkit/datasets/init.py Package marker for datasets module.
gravity_toolkit/clenshaw_summation.py Simplified Clenshaw accumulator update; docstring formatting tweaks.
gravity_toolkit/init.py Exposed datasets, mapping, and scripts packages at top-level.
doc/source/user_guide/NASA-Earthdata.ipynb Updated documentation links to new in-package dataset script locations.
doc/source/release_notes/release-v1.2.7.rst Added release notes for v1.2.7.
doc/source/getting_started/Getting-Started.rst Updated links to dataset scripts under gravity_toolkit/datasets.
doc/source/background/GRACE-Data-Products.rst Updated links to dataset sync tools under gravity_toolkit/datasets.
doc/source/api_reference/utilities.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/units.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/tools.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/time.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/time_series/smooth.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/time_series/savitzky_golay.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/time_series/regress.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/time_series/piecewise.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/time_series/lomb_scargle.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/time_series/fit.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/time_series/amplitude.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/spatial.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/SLR/CS2.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/SLR/C50.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/SLR/C40.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/SLR/C30.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/SLR/C20.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/sea_level_equation.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/scripts/scale_grace_maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/run_sea_level_equation.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/run_grace_date.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/regress_grace_maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/quick_mascon_regress.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/quick_mascon_plot.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/piecewise_grace_maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/monte_carlo_degree_one.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/mascon_reconstruct.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/make_grace_index.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/index.rst Added scripts API reference index page.
doc/source/api_reference/scripts/grace_spatial_maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/grace_spatial_error.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/grace_raster_grids.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/grace_mean_harmonics.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/dealiasing_monthly_mean.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/dealiasing_global_uplift.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/convert_harmonics.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/combine_harmonics.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/calc_sensitivity_kernel.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/calc_mascon.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/calc_harmonic_resolution.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/calc_degree_one.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/aod1b_oblateness.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/scripts/aod1b_geocenter.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/read_SLR_harmonics.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/read_love_numbers.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/read_GRACE_harmonics.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/read_GIA_model.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/read_gfc_harmonics.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/ocean_stokes.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/mascons.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/mapping/plot_GrIS_grid_movie.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_GrIS_grid_maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_GrIS_grid_5maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_GrIS_grid_3maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_global_grid_movie.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_global_grid_maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_global_grid_9maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_global_grid_5maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_global_grid_4maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_global_grid_3maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_AIS_regional_movie.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_AIS_regional_maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_AIS_GrIS_maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_AIS_grid_movie.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_AIS_grid_maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_AIS_grid_4maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/plot_AIS_grid_3maps.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/mapping/index.rst Added mapping API reference index page.
doc/source/api_reference/legendre.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/legendre_polynomials.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/harmonics.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/harmonic_summation.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/harmonic_gradients.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/grace_months_index.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/grace_input_months.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/grace_find_months.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/grace_date.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/geocenter.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/gen_stokes.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/gen_spherical_cap.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/gen_point_load.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/gen_harmonics.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/gen_disc_load.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/gen_averaging_kernel.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/gauss_weights.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/fourier_legendre.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/destripe_harmonics.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/degree_amplitude.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/datasets/podaac_cumulus.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/datasets/itsg_graz_grace_sync.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/datasets/index.rst Added datasets API reference index page.
doc/source/api_reference/datasets/gfz_isdc_grace_sync.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/datasets/gfz_isdc_dealiasing_sync.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/datasets/gfz_icgem_costg_ftp.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/datasets/esa_costg_swarm_sync.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/datasets/cnes_grace_sync.rst Updated source link and argparse directive to module-based import.
doc/source/api_reference/clenshaw_summation.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/associated_legendre.rst Updated API reference header to fully-qualified module name.
doc/source/api_reference/API-Reference.rst Restructured API reference to add datasets/mapping/scripts indices and remove older grouped sections.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pyproject.toml
Comment on lines +139 to +141
"combine_sea_level_data.py" = "gravity_toolkit.scripts.combine_sea_level_data:main"
"copy_parameter_files.py" = "gravity_toolkit.scripts.copy_parameter_files.py:main"
"create_public_SLF_data.py" = "gravity_toolkit.scripts.create_public_SLF_data:main"
@tsutterley
tsutterley merged commit b85a3f8 into production Aug 11, 2026
4 checks passed
@tsutterley
tsutterley deleted the prod branch August 11, 2026 19:23
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.

2 participants