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

feat!: support PostgreSQL as optional storage backend #116

Merged
merged 36 commits into from
May 12, 2023
Merged

Conversation

jsstevenson
Copy link
Member

@jsstevenson jsstevenson commented Apr 20, 2023

Finalizes a dev release implementing an optional Postgres DB backend to use in TheraPy CI. Once tests are passing for everything, there will be another full release.

Otherwise, everything is basically the same as the gene PR. I've noticed that all three normalizers have slightly different query method structure, which would be good to fix up at some point, but not pressing rn.

@jsstevenson jsstevenson marked this pull request as ready for review April 20, 2023 19:03
@jsstevenson jsstevenson marked this pull request as draft April 20, 2023 19:07
@jsstevenson jsstevenson marked this pull request as ready for review April 26, 2023 14:50
@jsstevenson jsstevenson added the priority:low Low priority label Apr 26, 2023
Copy link
Member

@korikuzma korikuzma left a comment

Choose a reason for hiding this comment

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

Overall looks great!

tests/unit/test_query.py Outdated Show resolved Hide resolved
disease/database/database.py Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
if not click.confirm("Are you sure you want to overwrite existing data?"):
click.get_current_context().exit()
if not data_url:
data_url = os.environ.get("DISEASE_NORM_REMOTE_DB_URL")
Copy link
Member

Choose a reason for hiding this comment

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

Are you working on a similar docs issue as you did in gene-normalizer? If so, it would be good to add DISEASE_NORM_REMOTE_DB_URL to that issue

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I want to do one more iteration on the gene docs and then I'll start building out comparable stuff with disease and therapy

disease/database/database.py Outdated Show resolved Hide resolved
disease/database/dynamodb.py Outdated Show resolved Hide resolved
@korikuzma
Copy link
Member

@jsstevenson It also looks like there's some conflicts that need resolved before merging

@jsstevenson jsstevenson requested a review from korikuzma May 8, 2023 12:31

- name: Build local DynamoDB server
- name: Build local DynamoDB
if: ${{ env.GENE_NORM_DB_URL == 'http://localhost:8000' }}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if: ${{ env.GENE_NORM_DB_URL == 'http://localhost:8000' }}
if: ${{ env.DISEASE_NORM_DB_URL == 'http://localhost:8000' }}

./tests/unit/dynamodb_build.bash

- name: Install DynamoDB dependencies
if: ${{ env.GENE_NORM_DB_URL == 'http://localhost:8000' }}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if: ${{ env.GENE_NORM_DB_URL == 'http://localhost:8000' }}
if: ${{ env.DISEASE_NORM_DB_URL == 'http://localhost:8000' }}

run: python3 -m pip install ".[etl,test]"

- name: Install PG dependencies
if: ${{ env.GENE_NORM_DB_URL != 'http://localhost:8000' }}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if: ${{ env.GENE_NORM_DB_URL != 'http://localhost:8000' }}
if: ${{ env.DISEASE_NORM_DB_URL != 'http://localhost:8000' }}

Copy link
Member Author

Choose a reason for hiding this comment

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

f

korikuzma
korikuzma previously approved these changes May 8, 2023
@jsstevenson jsstevenson merged commit f8e8c5e into main May 12, 2023
18 checks passed
@jsstevenson jsstevenson deleted the postgres branch May 12, 2023 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:low Low priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants