scverse / scverse/spatialdata

Increase test coverage of rasterization

Open
#177 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
394
Forks
95
Avg merge
4d 3h
Merged PRs (30d)
7

Description

As noted here (https://github.com/scverse/spatialdata/pull/155#pullrequestreview-1330038934), the rasterization code has quite a few code branches. I think we need to make sure that we test all of the cases to make sure we don't have accidental regressions in the future. In particular, there are a lot of assertions where we test the passing case, but don't test that they actually raise when necessary (see example below ) . I think this can wait until after initial release, but we should probably address this before too much time has passed and we forget what the code does 😛

https://github.com/scverse/spatialdata/blob/5954fd42c87a23072a7b56cd794f9d0a433b2abf/spatialdata/_core/_rasterize.py#L91-L143

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing spatialdata/_core/_rasterize.py around lines 91-143 and the linked pull request review. Identify the untested branches, especially assertions that should raise on invalid cases, then add coverage for each behavior and confirm the rasterization tests pass without regressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.