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: ensure Entity objects return type as str #434

Merged
merged 7 commits into from
Jul 18, 2024
Merged

fix: ensure Entity objects return type as str #434

merged 7 commits into from
Jul 18, 2024

Conversation

korikuzma
Copy link
Contributor

@korikuzma korikuzma commented Jul 17, 2024

close #433

  • Add back use_enum_values config . I removed in feat!: update vrs/common models #417 because of a copy/paste I had done in the Adjacency class which left me confused.
  • type field should be a literal string, not enum

@korikuzma korikuzma self-assigned this Jul 17, 2024
@korikuzma korikuzma requested review from a team as code owners July 17, 2024 16:33
@korikuzma korikuzma added bug Something isn't working priority:high High priority labels Jul 17, 2024
@korikuzma korikuzma marked this pull request as draft July 17, 2024 16:36
@korikuzma korikuzma marked this pull request as ready for review July 17, 2024 21:06

from pydantic import Field, RootModel

from ga4gh.core.entity_models import DomainEntity


class CommonDomainType(str, Enum):
class CommonDomainType:
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@korikuzma
Copy link
Contributor Author

@jsstevenson I reverted back to str, Enum because I think it makes more sense. We do not want people to be able to reassign these values (whether on purpose or accident) in downstream apps. Lmk if you disagree and I can revert last commit to go back to simple class constant.

@jsstevenson jsstevenson self-requested a review July 18, 2024 12:31
@korikuzma korikuzma merged commit 03425d3 into main Jul 18, 2024
6 checks passed
@korikuzma korikuzma deleted the issue-433 branch July 18, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:high High priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Object types return ENUM instead of ENUM.value
2 participants