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

[GEN-1636] add IDs from retraction form in the retraction steps for creating clinical release files #164

Merged
merged 4 commits into from
Dec 10, 2024

Conversation

xindiguo
Copy link
Contributor

@xindiguo xindiguo commented Dec 9, 2024

No description provided.

@xindiguo xindiguo requested a review from a team as a code owner December 9, 2024 21:33
Copy link
Member

@thomasyu888 thomasyu888 left a comment

Choose a reason for hiding this comment

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

I glanced at this and the overall logic looks good, but I'll leave it to @rxu17 for final review.

We should add tests to any new code that is written even if we don't have CI/CD set up.

scripts/release/update_retraction_table.py Show resolved Hide resolved
Copy link
Contributor

@rxu17 rxu17 left a comment

Choose a reason for hiding this comment

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

LGTM! Just a comment about including staging for the retraction table update.

I think eventually we want to support staging versions of the folders/tables used in the create_release_files.R as well but that would require us to support the input and output and would be more time than we can do this time.

release_dat <- dataset %>%
filter(cohort_internal==selected_cohort) %>%
filter(!record_id %in% retracted_patient) %>%
select(all_of(release_cols))

# remove retracted sample
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it might be best to have some unit tests for this function since it does the retraction
EDIT: Based on coordination meeting discussion, this has to wait due to deadline tmrw 12/11

parser.add_argument("-s", "--synapse_config", default=synapseclient.client.CONFIG_FILE, help="Path to Synapse credentials file")
parser.add_argument("-m", "--message", default="", help="Version comment for the table update")
parser.add_argument("-d", "--dry_run", action="store_true", help="Flag for dry run (no updates will be made)")

Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Let's add an additional argument called --production and create a staging version of the retraction table here.
  2. Then convert RETRACTION_TABLE_ID to like a dictionary or something to hold the two sets of synapse ids.
  3. Then add logic here to use the correct synapse id depending on the production flag.

This way we can run things on staging first to see if the retractions are as expected/test the synapse upload. Thoughts?

@xindiguo xindiguo merged commit ade4e9d into develop Dec 10, 2024
4 checks passed
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.

3 participants