We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When running MetaKB tests, I'm getting the following:
metakb/venv/lib/python3.11/site-packages/pydantic/main.py:426: UserWarning: Pydantic serializer warnings: Expected `enum` but got `str` with value `'RxNorm'` - serialized value may not be as expected Expected `enum` but got `str` with value `'NCIt'` - serialized value may not be as expected Expected `enum` but got `str` with value `'HemOnc'` - serialized value may not be as expected Expected `enum` but got `str` with value `'DrugBank'` - serialized value may not be as expected Expected `enum` but got `str` with value `'GuideToPHARMACOLOGY'` - serialized value may not be as expected Expected `enum` but got `str` with value `'ChEMBL'` - serialized value may not be as expected Expected `enum` but got `str` with value `'ChemIDplus'` - serialized value may not be as expected Expected `enum` but got `str` with value `'Wikidata'` - serialized value may not be as expected
In MetaKB, run transformers tests (python3 -m pytest tests/unit/transformers -vv). I'm currently using issue-240 branch, but could use staging too.
python3 -m pytest tests/unit/transformers -vv
issue-240
staging
I do not expect to see any Pydantic serializer warnings
I see Pydantic serializer warnings
Given I'm running MetaKB transformer tests, When I see the warnings summary in the terminal, Then I will not see any Pydantic serializer warnings
source_matches has type dict[SourceName, MatchesNormalized], but it's actually be used as dict[str, MatchesNormalized]
source_matches
dict[SourceName, MatchesNormalized]
dict[str, MatchesNormalized]
No response
v0.7.1
NA
Yes, I can create a PR for this fix.
The text was updated successfully, but these errors were encountered:
fix: resolve pydantic serializer warnings in _add_merged_meta
_add_merged_meta
b40d6d2
close #458 * `source_meta` key should have type `SourceName` not `str`
fix: resolve pydantic serializer warnings in _add_merged_meta (#461)
1493477
korikuzma
Successfully merging a pull request may close this issue.
Describe the bug
When running MetaKB tests, I'm getting the following:
Steps to reproduce
In MetaKB, run transformers tests (
python3 -m pytest tests/unit/transformers -vv
). I'm currently usingissue-240
branch, but could usestaging
too.Expected behavior
I do not expect to see any Pydantic serializer warnings
Current behavior
I see Pydantic serializer warnings
Acceptance Criteria
Given I'm running MetaKB transformer tests,
When I see the warnings summary in the terminal,
Then I will not see any Pydantic serializer warnings
Possible reason(s)
source_matches
has typedict[SourceName, MatchesNormalized]
, but it's actually be used asdict[str, MatchesNormalized]
Suggested fix
No response
Branch, commit, and/or version
v0.7.1
Screenshots
No response
Environment details
NA
Additional details
No response
Contribution
Yes, I can create a PR for this fix.
The text was updated successfully, but these errors were encountered: