Skip to content

Add enable-study command and --skip-enable-study flag to cbioportalImporter.py - #178

Open
fuzhaoyuan wants to merge 1 commit into
mainfrom
main-add-enable-study-cbioportalimporter
Open

Add enable-study command and --skip-enable-study flag to cbioportalImporter.py#178
fuzhaoyuan wants to merge 1 commit into
mainfrom
main-add-enable-study-cbioportalimporter

Conversation

@fuzhaoyuan

@fuzhaoyuan fuzhaoyuan commented Aug 27, 2026

Copy link
Copy Markdown

Addresses #12317

Summary

process_study_directory() unconditionally marks a study AVAILABLE as its last step, before the caller (metaImport.py) goes on to run the derived-table rebuild afterward. A newly imported study can therefore appear in listings before any derived data for it has been built.

What changed

  • process_study_directory() gains an enable_study=True parameter guarding the final AVAILABLE status flip; default behavior is unchanged.
  • -s import mode gains an opt-in --skip-enable-study flag to skip that flip.
  • A new enable-study command (-id/--study_ids) flips status independently, for whenever a caller decides the study is actually ready — e.g. after confirming a derived-table rebuild succeeded.

Not in scope

This is the first of two layers needed for a complete fix. It's opt-in: only callers that explicitly use --skip-enable-study and enable-study are affected, so current metaImport.py callers see no change. Wiring metaImport.py itself to use this by default — deferring AVAILABLE until its own derived-table rebuild succeeds — is a follow-up fix if needed; without it, the underlying bug in #12317 is unchanged for the common case.

…porter.py

- process_study_directory() gains an enable_study=True parameter guarding
  the final AVAILABLE status flip; default behavior is unchanged
- -s import mode gains an opt-in --skip-enable-study flag to skip that flip
- new enable-study command (-id/--study_ids) flips status independently,
  for whenever a caller decides the study is actually ready
- lets a caller defer marking a study AVAILABLE until after derived tables
  have been rebuilt, instead of the status flip and the rebuild racing
- first of two steps toward a full fix: metaImport.py doesn't use any of
  this yet, so its behavior is unchanged; wiring it in is a follow-up
@fuzhaoyuan fuzhaoyuan self-assigned this Aug 27, 2026
@sheridancbio
sheridancbio requested a review from jamesqo August 28, 2026 17:36
@kojah

kojah commented Aug 31, 2026

Copy link
Copy Markdown

I think this will need more discussion on our end. Perhaps it would be a good idea to move the status update logic into the derived table script outright, instead of trying to introduce these new commands to paper over what seems to be a product bug.

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