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

Add fail_if_missing flag to ensure source data exists #5

Merged
merged 3 commits into from
Jun 21, 2024

Conversation

rpmcginty
Copy link
Collaborator

@rpmcginty rpmcginty commented Jun 21, 2024

What's in this Change?

  • modify logging statements in s3 code
  • updates to data_sync functionality (fail_if_missing flag) to fail explicitly if source data does not exist. this is configurable.

Testing

  • unit tests

note that these tests will fail until AllenInstitute/aibs-informatics-core#5 is merged

Comment on lines +83 to +89
if not is_object(source_path) and not is_folder(source_path):
message = f"S3 path {source_path} does not exist as object or folder"
if self.config.fail_if_missing:
raise FileNotFoundError(message)
self.logger.warning(message)
return

Choose a reason for hiding this comment

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

Mostly for my curiosity, when would we want this behavior when fail_if_missing is False?

Copy link

@sheriferson sheriferson left a comment

Choose a reason for hiding this comment

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

I approved the pull request on aibs-informatics-core. LGTM if we merge that, retry the tests and they all pass.

edit: actually I just did that, hope you don't mind.

@rpmcginty rpmcginty merged commit 5d33812 into main Jun 21, 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.

2 participants