-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add numeric_bounds function, and do some related refactoring #62
Conversation
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.
Looks great to me!
@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. |
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
@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 patchset:
_types.py
, and renames the_java.py
to_jvm.py
;numeric_bounds
function 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.