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

Refactor some tests #1

Merged
merged 2 commits into from
Jun 27, 2019
Merged

Refactor some tests #1

merged 2 commits into from
Jun 27, 2019

Conversation

massich
Copy link

@massich massich commented Jun 26, 2019

There you go, we can discuss what does and does not make sense.

@DiGyt
Copy link
Owner

DiGyt commented Jun 26, 2019

@massich

Thanks very much for that! this looks great.
The only thing i'd change is that the ascii files curry7_bdf_ascii_file are not used for the tests, (or did i miss them)?

Can we add them by simple doing:

@pytest.mark.parametrize('fname', [
    pytest.param(curry7_bdf_file, id='curry 7'),
    pytest.param(curry8_bdf_file, id='curry 8'),
    pytest.param(curry7_bdf_ascii_file, id='curry 7 ascii'),
    pytest.param(curry8_bdf_ascii_file, id='curry 8 ascii'),
])

I think it would be important to cover these too, since the data reading is done differently for ascii.

@codecov-io
Copy link

Codecov Report

Merging #1 into read_curry will decrease coverage by 0.01%.
The diff coverage is 100%.

@@              Coverage Diff               @@
##           read_curry       #1      +/-   ##
==============================================
- Coverage       89.24%   89.23%   -0.02%     
==============================================
  Files             416      416              
  Lines           74715    74712       -3     
  Branches        12336    12335       -1     
==============================================
- Hits            66683    66669      -14     
- Misses           5166     5175       +9     
- Partials         2866     2868       +2

@DiGyt DiGyt merged commit e673c2f into DiGyt:read_curry Jun 27, 2019
@testing.requires_testing_data
@pytest.mark.parametrize('fname,tol', [
pytest.param(curry7_rfDC_file, 1e-6, id='curry 7'),
pytest.param(curry8_rfDC_file, 1e-3, id='curry 8'), # XXX: why 1e-3?
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some values that turned out slightly different, maybe due to some floating point + rounding stuff? The data from these two files is read exactly the same, so i'd say this is the best we'd get of it...

@massich
Copy link
Author

massich commented Jun 27, 2019 via email

@DiGyt
Copy link
Owner

DiGyt commented Jun 27, 2019

@massich

At the very least a commed should be there stating that this behavior is unexpected, we don't understand why this happen and we should get back to it.

I'll add that in the next commit

Apart from that, do you understood everything? Do you think you can apply similar ideas in other places?

Yes, thank you very much for that. I already added the ASCII files to the new parametrized tests.
I think the coverage is already quite good.
The only thing i would add is a case where sfreq=0. I've just opened a PR for adding such a file to the test suite.

DiGyt added a commit that referenced this pull request Aug 6, 2019
Signed-off-by: Dirk Gütlin <dirk.guetlin@stud.sbg.ac.at>
DiGyt pushed a commit that referenced this pull request Apr 15, 2021
* add info / refs on limo dataset

add sklearn regression

add class linear regression

update limo doc

fix limo fetcher docstring

fix merging issues

* FIX: Indentation

* FIX: A couple more

* STY: Nitpicks [ci skip]

* ENH: Links

* Apply suggestions from code review

add jonas suggestions

Co-Authored-By: jona-sassenhagen <jona.sassenhagen@gmail.com>

* fix syntax + remaining issues

* tighten up prose and code (#1)

* drop class approach / add LIMO_PATH to config

* Apply suggestions from code review

Co-Authored-By: Daniel McCloy <dan.mccloy@gmail.com>
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.

3 participants