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

ENH: add metadata necessary to download from previous idc-versions #32

Merged
merged 9 commits into from
Aug 2, 2024

Conversation

vkt1414
Copy link
Collaborator

@vkt1414 vkt1414 commented Aug 1, 2024

Pulls the strictly necessary metadata to allow downloading data from previous idc versions

solves ImagingDataCommons/idc-index#100

@fedorov
Copy link
Member

fedorov commented Aug 1, 2024

Wow, this looks really great from the description - I will review tomorrow!

How about renaming the query and the result int prior_versions_index? Or some other ..._index.

It is a key step towards solving #100, but to actually solve it, we would need to integrate handling of this additional table in idc-index.

Copy link
Member

@fedorov fedorov left a comment

Choose a reason for hiding this comment

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

I just have some small suggestions.

assets/prior_versions_index.sql Outdated Show resolved Hide resolved
assets/prior_versions_index.sql Outdated Show resolved Hide resolved
assets/prior_versions_index.sql Outdated Show resolved Hide resolved
assets/prior_versions_index.sql Outdated Show resolved Hide resolved
assets/prior_versions_index.sql Outdated Show resolved Hide resolved
assets/prior_versions_index.sql Outdated Show resolved Hide resolved
assets/prior_versions_index.sql Outdated Show resolved Hide resolved
@vkt1414 vkt1414 force-pushed the feat-add-metadata-for-series-not-in-latest-index branch from fdf2e09 to fbbb4d4 Compare August 2, 2024 01:16
@vkt1414
Copy link
Collaborator Author

vkt1414 commented Aug 2, 2024

@fedorov I just want to make sure you want to update the latest_idc_version variable yourself.

https://github.com/ImagingDataCommons/idc-index-data/pull/32/files#diff-1b8acf7ccf6a7bc784d04a22bb82263a847dacb31532f44d6c046ada6540e24eR3

@vkt1414 vkt1414 requested a review from fedorov August 2, 2024 01:48
@fedorov
Copy link
Member

fedorov commented Aug 2, 2024

@fedorov I just want to make sure you want to update the latest_idc_version variable yourself.

As opposed to running daily github action and doing this automatically? If that's the question, then yes - I don't see a need in automating that.

@vkt1414
Copy link
Collaborator Author

vkt1414 commented Aug 2, 2024

@fedorov I just want to make sure you want to update the latest_idc_version variable yourself.

As opposed to running daily github action and doing this automatically? If that's the question, then yes - I don't see a need in automating that.

Not a github action. Initially I had the following code to get the latest idc version dynamically. I hardcoded to v18 for now as Bill needs to update the table -bigquery-public-data.idc_current.version_metadata. But you removed it in your suggestion and I wanted to know if you'll change when switching idc version. And it looks you are. So I'm ok with that.

SET latest_idc_version = (
SELECT 18
--SELECT max(idc_version)
--FROM
--bigquery-public-data.idc_current.version_metadata
);

@fedorov fedorov force-pushed the feat-add-metadata-for-series-not-in-latest-index branch from 0810559 to fc057f7 Compare August 2, 2024 14:19
@fedorov
Copy link
Member

fedorov commented Aug 2, 2024

I am pretty sure you had it hardcoded as well - if I remember correctly, I just replaced "SELECT 18" with a variable initialization. The other lines were commented out. I don't have any problem keeping the commented out lines in the query, if you prefer. We can uncomment whenever that table is fixed. I don't recall Bill mentioning he is working on that, so I don't know about the timeline.

@vkt1414 vkt1414 force-pushed the feat-add-metadata-for-series-not-in-latest-index branch from e0a374a to f8987f5 Compare August 2, 2024 15:31
@vkt1414
Copy link
Collaborator Author

vkt1414 commented Aug 2, 2024

I am pretty sure you had it hardcoded as well - if I remember correctly, I just replaced "SELECT 18" with a variable initialization. The other lines were commented out. I don't have any problem keeping the commented out lines in the query, if you prefer. We can uncomment whenever that table is fixed. I don't recall Bill mentioning he is working on that, so I don't know about the timeline.

I added the commented out code back. Once Bill updates the table, we can revisit the query

@vkt1414 vkt1414 merged commit 20cc9d3 into main Aug 2, 2024
10 checks passed
@vkt1414 vkt1414 deleted the feat-add-metadata-for-series-not-in-latest-index branch August 2, 2024 15:46
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