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

Partner services #248

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open

Partner services #248

wants to merge 26 commits into from

Conversation

s-bessey
Copy link
Collaborator

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 89.55224% with 21 lines in your changes missing coverage. Please review.

Project coverage is 90.05%. Comparing base (c3ea2b2) to head (d0826f8).

Files with missing lines Patch % Lines
titan/features/prep.py 79.54% 9 Missing ⚠️
titan/features/partner_tracing.py 93.96% 7 Missing ⚠️
titan/features/haart.py 80.00% 5 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

❗ There is a different number of reports uploaded between BASE (c3ea2b2) and HEAD (d0826f8). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (c3ea2b2) HEAD (d0826f8)
unit 1 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #248      +/-   ##
==========================================
- Coverage   97.79%   90.05%   -7.75%     
==========================================
  Files          33       33              
  Lines        2681     2855     +174     
==========================================
- Hits         2622     2571      -51     
- Misses         59      284     +225     
Flag Coverage Δ
integration 90.05% <89.55%> (+0.08%) ⬆️
unit ?

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.


🚨 Try these New Features:

Copy link
Collaborator Author

@s-bessey s-bessey left a comment

Choose a reason for hiding this comment

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

Some comments @alrah007

self.progress_to_aids(model)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why was this moved to after progress_to_aids?

model.run_random.random() < test_prob
and not self.dx # has not yet been diagnosed
):
if self.active and model.time >= model.params.hiv.start_time:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hiv.start_time should be determined above. Nothing should happen with HIV before the start time.

self.tested_negative = True
self.tested_negative_time = model.time

if self.tested_negative and self.tested_negative_time < model.time:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What does this do? Comment!

@@ -201,11 +219,22 @@ def enroll_cap(self, model: "model.TITAN", haart_params: ObjMap):
# HAART agents based on % of diagnosed agents
num_dx_agents = self.agent.hiv.dx_counts[race][sex_type] # type: ignore[attr-defined]
num_haart_agents = self.counts[race][sex_type]

# take value from dictionary for cap
if num_haart_agents < (haart_params.cap * num_dx_agents):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why was this deleted?

if self.ever and self.agent.location.params.haart.use_reinit:
if model.run_random.random() < haart_params.reinit.prob:
self.initiate(model.run_random, haart_params, "prob")

# if agent has been diagnosed through PS, use PS treatment (haart) probability
elif self.agent.partner_tracing.ps_dx:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just for safety, I would also check that partner tracing is enabled

stats["step_3"] += self.info_stat
stats["step_4"] += self.contact_stat

if self.ps_participant:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

for the rest of these, combine if statements where applicable.

stats["step_4"] += self.contact_stat

if self.ps_participant:
if self.ps_participant_time == time:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What's the difference between participate_time and ps_participant_time?

):

# if target model is racial, use appropriate proabability
if "Racial" in params.prep.target_model and not self.agent.partner_tracing.tested_negative:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why can an agent who tested negative not go on PrEP?

self.enroll(model.run_random, model.time)
else:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Where did this else clause go?

type: int
default: 1

white:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this should be defined more similarly to the demographics, as a sub-dict with races as keys. As it is now, it's hardcoded to these specific races. See: https://github.com/pph-collective/TITAN/blob/main/titan/params/demographics.yml

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