• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

epitools / epitools / 22671422294 / 3
70%
main: 70%

Build:
DEFAULT BRANCH: main
Ran 04 Mar 2026 01:30PM UTC
Files 17
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Mar 2026 01:28PM UTC coverage: 70.353% (+5.8%) from 64.532%
22671422294.3

push

github

web-flow
Fix PLR2004 magic value lint error in cell_statistics.py (#153)

Pre-commit flagged a `PLR2004` violation: bare `2` used in comparisons
in the 2D pixel-spacing normalisation block.

## Changes

- Added `TWO_DIMENSIONAL = 2` constant alongside the existing
`THREE_DIMENSIONAL` and `FOUR_DIMENSIONAL` constants
- Replaced the two bare `2` literals in the `pixel_spacing`
normalisation logic with `TWO_DIMENSIONAL`

```python
# Before
if len(pixel_spacing) == 1:
    pixel_spacing = pixel_spacing * 2
elif len(pixel_spacing) > 2:
    pixel_spacing = pixel_spacing[-2:]

# After
if len(pixel_spacing) == 1:
    pixel_spacing = pixel_spacing * TWO_DIMENSIONAL
elif len(pixel_spacing) > TWO_DIMENSIONAL:
    pixel_spacing = pixel_spacing[-TWO_DIMENSIONAL:]
```

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Bug on cell stastitics</issue_title>
> <issue_description>**Describe the bug**
> Tested the "cell statistics" widget in epitools. I am getting an error
and it won't calculate:
> 
> CALLBACK CHAIN:
>     src/psygnal/_signal.py:1311 in _run_emit_loop
>     ... 10 more frames ...
>
    /Users/giuliapaci/anaconda3/envs/epitools_tracking/lib/python3.10/site-packages/skimage/measure/_regionprops_utils.py:619
in _normalize_spacing
>       raise ValueError(  # <-- ERROR OCCURRED HERE
> 
>       Local variables:
>              spacing = array([1.e-06])
>                ndims = 2
> 
> **Expected behavior**
> It shouldn't give any error</issue_description>
> 
> <agent_instructions>Try if by sticking to a scikit-image version would
fix it. If it is something easy, fix the bug with code. Create a test
for this error not be happening aagain</agent_instructions>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes epitools/epitools... (continued)

439 of 624 relevant lines covered (70.35%)

0.7 hits per line

Source Files on job 22671422294.3
  • Tree
  • List 17
  • Changed 4
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 22671422294
  • 52f9b0a6 on github
  • Prev Job for on main (#22222228917.4)
  • Next Job for on main (#23749472743.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc