Skip to content

Conversation

selmanozleyen
Copy link
Member

Closes #993

@selmanozleyen selmanozleyen marked this pull request as draft June 30, 2025 16:06
@codecov-commenter
Copy link

codecov-commenter commented Jun 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 24.29%. Comparing base (d8b8f91) to head (fd6f9a4).
⚠️ Report is 9 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (d8b8f91) and HEAD (fd6f9a4). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (d8b8f91) HEAD (fd6f9a4)
4 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1013       +/-   ##
===========================================
- Coverage   66.63%   24.29%   -42.35%     
===========================================
  Files          40       41        +1     
  Lines        6060     6060               
  Branches     1015     1012        -3     
===========================================
- Hits         4038     1472     -2566     
- Misses       1662     4571     +2909     
+ Partials      360       17      -343     

see 32 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@selmanozleyen selmanozleyen marked this pull request as ready for review June 30, 2025 23:09
@selmanozleyen
Copy link
Member Author

Hi,

I added all the notebooks except the tutorials as they required plenty of external modules. Only one notebook (squidpy/docs/notebooks/examples/image/compute_crops.ipynb) failed because of trying to use a deprecated function. So I created an issue for it: scverse/squidpy_notebooks#147

This is the error log

------------------
crop_corner.interactive(adata_crop)
------------------

----- stderr -----
/tmp/ipykernel_2900/2108321461.py:1: DeprecationWarning: Call to deprecated function interactive (The squidpy napari plugin is deprecated, please use https://github.com/scverse/napari-spatialdata).
  crop_corner.interactive(adata_crop)
------------------

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[8], line 1
----> 1 crop_corner.interactive(adata_crop)

File ~/work/squidpy/squidpy/src/squidpy/_utils.py:313, in deprecated.<locals>.decorator.<locals>.new_func1(*args, **kwargs)
    307 warnings.warn(
    308     fmt1.format(name=func1.__name__, reason=reason),
    309     category=DeprecationWarning,
    310     stacklevel=2,
    311 )
    312 warnings.simplefilter("default", DeprecationWarning)
--> 313 return func1(*args, **kwargs)

File ~/work/squidpy/squidpy/src/squidpy/im/_container.py:1136, in ImageContainer.interactive(self, adata, spatial_key, library_key, library_id, cmap, palette, blending, symbol, key_added)
   1079 @d.get_sections(base="_interactive", sections=["Parameters"])
   1080 @d.dedent
   1081 @deprecated(
   (...)   1094     key_added: str = "shapes",
   1095 ) -> Interactive:  # type: ignore[type-var]
   1096     """
   1097     Launch :mod:`napari` viewer.
   1098 
   (...)   1134     :meth:`squidpy.pl.Interactive.screenshot`.
   1135     """
-> 1136     from squidpy.pl import Interactive  # type: ignore[attr-defined]
   1138     return Interactive(  # type: ignore[no-any-return]
   1139         img=self,
   1140         adata=adata,
   (...)   1148         symbol=symbol,
   1149     ).show()

ImportError: cannot import name 'Interactive' from 'squidpy.pl' (/home/runner/work/squidpy/squidpy/src/squidpy/pl/__init__.py)

Failed to run /home/runner/work/squidpy/squidpy/docs/notebooks/examples/image/compute_crops.ipynb

@selmanozleyen selmanozleyen requested a review from timtreis July 1, 2025 08:41
@selmanozleyen selmanozleyen requested a review from ilan-gold July 10, 2025 16:44
@flying-sheep
Copy link
Member

flying-sheep commented Aug 7, 2025

@LucaMarconato wants to look into how to do this with caching, see also scverse/cookiecutter-scverse#40

PS: shell scripting is the devil, if you add shell scripts, also add CI that runs shellcheck on them and fails if shellcheck complains. Or just don’t use shell scripts, Python is a very nice scripting language that you already know much better 😉

@LucaMarconato
Copy link
Member

@selmanozleyen how long do they take to run? Around 15 minutes?

@selmanozleyen
Copy link
Member Author

@LucaMarconato yes they take around 15 for the selected notebooks

@@ -0,0 +1,41 @@
name: Test notebooks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reproducibility, should we have a check for whether the notebooks change? This would basically turn the notebooks into tests-for-stability, but could be a nice check. @timtreis or @LucaMarconato have you guys ever received feedback about stability?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could have expected and output folders to compare but we'd have to update expected when we expect/want the output to change. Similar to plot unit tests. I think this is doable but would fit better as a separate issue imo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run notebooks in CI
5 participants