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 tests for missing libraries #127

Merged
merged 15 commits into from
Feb 28, 2024
Merged

Conversation

sroet
Copy link
Collaborator

@sroet sroet commented Feb 27, 2024

This should add coverage for the lines that deal with missing optional modules

@sroet sroet requested a review from McHaillet February 27, 2024 16:25
@sroet sroet marked this pull request as draft February 27, 2024 16:41
@sroet
Copy link
Collaborator Author

sroet commented Feb 27, 2024

@McHaillet please wait on the review, python import caching is anoying for these tests

Copy link

github-actions bot commented Feb 27, 2024

File Coverage Missing
All files 79%
src/pytom_tm/angles.py 94% 44
src/pytom_tm/correlation.py 85% 94-95 126
src/pytom_tm/entry_points.py 68% 27 104-121 283-342 431-445 542-557 791-858 899-910
src/pytom_tm/extract.py 73% 107-118 170-176 202-205 277-295
src/pytom_tm/io.py 42% 14-18 24-27 33-36 42-45 51-54 61-65 73-86 92-99 106-113 128-130 163 197-198 243-245 261 277 294-303 323-328
src/pytom_tm/mask.py 80% 70 85 94-95
src/pytom_tm/matching.py 95% 186-196 340
src/pytom_tm/parallel.py 84% 14-15 81-87 95-97 104 109 148
src/pytom_tm/plotting.py 16% 20-22 25-32 36-44 48-51 54-70 73-74 77-78 98-103 119-127 133-150 165-173 177-194 198-206 210-217 223 229 234 248-398
src/pytom_tm/template.py 57% 57-58 67 76-87 92-97 107-112 114
src/pytom_tm/tmjob.py 96% 170-171 183 189-191 194 327 367
src/pytom_tm/utils.py 78% 16-18
src/pytom_tm/weights.py 95% 59 290-291 298 477 480 483
tests/test00_parallel.py 96% 81 93
tests/test_angles.py 95% 34
tests/test_entry_points.py 90% 18-19
tests/test_extract.py 91% 16
tests/test_mask.py 97% 96
tests/test_template_matching.py 96% 48
tests/test_tmjob.py 98% 144 353
tests/test_weights.py 96% 117 294 308 320

Minimum allowed coverage is 75%

Generated by 🐒 cobertura-action against 1e94b9e

@sroet sroet marked this pull request as ready for review February 27, 2024 17:32
@sroet
Copy link
Collaborator Author

sroet commented Feb 27, 2024

@McHaillet it required some wrangling of the way python caches imports, but the tests seem to pass 😄 and lead to an increase of a (couple) percent on the test coverage. Please have a look to review

Copy link
Collaborator

@McHaillet McHaillet left a comment

Choose a reason for hiding this comment

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

Looks good!

I guess the import matplotlib line in extract.py can be removed (dont know why I put that there in the first place): https://github.com/sroet/pytom-template-matching-gpu/blob/4418d20aec37942f55785406a7dc893784d3c3d8/src/pytom_tm/extract.py#L20

src/pytom_tm/__init__.py Outdated Show resolved Hide resolved
@sroet
Copy link
Collaborator Author

sroet commented Feb 28, 2024

I guess the import matplotlib line in extract.py can be removed (dont know why I put that there in the first place): https://github.com/sroet/pytom-template-matching-gpu/blob/4418d20aec37942f55785406a7dc893784d3c3d8/src/pytom_tm/extract.py#L20

Done as well, please have another look!

@sroet sroet requested a review from McHaillet February 28, 2024 13:01
Copy link
Collaborator

@McHaillet McHaillet left a comment

Choose a reason for hiding this comment

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

LGTM!

@sroet sroet merged commit 0bd4763 into SBC-Utrecht:main Feb 28, 2024
2 checks passed
@sroet sroet deleted the test_broken_imports branch February 28, 2024 14:55
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.

2 participants