naobservatory / p2ra

4 stars 1 forks source link

Simplify interface for getting public health predictors #186

Closed dp-rice closed 1 year ago

dp-rice commented 1 year ago

@jeffkaufman, I'm jotting down a thought so I don't forget, but this is not urgent.

Our current interface for getting predictors has evolved to be somewhat convoluted. I think it could be nice to refactor so that the return type of the estimate_*() functions was dict[TaxID, list[Predictor]]. I think it makes sense that the predictors always be grouped by TaxID, since there's not really a uses for them ungrouped. I also don't think we need the keys to be frozenset anymore because it seems like we should be avoiding pathogens that are not clades.

dp-rice commented 1 year ago

If it's not broken...