Skip to content

Fix/eventcount#196

Open
juneymf wants to merge 8 commits into
mainfrom
fix/eventcount
Open

Fix/eventcount#196
juneymf wants to merge 8 commits into
mainfrom
fix/eventcount

Conversation

@juneymf

@juneymf juneymf commented Dec 2, 2025

Copy link
Copy Markdown
Collaborator

added escape for userdefinedphenotype in eventcountphenotype

@juneymf juneymf requested a review from a-hartens as a code owner December 2, 2025 14:35
@sprivite

sprivite commented Jan 6, 2026

Copy link
Copy Markdown
Collaborator

Hi June -- In terms of a fix for your issue, the diff looks fine to me. But I think this is a good example of why UserDefinedPhenotype shouldn't exist. It breaks the programming API. The check for return_date='all' is for the user's safety and to ensure the code is doing what it's supposed to do. Removing it and allowing people to have "untyped" UserDefinedPhenotype's means people can potentially use EventCountPhenotype incorrectly. In my opinion, implementing a UserDefinedPhenotype is exactly as hard as subclassing Phenotype, except that the latter is consistent with the Phenex API and brings the user all the benefits and safety checks that come with that.

@sprivite sprivite left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

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