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

Refactor functions that use run_shell_cmd() function in test_sourmash.py and test_sourmash_compute.py per #987 #1032

Merged
merged 2 commits into from
Jun 22, 2020

Conversation

erikyoung85
Copy link
Contributor

@erikyoung85 erikyoung85 commented Jun 19, 2020

This PR removes all references to the old run_shell_cmd function and replaces it making use of the @utils.in_tempdir decorator
Fixes #987

  • Is it mergeable?
  • make test Did it pass the tests?
  • make coverage Is the new code covered?
  • Did it change the command-line interface? Only additions are allowed
    without a major version increment. Changing file formats also requires a
    major version number increment.
  • Was a spellchecker run on the source code and documentation after
    changes were made?

@erikyoung85 erikyoung85 linked an issue Jun 19, 2020 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jun 19, 2020

Codecov Report

Merging #1032 into master will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1032      +/-   ##
==========================================
+ Coverage   92.37%   92.42%   +0.05%     
==========================================
  Files          72       72              
  Lines        5454     5454              
==========================================
+ Hits         5038     5041       +3     
+ Misses        416      413       -3     
Impacted Files Coverage Δ
sourmash/commands.py 86.78% <0.00%> (+0.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3660fa...c3cd530. Read the comment docs.

@erikyoung85 erikyoung85 requested a review from ctb June 19, 2020 22:55
Copy link
Contributor

@ctb ctb left a comment

Choose a reason for hiding this comment

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

Looks good!

Could you edit the PR description (not title, but the textbox with the checklist in it) to reference #987? If you put in "Fixes #987" on the start of a new line, when we merge this PR it will automatically close it.

As I noted in a comment, this PR is built off of the refactor_test branch in #1020, and while that's probably OK right now, it would be better if it were not :). If you want to learn some more git, read on! The only difference between this PR and #1020 is commit 0ecd740, so you could try "fixing it" like so --

# start fro updated master branch.
git checkout master
git pull origin master
# make new branch based off of latest master
git checkout -b remove_run_shell_cmd_2
# pick off _just_ the commit that made the run_shell_cmd changes
git cherry-pick 0ecd740d
# forcibly overwrite (with a force-push) the `remove_run_shell_cmd` branch on master
git push -f origin remove_run_shell_cmd_2:remove_run_shell_cmd
# remove your local (old) run_shell_cmd branch
git branch -D remove_run_shell_cmd
# make a new one based off of this
git checkout -b remove_run_shell_cmd

and that should work. An alternative would be to close this PR and make a new one with a new branch based off of master, with that same cherry-pick.

.vscode/settings.json Outdated Show resolved Hide resolved
tests/test_sourmash.py Outdated Show resolved Hide resolved
@erikyoung85
Copy link
Contributor Author

Yes, I was worried that I accidentally had made this PR built off of the refactor_test branch. I'll try fixing it with the git code you provided maybe learn some stuff along the way too :)

@erikyoung85 erikyoung85 force-pushed the remove_run_shell_cmd branch from 0ecd740 to 2082f97 Compare June 21, 2020 18:04
@erikyoung85 erikyoung85 requested a review from ctb June 21, 2020 18:44
Copy link
Contributor

@ctb ctb left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

Can you push the "update from latest master" button, and then, assuming the tests pass, go ahead and squash & merge it? Bump me if you can't do something, I'm not 100% sure you have merge permissions :)

@erikyoung85
Copy link
Contributor Author

it says "You're not authorized to merge this pull request."

also, is there a specific spell checker I should be using to check my code?

@ctb ctb merged commit 2f02547 into master Jun 22, 2020
@ctb ctb deleted the remove_run_shell_cmd branch June 22, 2020 01:52
@ctb
Copy link
Contributor

ctb commented Jun 22, 2020

ok, I'll figure out permissions later! re spell checker, most editors have them in some form. If you're not writing docs or adding substantial new code it's probably fine not to worry about it, and I will catch most misspellings in my review too.

Congrats on your second merge!

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.

remove run_shell_cmd from tests
2 participants