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

Cost Tests #637

Merged
merged 11 commits into from
Jan 9, 2024
Merged

Cost Tests #637

merged 11 commits into from
Jan 9, 2024

Conversation

selmanozleyen
Copy link
Collaborator

Hi!

This PR is meant to solve #632,

Currently I am testing the initialization of the objects, the special cases, and functionality with only using sample input and expected outputs.

Remaining tasks besides the future feedback:

  • test initialization of LeafDistance
  • test LeafDistance with sample input and output

ping: @giovp , @MUCDK

@selmanozleyen selmanozleyen self-assigned this Dec 11, 2023
Copy link

codecov bot commented Dec 11, 2023

Codecov Report

Attention: 54 lines in your changes are missing coverage. Please review.

Comparison is base (ba231ea) 77.45% compared to head (29ce479) 78.27%.
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #637      +/-   ##
==========================================
+ Coverage   77.45%   78.27%   +0.81%     
==========================================
  Files          36       36              
  Lines        3589     3765     +176     
  Branches      633      665      +32     
==========================================
+ Hits         2780     2947     +167     
- Misses        542      543       +1     
- Partials      267      275       +8     
Files Coverage Δ
src/moscot/_types.py 89.65% <ø> (ø)
src/moscot/base/problems/_mixins.py 82.14% <100.00%> (+1.25%) ⬆️
src/moscot/base/problems/_utils.py 63.69% <100.00%> (+0.70%) ⬆️
src/moscot/base/solver.py 89.02% <ø> (ø)
src/moscot/costs/_costs.py 97.14% <100.00%> (+17.14%) ⬆️
src/moscot/costs/_utils.py 100.00% <100.00%> (+47.82%) ⬆️
src/moscot/datasets.py 67.02% <ø> (ø)
src/moscot/problems/cross_modality/_mixins.py 83.92% <ø> (ø)
src/moscot/problems/cross_modality/_translation.py 96.15% <ø> (ø)
src/moscot/problems/space/_alignment.py 100.00% <100.00%> (ø)
... and 12 more

... and 1 file with indirect coverage changes

tests/costs/test_cost.py Outdated Show resolved Hide resolved
src/moscot/costs/_utils.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@MUCDK MUCDK left a comment

Choose a reason for hiding this comment

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

Thanks @selmanozleyen . see minor comments

@selmanozleyen selmanozleyen marked this pull request as ready for review January 1, 2024 18:51
@selmanozleyen
Copy link
Collaborator Author

Ok, I also added tests for leaf_distance which should cover everything except one case in _get_leaves method. I am not sure if I should add a test for it because it is a private method and the argument it takes is never used.

@MUCDK MUCDK merged commit 924c78a into main Jan 9, 2024
7 checks passed
@MUCDK MUCDK deleted the cost-tests branch January 9, 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