Skip to content
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

Fix report_reader to have several time the same index (node_id, compa… #93

Merged
merged 10 commits into from
Jun 16, 2020

Conversation

alkino
Copy link
Member

@alkino alkino commented Jun 4, 2020

…rtment_id)

src/report_reader.cpp Outdated Show resolved Hide resolved
src/report_reader.cpp Outdated Show resolved Hide resolved
src/report_reader.cpp Outdated Show resolved Hide resolved
@jdcourcol
Copy link
Contributor

@alkino can this move forward ?

@jorblancoa
Copy link
Contributor

LGTM!

@alkino alkino merged commit 5407729 into master Jun 16, 2020
@alkino alkino deleted the fix_report_reader branch June 16, 2020 13:50
@tomdele
Copy link
Contributor

tomdele commented Jun 16, 2020

I think we still lack quite a lot of testing here.

There is no tests for the ElementReader ?
You do not test any data values in the python part also.

These need to be tested for sure.

@alkino
Copy link
Member Author

alkino commented Jun 16, 2020

test are in python for ElementReader, test in cpp are more here to help me develop.
What do you mean by data values?

@tomdele
Copy link
Contributor

tomdele commented Jun 16, 2020

I think you should test the C++ side intensively also. I guess some people (from viz or elsewhere) would prefer to use the C++ version. Also testing both (python and C++) with the same expected values can detect binding problems.

In the python part, you are testing some lengths from the .data but never the outputted data themselves. There is nothing that guaranty you retrieve the correct ones.

@tomdele
Copy link
Contributor

tomdele commented Jun 16, 2020

Also did you drop the idea of numpy array for the data ?

@tomdele
Copy link
Contributor

tomdele commented Jun 16, 2020

Also edge cases are missing on the python side :

  • empty list
  • numpy array
  • empty tuple
  • swapping ids : [1, 2] vs [2, 1]
  • the out of range times
  • the minus -1 ids
    etc ...

Also I found this using elements.h5 :

rep.get(node_ids=[99999]).data                                                                                                                                                                                              
[[], [],  [],  [],  [],  [],  [],  [],  [],  [],  [],  [],  [],  [],  [],  [],  [],  [],  [], []]

rep.get(node_ids=[999999]).times                                                                                                                                                       
[0.0, 0.2, 0.4, 0.6000000000000001, 0.8, 1.0, 1.2, 1.4, 1.5999999999999999, 1.7999999999999998, 1.9999999999999998, 2.1999999999999997, 2.4, 2.6, 2.8000000000000003, 3.0000000000000004, 3.2000000000000006, 3.400000000000001, 3.600000000000001, 3.800000000000001]

rep.get(node_ids=[999999]).ids
[]

I am fine with this behavior but is it the one you intended ?

@mgeplf
Copy link
Contributor

mgeplf commented Jun 17, 2020

Two things:

  1. What is the functional testing strategy for this? Should it have beeen able to catch the problem solved by this PR?
  2. In the future, could we give the opportunity to the other people who had participated in the review to give their approval before merge - that way they can check if their satisfied as well.

@alkino
Copy link
Member Author

alkino commented Jun 17, 2020

I'm on it.

@alkino
Copy link
Member Author

alkino commented Jun 17, 2020

1. What is the functional testing strategy for this?  Should it have beeen able to catch the problem solved by this PR?

The problem fixed by this PR is not a bug, this is a new way to see data, so I fix test, because we misunderstood things. So the test check what we things as the good way to see things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants