-
Notifications
You must be signed in to change notification settings - Fork 22
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
Change 'filters' to 'bands' for multiband images and exposures #773
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.
This is a breaking API change but smoothly transitioning this in constructor methods is definitely cumbersome. But let's atleast continue to support accessor methods like filters
with a proper deprecation warning.
""" | ||
return self._filters |
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.
I'd suggest keeping this for now, but deprecating it while adding bands
as a new property.
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.
This appeared a few rows below where I intended. I meant to keep filters
as a property, not _filters
attribute.
48afcbc
to
edd15db
Compare
python/lsst/afw/multiband.py
Outdated
Use `bands` instead. | ||
""" | ||
warnings.warn("Use `bands` instead of `filters`", DeprecationWarning) |
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.
You could use the same prescription to deprecate the staticmethod
so it appears in the documentation as well.
https://developer.lsst.io/stack/deprecating-interfaces.html#python-deprecation
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.
I initially tried that but unfortunately it doesn't work for properties.
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.
Hmm, I tried it locally before commenting this. The order matters - property on top and deprecated below that.
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.
Oh... it's because I forgot to import deprecated. :(
edd15db
to
c52281b
Compare
No description provided.