-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[RFC] Funky meas_date behaviour #5852
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
Conversation
Yes in general |
I don't know why this would be the case, it seems like it should always check for tuple-ness. I thought we implemented a check like this sometime recently. |
|
Plus I had some |
Codecov Report
@@ Coverage Diff @@
## master #5852 +/- ##
==========================================
- Coverage 89.23% 87.46% -1.77%
==========================================
Files 417 417
Lines 75164 75185 +21
Branches 12376 12377 +1
==========================================
- Hits 67071 65763 -1308
- Misses 5216 6573 +1357
+ Partials 2877 2849 -28 |
|
If this is green, it can be closed. Its cover by #6313 |
|
It's not green. Still okay to close? |
|
No, the operation order is broken. Do we care about though? The problem is that if you set @larsoner if you (or anybody else) knows a quick fix for it feel free to take over and ping me. Otherwise, you can either label it as wont-fix or move it to 0.19 and I'll get back to it. |
Users should not manually change entries in |
|
Since users aren't supposed to change the info dict, and they can break things if they do, maybe we should consider some way of making it hard / impossible for them to do so? Like making its entries into read-only attributes?
…On May 15, 2019 5:58:10 AM AKDT, Eric Larson ***@***.***> wrote:
> The problem is that if you set raw.annotations and then you change
raw.info['meas_date'] the annotations are no longer valid and it's
silent. We don't update the annotations nor raise no warning or error.
Users should not manually change entries in `info`, other than
`info['bads']`, otherwise things will break. As long as things work
under anonymization (which should be the only place we change
`info['meas_date']`, I think) then it should be fine.
|
|
I seem to recall this coming up before and ultimately not making it in. Maybe the discussion is somewhere here if anyone is interested in looking further: #2765 |
|
This means to modify the dictionary class. And I don't think it would be an easy fix. The anonymization works because we reset I think that the most pragmatic thing is to assume that [in python we are all consenting adults](https://python-guide-chinese.readthedocs.io/zh_CN/latest/writing/style.html#we-are-all-consenting-adults |
|
The discussion about |
When working with #5839, I found some things that I'm not sure are ok.
Like the fact that
meas_dateandannotations.orig_timelose sync.Do you think that if a user mess up with
meas_dateshe/he should know whatshe/he's doing? or shall we overwrite the set of the
meas_dateto manuallysync it? What do you think about the fact that
raw.info['meas_date'] = 0isperfectly valid but
raw.info['meas_date'] = 10would break somewhere down the line 'cosmeas_dateis supposed to be a tupple?Just some random thoughts...