You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[RFC] changing python type by a term definition in docstring #6698
sounds good !
+1 to add a "digitization" entry in glossary
in the place you point to we should not mention Polhemus. it's not the only
system to get a valid digitization.
I would leave it as instance of Digitization in the type, what's wrong with doing it that way? Changing it to list of dict also has disadvantages, we need to explain what the dicts are. And we don't really want people thinking they can pass a list of dict and have it work. So I'm -1 on this, rather keep it as instance of Digitization.
You can keep the :term: in the description, though, if it helps
I suggested to kill the Digitization class from the public API. I
don't think we need to make it public
as it will not replace the dig montage as originally thought when it was written
The advantage of having it in the public API is that people don't think "I can just pass a list of dict" and I see little disadvantage to keeping it. What's the advantage to removing it?
avoid to have yet another public class for little gain. It makes one more
thing to explain
to users. We can do the check that the dig is correct in the DigMontage
constructor and
the set_montage method. I am just trying to fight complexity here.
Regarding the new glossary entry: don't include the (abbr. dig) part in the head word line, it makes the crossrefs annoying to type. put it in the definition.
Okay I can live with removing the class. It will hopefully also fix the spurious failures in Travis that occur due to our changing how __eq__ works. We'll probably want a little assert_dig_equal in tests instead
On Thu, Aug 22, 2019, 16:26 Eric Larson ***@***.***> wrote:
Okay I can live with removing the class. It will hopefully also fix the
spurious failures in Travis that occur due to our changing how __eq__
works. We'll probably want a little assert_dig_equal in tests instead
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6698?email_source=notifications&email_token=ABVX5Y3RXLNKD2CFPSLZUQLQF2OZPA5CNFSM4IOUD6I2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD45IRGY#issuecomment-523929755>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABVX5Y32YEHDYH54N7STXFTQF2OZPANCNFSM4IOUD6IQ>
.
On Thu, Aug 22, 2019, 20:56 Sik ***@***.***> wrote:
On the assert_dig_equal I would do it the pytest way which would allow
`assert digA == digB`
On Thu, Aug 22, 2019, 16:26 Eric Larson ***@***.***> wrote:
> Okay I can live with removing the class. It will hopefully also fix the
> spurious failures in Travis that occur due to our changing how __eq__
> works. We'll probably want a little assert_dig_equal in tests instead
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#6698?email_source=notifications&email_token=ABVX5Y3RXLNKD2CFPSLZUQLQF2OZPA5CNFSM4IOUD6I2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD45IRGY#issuecomment-523929755>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABVX5Y32YEHDYH54N7STXFTQF2OZPANCNFSM4IOUD6IQ>
> .
>
That is the way we do it now and it seems to cause spurious failures where Pytest tries to do some introspection and fails. Hence why I'm saying we should switch to something else.
Maybe just object_diff since it will give us the diff on failure of assert object_diff(x, y) == '' too.
Damn! Now I remembered that it was not straight forward because it's a list.
Actually that would be the same root problem of the __eq__ issue you
mentioned. Maybe this would be a good excuse to fix it altogether. Inherit
not from list and add the proper pytest == overload.
If I'm not mistaken I even try it. And decided that I didn't wanted to
fight the inherit from list/dict battle.
On Thu, Aug 22, 2019, 20:57 Sik ***@***.***> wrote:
We can use it as a test case, and if we like we would already have an
example in the code base.
On Thu, Aug 22, 2019, 20:56 Sik ***@***.***> wrote:
> On the assert_dig_equal I would do it the pytest way which would allow
> `assert digA == digB`
>
> On Thu, Aug 22, 2019, 16:26 Eric Larson ***@***.***> wrote:
>
>> Okay I can live with removing the class. It will hopefully also fix the
>> spurious failures in Travis that occur due to our changing how __eq__
>> works. We'll probably want a little assert_dig_equal in tests instead
>>
>> —
>> You are receiving this because you authored the thread.
>> Reply to this email directly, view it on GitHub
>> <#6698?email_source=notifications&email_token=ABVX5Y3RXLNKD2CFPSLZUQLQF2OZPA5CNFSM4IOUD6I2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD45IRGY#issuecomment-523929755>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/ABVX5Y32YEHDYH54N7STXFTQF2OZPANCNFSM4IOUD6IQ>
>> .
>>
>
Now that we are getting rid of / making private Digitization it makes sense to keep it as close to list of dict as possible, rather than going in the opposite direction by making it a non-list class
Activity
agramfort commentedon Aug 22, 2019
larsoner commentedon Aug 22, 2019
Xref only looks in the param list so no value in adding it if we're going to use it in the description
massich commentedon Aug 22, 2019
@larsoner it was 2 different solutions to the same problem. Either one or the other but not both.
I like the first one better.
massich commentedon Aug 22, 2019
if its a digitization I've the right to just error say wrong type whatever.
larsoner commentedon Aug 22, 2019
I would leave it as
instance of Digitizationin the type, what's wrong with doing it that way? Changing it tolist of dictalso has disadvantages, we need to explain what the dicts are. And we don't really want people thinking they can pass alist of dictand have it work. So I'm -1 on this, rather keep it asinstance of Digitization.You can keep the
:term:in the description, though, if it helpsagramfort commentedon Aug 22, 2019
larsoner commentedon Aug 22, 2019
The advantage of having it in the public API is that people don't think "I can just pass a list of dict" and I see little disadvantage to keeping it. What's the advantage to removing it?
agramfort commentedon Aug 22, 2019
drammock commentedon Aug 22, 2019
Regarding the new glossary entry: don't include the
(abbr. dig)part in the head word line, it makes the crossrefs annoying to type. put it in the definition.larsoner commentedon Aug 22, 2019
Okay I can live with removing the class. It will hopefully also fix the spurious failures in Travis that occur due to our changing how
__eq__works. We'll probably want a littleassert_dig_equalin tests insteadmassich commentedon Aug 22, 2019
massich commentedon Aug 22, 2019
larsoner commentedon Aug 22, 2019
That is the way we do it now and it seems to cause spurious failures where Pytest tries to do some introspection and fails. Hence why I'm saying we should switch to something else.
Maybe just
object_diffsince it will give us the diff on failure ofassert object_diff(x, y) == ''too.massich commentedon Aug 22, 2019
larsoner commentedon Aug 22, 2019
Now that we are getting rid of / making private
Digitizationit makes sense to keep it as close tolist of dictas possible, rather than going in the opposite direction by making it a non-listclasslarsoner commentedon Sep 21, 2019
Closing for #6434
larsoner commentedon Sep 21, 2019
Whoops I mean #6461