-
Notifications
You must be signed in to change notification settings - Fork 5
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
Release 0.12.6 #132
Release 0.12.6 #132
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #132 +/- ##
==========================================
- Coverage 67.46% 67.22% -0.25%
==========================================
Files 11 11
Lines 1675 1681 +6
==========================================
Hits 1130 1130
- Misses 545 551 +6 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like maybe there is a simpler way handle the wget
not existing, right? instead of checking the OS? Not sure - if you've tested then its probably fine.
geofetch/geofetch.py
Outdated
"To download raw data You must first install the sratoolkit, with prefetch in your PATH." | ||
" Installation instruction: http://geofetch.databio.org/en/latest/install/" | ||
) | ||
if os.name == "nt": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if its windows, we don't prefetch, and just warn them instead of exiting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, because I don't know how to check if prefetch exist in windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use where
? Its available on windows XP and above it seems: https://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-the-windows-command-line
raise e | ||
if os.name == "nt": | ||
_LOGGER.error(f"{e}") | ||
raise OSError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we raise an error here? I feel like we can just check for the wget
in the beginning and handle it from there, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, here..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where wget
? Maybe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you try to execute wget --version
at the start and mark it unavailable if it raises an error?
In Powershell wget
is aliased to Invoke-WebRequest
so if you type wget
, something will happen but it's not really wget (different command line args etc.) I don't know if Python will cause Powershell commands to be executed or not, but if it does, that could also cause confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if any of this is a problem when using WSL? I thought WSL leveled the playing field when it came to posix compatibility with windows. Unfortunately I don't have immediate access to a Windows machine to test some of these things.
But I kind of agree with @pedro-w in that it should be pretty easy to do an initial check at the beginning to see if wget
is available at all and then raise errors/move forward from there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does appear to work for me under WSL but I only ran one command and saw that it started downloading files (comment)
... but WSL could be one of a number of distros and might not have wget installed (same as Linux, actually)
Updated windows support