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

epitools / epitools / 22671422294
70%

Build:
DEFAULT BRANCH: main
Ran 04 Mar 2026 01:30PM UTC
Jobs 7
Files 17
Run time 1min
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.4% (+5.9%) from 64.532%
22671422294

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)

17 of 18 new or added lines in 2 files covered. (94.44%)

440 of 625 relevant lines covered (70.4%)

4.93 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
78.26
-1.74% src/epitools/_reader.py
Jobs
ID Job ID Ran Files Coverage
1 22671422294.1 04 Mar 2026 01:30PM UTC 17
70.4
GitHub Action Run
2 22671422294.2 04 Mar 2026 01:30PM UTC 17
70.4
GitHub Action Run
3 22671422294.3 04 Mar 2026 01:30PM UTC 17
70.35
GitHub Action Run
4 22671422294.4 04 Mar 2026 01:30PM UTC 17
70.4
GitHub Action Run
5 22671422294.5 04 Mar 2026 01:30PM UTC 17
70.4
GitHub Action Run
6 22671422294.6 04 Mar 2026 01:30PM UTC 17
70.4
GitHub Action Run
7 22671422294.7 04 Mar 2026 01:31PM UTC 17
70.4
GitHub Action Run
Source Files on build 22671422294
  • Tree
  • List 17
  • Changed 3
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #22671422294
  • 52f9b0a6 on github
  • Prev Build on main (#22222228917)
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