-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat!: use abstract interface for DB #378
Conversation
src/therapy/database/dynamodb.py
Outdated
def __init__(self, db_url: Optional[str] = None, **db_args) -> None: | ||
"""Initialize Database class. | ||
|
||
:param str db_url: URL endpoint for DynamoDB source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:param str db_url: URL endpoint for DynamoDB source | |
:param db_url: URL endpoint for DynamoDB source |
src/therapy/database/dynamodb.py
Outdated
:param str concept_id: concept ID for therapy record | ||
:param bool case_sensitive: if true, performs exact lookup, which is more | ||
efficient. Otherwise, performs filter operation, which doesn't require | ||
correct casing. | ||
:param bool merge: if true, look for merged record; look for identity record | ||
otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:param str concept_id: concept ID for therapy record | |
:param bool case_sensitive: if true, performs exact lookup, which is more | |
efficient. Otherwise, performs filter operation, which doesn't require | |
correct casing. | |
:param bool merge: if true, look for merged record; look for identity record | |
otherwise. | |
:param concept_id: concept ID for therapy record | |
:param case_sensitive: if true, performs exact lookup, which is more | |
efficient. Otherwise, performs filter operation, which doesn't require | |
correct casing. | |
:param merge: if true, look for merged record; look for identity record | |
otherwise. |
src/therapy/database/dynamodb.py
Outdated
def add_record(self, record: Dict, src_name: SourceName) -> None: | ||
"""Add new record to database. | ||
|
||
:param Dict record: record to upload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:param Dict record: record to upload | |
:param record: record to upload |
src/therapy/database/dynamodb.py
Outdated
:param str term: referent term | ||
:param str concept_id: concept ID to refer to | ||
:param str ref_type: one of {'alias', 'label', 'xref', | ||
'associated_with'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:param str term: referent term | |
:param str concept_id: concept ID to refer to | |
:param str ref_type: one of {'alias', 'label', 'xref', | |
'associated_with'} | |
:param term: referent term | |
:param concept_id: concept ID to refer to | |
:param ref_type: one of {'alias', 'label', 'xref', | |
'associated_with'} |
Co-authored-by: Kori Kuzma <korikuzma@gmail.com>
close #343
progress on #254
This PR does similar work as the Postgres PRs for the other normalizers, but just updates the interface and related elements for DynamoDB (postgres will be a future PR, it's been giving me some troubles and I might need to rethink how it was implemented in the other normalizers).