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 variable type handling for mypy #71

Merged
merged 9 commits into from
May 22, 2024
Merged

Fix variable type handling for mypy #71

merged 9 commits into from
May 22, 2024

Conversation

EmilyTLin
Copy link
Collaborator

No description provided.

Copy link

codecov bot commented May 21, 2024

Codecov Report

Attention: Patch coverage is 1.93548% with 152 lines in your changes are missing coverage. Please review.

Project coverage is 18.40%. Comparing base (90f7c1b) to head (80589df).
Report is 18 commits behind head on main.

Files Patch % Lines
bicytok/distanceMetricFuncs.py 0.00% 128 Missing ⚠️
bicytok/figures/figure5.py 0.00% 20 Missing ⚠️
bicytok/figures/figure4.py 0.00% 2 Missing ⚠️
bicytok/figures/figure1.py 0.00% 1 Missing ⚠️
bicytok/figures/figure6.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
+ Coverage   14.71%   18.40%   +3.68%     
==========================================
  Files          14       15       +1     
  Lines        1026      788     -238     
==========================================
- Hits          151      145       -6     
+ Misses        875      643     -232     
Flag Coverage Δ
unittests 18.40% <1.93%> (+3.68%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@EmilyTLin EmilyTLin requested a review from aarmey May 21, 2024 08:27
Copy link
Member

@aarmey aarmey left a comment

Choose a reason for hiding this comment

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

A couple small changes here.

junit.xml Outdated
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="1" skipped="0" tests="1" time="4.159" timestamp="2024-05-21T01:12:28.597684" hostname="aretha"><testcase classname="bicytok.test.test_model" name="test_optimize_design" time="2.761"><failure message="TypeError: optimizeDesign() got an unexpected keyword argument 'vals'">def test_optimize_design():
Copy link
Member

Choose a reason for hiding this comment

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

Don't think this should have been committed. Delete.

@@ -11,13 +11,13 @@ def getKxStar():


def cytBindingModel(
recCount: np.ndarray, recXaffs: np.ndarray, dose: float, vals: np.ndarray
recCount: np.ndarray, recXaffs: np.ndarray, dose: float, vals: list
Copy link
Member

Choose a reason for hiding this comment

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

Can't this be an nd.ndarray if it's just converted to such in the function?

):
"""Runs binding model for a given mutein, valency, dose, and cell type."""
# Check that values are in correct placement, can invert
Kx = getKxStar()
ligandConc = dose / (vals[0] * 1e9)

output = polyc(ligandConc, Kx, recCount, [vals], recXaffs)[0]
output = polyc(ligandConc, Kx, recCount, np.array([vals]), recXaffs)[0]
Copy link
Member

Choose a reason for hiding this comment

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

Can just pass Vals here without modification.

Copy link
Collaborator Author

@EmilyTLin EmilyTLin left a comment

Choose a reason for hiding this comment

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

Resolved

@EmilyTLin EmilyTLin requested a review from aarmey May 22, 2024 00:01
@aarmey aarmey merged commit 2d713fa into main May 22, 2024
3 of 4 checks passed
@aarmey aarmey deleted the mypy branch May 22, 2024 15:13
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