A handful of small docstring and test gaps in xrspatial/reproject/__init__.py and xrspatial/tests/test_reproject.py.
C-3: chunk_size default behavior is opaque
Both reproject() and merge() accept chunk_size=None. The default applied internally is not the same in every code path:
_compute_chunk_layout falls back to (512, 512) (_grid.py:351).
- The streaming and dask-cupy paths bump it to
2048 (__init__.py:603, 1006).
A reader has to dig through source to learn this. Spell it out in the docstring.
C-6: no Examples section in reproject() or merge()
geoid_height and itrf_transform already have Examples blocks. The two highest-traffic entry points in this subpackage do not. Add a short illustrative Examples block to each.
T-6: no +/-Inf input test
test_reproject.py covers NaN inputs but never feeds np.inf. Add a test that confirms reproject does not crash on infinite values. Output behavior is implementation-defined (Inf may propagate or convert to NaN); the test only needs to verify it does not raise or hang.
T-7: chunk_size tuple form and max_memory are not exercised
The tuple form of chunk_size and the max_memory kwarg both have parsing logic that no test currently covers. Add:
test_reproject_chunk_size_tuple: dask-backed reproject with chunk_size=(64, 32), asserts the output chunk shape.
test_reproject_max_memory_string_arg: pass '256MB' and '1GB'; both must be accepted.
test_reproject_max_memory_int_arg: pass an integer byte count; also accepted.
A handful of small docstring and test gaps in
xrspatial/reproject/__init__.pyandxrspatial/tests/test_reproject.py.C-3:
chunk_sizedefault behavior is opaqueBoth
reproject()andmerge()acceptchunk_size=None. The default applied internally is not the same in every code path:_compute_chunk_layoutfalls back to(512, 512)(_grid.py:351).2048(__init__.py:603, 1006).A reader has to dig through source to learn this. Spell it out in the docstring.
C-6: no
Examplessection inreproject()ormerge()geoid_heightanditrf_transformalready haveExamplesblocks. The two highest-traffic entry points in this subpackage do not. Add a short illustrativeExamplesblock to each.T-6: no
+/-Infinput testtest_reproject.pycovers NaN inputs but never feedsnp.inf. Add a test that confirms reproject does not crash on infinite values. Output behavior is implementation-defined (Inf may propagate or convert to NaN); the test only needs to verify it does not raise or hang.T-7:
chunk_sizetuple form andmax_memoryare not exercisedThe tuple form of
chunk_sizeand themax_memorykwarg both have parsing logic that no test currently covers. Add:test_reproject_chunk_size_tuple: dask-backed reproject withchunk_size=(64, 32), asserts the output chunk shape.test_reproject_max_memory_string_arg: pass'256MB'and'1GB'; both must be accepted.test_reproject_max_memory_int_arg: pass an integer byte count; also accepted.