Add numeric_bounds function, and do some related refactoring#62
Merged
Add numeric_bounds function, and do some related refactoring#62
Conversation
Member
Author
|
@gselzer Thanks for the review. Have you actually tested it with napari-imagej? Will it meet your needs to facilitate solving imagej/napari-imagej#276? I'd like to wait to merge till you've actually successfully used the API to improve the magic-gui experience. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #62 +/- ##
==========================================
+ Coverage 52.38% 53.15% +0.77%
==========================================
Files 10 12 +2
Lines 1218 1285 +67
==========================================
+ Hits 638 683 +45
- Misses 580 602 +22 ☔ View full report in Codecov by Sentry. |
Member
|
Haven't tried it out yet, I'll try to take a look tomorrow! |
Absolute imports are the Pythonic recommendation in general. However, for the toplevel __init__.py, relative imports are acceptable, and perhaps even preferred for succinectness.
Instead, we use Float/Double.MAX_VALUE.
Because the nicest modular Pythonic design is to import all your public API from supporting files into __init__.py, so they are available from the toplevel, and we don't want flake8 yelling at us about it. Thanks to @gselzer and https://stackoverflow.com/a/58029222/1207769.
919d8f9 to
112c4bd
Compare
Member
Author
|
@gselzer I know you're busy with other things these days, so I took the liberty of rebasing and merging this PR. It will be part of scyjava 1.10.0. |
This file contains hidden or 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
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.
This patchset:
_types.py, and renames the_java.pyto_jvm.py;numeric_boundsfunction for getting the (min, max) of each particular type.It is intended to be generally useful, but the motivating use case was to support solving imagej/napari-imagej#276.