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

cell_locations: Writing output to S3 was failing; fixed this #271

Merged
merged 2 commits into from
Jun 2, 2023

Conversation

shntnu
Copy link
Member

@shntnu shntnu commented Apr 8, 2023

modified from EmbeddedArtistry

Description

The code failed when the output was on S3; I needed to fix a bug that checks for the file's existence on S3.

What is the nature of your change?

  • Bug fix (fixes an issue).

Checklist

Please ensure that all boxes are checked before indicating that a pull request is ready for review.

  • I have read the CONTRIBUTING.md guidelines.
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • New and existing unit tests pass locally with my changes.
  • I have added tests that prove my fix is effective or that my feature works. No; See Increase test coverage of cell_locations by figuring out how to use moto #265
  • I have deleted all non-relevant text in this pull request template.

@codecov-commenter
Copy link

Codecov Report

Merging #271 (02f319e) into master (a5ae6c8) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master     #271   +/-   ##
=======================================
  Coverage   95.07%   95.07%           
=======================================
  Files          57       57           
  Lines        3044     3044           
=======================================
  Hits         2894     2894           
  Misses        150      150           
Flag Coverage Δ
unittests 95.07% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pycytominer/cyto_utils/cell_locations.py 84.21% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@shntnu shntnu requested a review from d33bs April 8, 2023 14:42
@shntnu
Copy link
Member Author

shntnu commented Apr 8, 2023

@d33bs please note that I could not add a test to check for this; see #265

Copy link
Member

@d33bs d33bs left a comment

Choose a reason for hiding this comment

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

Thank you for this contribution @shntnu ! I'd like to request changes on this PR mostly with concerns to exception handling and general discussion.

Some additional items besides those mentioned in the comments:

  • I'd ask that you please update the PR description with a root cause or need for the PR. It looks like the description still include the template content. If appropriate, please also update the PR title to the focus area as well. Doing this will help record what changes are occurring and why.
  • Given that this occurred partially because of a lack of unit/functional tests, would it make sense to write a quick test to make sure we cover this scenario? Even a small test might provide enough coverage to incrementally begin addressing any unforeseen gaps.

What do you think? Interested in your thoughts - thank you in advance!

pycytominer/cyto_utils/cell_locations.py Show resolved Hide resolved
pycytominer/cyto_utils/cell_locations.py Outdated Show resolved Hide resolved
@shntnu shntnu changed the title Fix when output is S3 cell_locations: Writing output to S3 was failing; fixed this Apr 16, 2023
@shntnu
Copy link
Member Author

shntnu commented Apr 16, 2023

  • I'd ask that you please update the PR description with a root cause or need for the PR. It looks like the description still include the template content. If appropriate, please also update the PR title to the focus area as well. Doing this will help record what changes are occurring and why.

Done

  • Given that this occurred partially because of a lack of unit/functional tests, would it make sense to write a quick test to make sure we cover this scenario? Even a small test might provide enough coverage to incrementally begin addressing any unforeseen gaps.

Unfortunately, I don't have the expertise to write such a test because it involves the use of moto (#265)

I did create a stub for this here (see Details) #257 (comment) but I didn't have the expertise to push this further.

@shntnu shntnu requested a review from d33bs April 16, 2023 19:33
Copy link
Member

@d33bs d33bs left a comment

Choose a reason for hiding this comment

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

Thanks @shntnu and apologies for my delay, this LGTM!

I do think we should prioritize testing to make sure work like this is covered by some form of testing in the future by addressing the issue you created. Just the same, I understand the need to move forward to balance progress + testing assurance.

@gwaybio - do you have any thoughts here as well?

Copy link
Member

@gwaybio gwaybio left a comment

Choose a reason for hiding this comment

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

LGTM! @shntnu - ok to merge?

@gwaybio
Copy link
Member

gwaybio commented May 3, 2023

actually, @shntnu - feel free to merge when you're happy (I assume you have write access to this repo).

@gwaybio
Copy link
Member

gwaybio commented Jun 1, 2023

@shntnu - doing some pycytominer cleanup. Is this good to merge?

@shntnu
Copy link
Member Author

shntnu commented Jun 2, 2023

Oops, sorry. All set!

@shntnu shntnu merged commit 470fc56 into master Jun 2, 2023
@shntnu shntnu deleted the issues/270 branch June 2, 2023 11:48
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.

4 participants