-
Notifications
You must be signed in to change notification settings - Fork 207
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
Deprecate setting metadata
and original_metadata
attributes
#2913
Conversation
…our of using `set_item` and `add_dictionary` methods or specifying metadata when creating signals
Codecov Report
@@ Coverage Diff @@
## RELEASE_next_minor #2913 +/- ##
======================================================
+ Coverage 79.58% 79.84% +0.25%
======================================================
Files 209 209
Lines 32262 32558 +296
Branches 7239 7328 +89
======================================================
+ Hits 25675 25995 +320
+ Misses 4836 4806 -30
- Partials 1751 1757 +6
Continue to review full report at Codecov.
|
ea2f8a4
to
e2de8b9
Compare
e2de8b9
to
ff75751
Compare
So the main idea is to prevent that people accidentally put a wrong data structure ( I have not checked in detail yet, but I have the feeling that some tests or examples might still be using the direct access to the metadata tree. |
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 haven't tested this manually, but it overall LGTM. I'm not familiar with the extension tests, so I'm not sure why those are failing.
Yes, there are a number of these; here's one example: https://hyperspy.org/hyperspy-doc/current/user_guide/signal.html#:~:text=To%20change%20the%20default%20value%3A We could either take care of this when the feature is actually removed (2.0), or now. I'm okay with either, although it's not a great user experience if a user follows an example in the docs and gets a warning as a result. |
pyxem developers are aware of tests failing (pyxem/pyxem#788 (comment)), and the failing kikuchipy tests are unrelated (pyxem/kikuchipy#509). Cannot speak for the single failing LumiSpy test. |
Yes, this is the idea, because setting the
I couldn't find any! :) |
@jat255, this is different: it is only setting a "leaf" of the DTB, not the |
Co-authored-by: Jonas Lähnemann <jonas@pdi-berlin.de> Co-authored-by: Joshua Taillon <jat255@gmail.com>
ab87615
to
f06b534
Compare
The failing LumiSpy test is OK for the dev-version. So we just need to do our next release in time with v1.7. |
OK, setting a leaf will still be OK as direct assignment. I misunderstood that as well. Then I'm also happy with this PR as far as I can see. |
in favour of using
set_item
andadd_dictionary
methods or specifying metadata when creating signals - fix #2874 (comment).Progress of the PR
metadata
andoriginal_metadata
attributesupcoming_changes
folder (seeupcoming_changes/README.rst
),readthedocs
doc build of this PR (link in github checks)Minimal example of the bug fix or the new feature