-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrap legacy APIs #2702
Merged
Merged
Wrap legacy APIs #2702
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2702 +/- ##
==========================================
+ Coverage 72.53% 72.83% +0.29%
==========================================
Files 111 111
Lines 12185 12378 +193
==========================================
+ Hits 8838 9015 +177
- Misses 3347 3363 +16
|
ilan-gold
reviewed
Dec 7, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing blocking, but I am pretty worried about the breaking changes. This isn't really my call though.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of scanpy 2.0
I implemented a Ruff check (PLR0917) for this, but setting
max-positional-args = 3
would make this massive PR even larger, so I opted to do it in a separate one.Reviewers
Your main job is to check if the position of the
*
makes sense for each exported function (i.e. the ones with the@legacy_api
decorator). I tried my best to base it on internal usage of each API, but one placement or the other might be to early.The only real logic changes are in
scanpy/tests/test_package_structure.py
. This PR:action='error'
copy
parameter (adata
as first param, returnsadata
type or None`)filename: Path | str
/path: Path | str
Follow-up changes
max-positional-args = 3
api_module_names
listshow
,return_fig
,ax
random_seed: AnyRandom