Skip to content

feat!: add annotations#22

Merged
ilia-kats merged 15 commits intomainfrom
pa/annotate
Apr 28, 2026
Merged

feat!: add annotations#22
ilia-kats merged 15 commits intomainfrom
pa/annotate

Conversation

@flying-sheep
Copy link
Copy Markdown
Member

@flying-sheep flying-sheep commented Apr 27, 2026

Add annotations to override and a "scverse" docstring style which is “numpy but parameter types are only in the annotations and not in the docstring”. Scanpy enforces this style and doesn’t accept param : type syntax in the docstring.

This is a breaking change because it also removes the default for docstring_style, which I asked for in #16.

alternatives

  • instead of the "scverse" style, we could have an independent option for “no types in param docstrings” (e.g. docstring_style="numpy", types_in_docstring=False)
  • do what I think is the best solution (but most work) and move all that logic out of the regular code and into a sphinx extension

@flying-sheep flying-sheep requested a review from ilia-kats April 27, 2026 15:59
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

❌ Patch coverage is 97.43590% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.47%. Comparing base (bc96026) to head (33da2e1).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/scverse_misc/_utils.py 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #22      +/-   ##
==========================================
- Coverage   97.59%   97.47%   -0.12%     
==========================================
  Files           5        5              
  Lines         208      238      +30     
==========================================
+ Hits          203      232      +29     
- Misses          5        6       +1     
Files with missing lines Coverage Δ
src/scverse_misc/_extensions.py 96.15% <ø> (ø)
src/scverse_misc/_settings.py 97.75% <100.00%> (+0.56%) ⬆️
src/scverse_misc/_utils.py 96.66% <92.85%> (-3.34%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@flying-sheep flying-sheep marked this pull request as draft April 27, 2026 17:32
Copy link
Copy Markdown
Collaborator

@ilia-kats ilia-kats left a comment

Choose a reason for hiding this comment

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

Can you add a changelog entry? Otherwise looks good to me.

@flying-sheep
Copy link
Copy Markdown
Member Author

sure! I’ll have to change a bit more though, I’ll mark it as ready when it is

@flying-sheep flying-sheep marked this pull request as ready for review April 28, 2026 09:29
@flying-sheep
Copy link
Copy Markdown
Member Author

OK, I’m happy now!

grafik

@flying-sheep flying-sheep requested a review from ilia-kats April 28, 2026 09:42
Copy link
Copy Markdown
Collaborator

@ilia-kats ilia-kats left a comment

Choose a reason for hiding this comment

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

awesome, thanks! Just two minor nitpicks, otherwise it's good to go

Comment thread CHANGELOG.md
Comment thread CHANGELOG.md Outdated
@flying-sheep flying-sheep requested a review from ilia-kats April 28, 2026 12:27
Co-authored-by: ilia-kats <ilia-kats@gmx.net>
@ilia-kats ilia-kats enabled auto-merge (squash) April 28, 2026 12:31
@ilia-kats ilia-kats merged commit 3080270 into main Apr 28, 2026
9 checks passed
@ilia-kats ilia-kats deleted the pa/annotate branch April 28, 2026 12:35
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.

2 participants