underworld3.timing.print_table is now print_table(filename=None, format='auto'). It previously accepted display_fraction, group_by and output_file, and 18 example files still pass them:
TypeError: print_table() got an unexpected keyword argument 'display_fraction'
Affected (grep for display_fraction / group_by=):
- fluid_mechanics/advanced: Ex_Navier_Stokes_Benchmarks_NS_DFG_2d_SLCN, Ex_Stokes_Annulus_Benchmark_{Kramer,Thieulot}, Ex_Stokes_Cartesian_SolC, Ex_Stokes_Spherical_Benchmark_{Kramer,Thieulot}
- fluid_mechanics/intermediate: Ex_Stokes_Flow_Internal_BC, Ex_Stokes_Flow_Obstruction, Ex_Stokes_Flow_Obstruction-3D
- solid_mechanics: Ex_Sheared_Layer_Elastic, Ex_Compression_AnisotropicFault-3D
- WIP/developer_tools: six Timing_* files
- WIP/porous_flow/pramoda_stokes.ipynb
Two possible fixes, and the choice is a judgement call rather than obvious:
- Accept the old keywords again and deprecate them.
display_fraction is cosmetic and could be accepted-and-ignored with a warning, but group_by and output_file changed behaviour, so silently ignoring those would be worse than raising.
- Update all 18 call sites and treat the signature change as intended.
Related to #498 — same file (Ex_Stokes_Cartesian_SolC.py) and the same underlying cause: nothing runs the examples, so API drift lands in them unnoticed. Worth considering a smoke job that executes the examples at trivial resolution.
I have fixed only the SolC call sites, as part of the analytic-suite work; the rest are untouched.
underworld3.timing.print_tableis nowprint_table(filename=None, format='auto'). It previously accepteddisplay_fraction,group_byandoutput_file, and 18 example files still pass them:Affected (grep for
display_fraction/group_by=):Two possible fixes, and the choice is a judgement call rather than obvious:
display_fractionis cosmetic and could be accepted-and-ignored with a warning, butgroup_byandoutput_filechanged behaviour, so silently ignoring those would be worse than raising.Related to #498 — same file (Ex_Stokes_Cartesian_SolC.py) and the same underlying cause: nothing runs the examples, so API drift lands in them unnoticed. Worth considering a smoke job that executes the examples at trivial resolution.
I have fixed only the SolC call sites, as part of the analytic-suite work; the rest are untouched.