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

Add missing tests #136

Merged
merged 21 commits into from
Jul 26, 2023
Merged

Add missing tests #136

merged 21 commits into from
Jul 26, 2023

Conversation

mgerbino
Copy link
Collaborator

@mgerbino mgerbino commented Jun 5, 2023

This PR is work in progress towards reaching 85% test coverage. Starting from poisson data test.

@mgerbino mgerbino added this to the v0.1 milestone Jun 5, 2023
@mgerbino mgerbino linked an issue Jun 5, 2023 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Jun 5, 2023

Codecov Report

Merging #136 (2c5658a) into master (d6b2512) will increase coverage by 2.37%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
+ Coverage   75.42%   77.79%   +2.37%     
==========================================
  Files          30       30              
  Lines        1961     1932      -29     
==========================================
+ Hits         1479     1503      +24     
+ Misses        482      429      -53     
Files Changed Coverage Δ
soliket/cosmopower.py 67.83% <ø> (+1.83%) ⬆️
soliket/gaussian.py 96.15% <ø> (+26.41%) ⬆️
soliket/utils.py 92.85% <ø> (+32.14%) ⬆️
soliket/cash.py 100.00% <100.00%> (+42.10%) ⬆️

... and 1 file with indirect coverage changes

@itrharrison itrharrison added the tests Improvements to tests label Jun 7, 2023
@itrharrison itrharrison changed the title added option to test poisson data with samples Add missing tests Jun 9, 2023
@itrharrison
Copy link
Collaborator

@HTJense would you be able to help us out with the missing test for the CosmoPowerDerived class?

@HTJense
Copy link
Member

HTJense commented Jun 9, 2023

@HTJense would you be able to help us out with the missing test for the CosmoPowerDerived class?

Cosmopower only comes with CMB and P(k) networks pre-installed. To make a test, I would have to externally install networks that reproduce derived parameters (most likely Boris' networks, which are, as far as I am aware, the only publicly-available implementation of this type so far). While certainly possible, I didn't think it would be good practice to rely on many external packages like these.

@itrharrison
Copy link
Collaborator

@HTJense okay, cool. I think the best course of action is to leave it uncovered

alternatives would be to remove it... which seems a shame, or to mark it not for coverage... which would also be wrong

I think just leaving it uncovered as a kind of 'todo' is fine.

@mgerbino mgerbino marked this pull request as ready for review June 27, 2023 12:28
@mgerbino mgerbino requested a review from itrharrison June 27, 2023 12:28
Copy link
Collaborator

@itrharrison itrharrison left a comment

Choose a reason for hiding this comment

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

lgtm

@itrharrison itrharrison merged commit 5950d32 into master Jul 26, 2023
@itrharrison itrharrison deleted the dev-improve-test-coverage-above-85 branch July 26, 2023 11:30
mgerbino added a commit that referenced this pull request Oct 4, 2023
* added option to test poisson data with samples

* addressing codestyle

* addressing codestyle and fixing wrong path when in tox

* addressing wrong path in tox

* added test data for test cash lkl

* polished test datapath acquisition

* skipping unnecessary functions to cover in gaussian

* skipped unnecessary functions in cosmpopower for coverage

* added simple tes for binner in utils

* cosmetics in test_utils

* added test for binner in utils

* Updated utils test and added utils documentation

* documentation updated

* cosmetics

* cosmetics

* cosmetics

* codestyle compliant

* tody up utils doc

---------

Co-authored-by: Martina Gerbino <bradamante@martina.local>
Co-authored-by: Ian Harrison <itrharrison@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Improvements to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Test coverage above 85%
4 participants