Commit 8422bc9
committed
geotiff: write_geotiff_gpu kwarg order matches to_geotiff (#1922)
to_geotiff and write_geotiff_gpu are documented parity siblings, but
the two signatures put max_z_error and streaming_buffer_bytes in
opposite order:
to_geotiff: ..., bigtiff, gpu, streaming_buffer_bytes,
max_z_error, photometric, ...
write_geotiff_gpu: ..., bigtiff, max_z_error,
streaming_buffer_bytes, photometric, ...
Both kwargs are keyword-only so caller code does not break, but the
drift surfaced in inspect.signature, IDE autocomplete, and Sphinx
docs against the GPU writer's own "Accepted at the signature level
for API parity with to_geotiff" docstring promise.
Reorder write_geotiff_gpu to match to_geotiff. The 'gpu' auto-dispatch
kwarg is the only one to_geotiff has that the GPU entry point does
not, so the gap stays in place; everything else after 'bigtiff' lines
up. Also reorder the docstring to keep doc order parallel.
New regression test test_writer_kwarg_order_1922.py pins kwarg order
parity (modulo 'gpu') and shared-default parity so future signature
edits trip the test instead of silently re-introducing drift.
Detected by deep-sweep-api-consistency on 2026-05-15.
Refs #19221 parent b176169 commit 8422bc9
3 files changed
Lines changed: 83 additions & 7 deletions
File tree
- .claude
- xrspatial/geotiff
- _writers
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | 149 | | |
155 | 150 | | |
156 | 151 | | |
157 | 152 | | |
158 | 153 | | |
159 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
0 commit comments