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

Release 0.12.6 #132

Merged
merged 10 commits into from
Feb 5, 2024
Merged

Release 0.12.6 #132

merged 10 commits into from
Feb 5, 2024

Conversation

khoroshevskyi
Copy link
Member

Updated windows support

Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (d49c5d0) 67.46% compared to head (62943be) 67.22%.

❗ Current head 62943be differs from pull request most recent head b88522c. Consider uploading reports for the commit b88522c to get more accurate results

Files Patch % Lines
geofetch/geofetch.py 5.88% 16 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link
Member

@nleroy917 nleroy917 left a 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.

docs/README.md Show resolved Hide resolved
"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":
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

@nleroy917 nleroy917 Jan 19, 2024

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(
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Same, here..

Copy link
Member

Choose a reason for hiding this comment

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

where wget? Maybe

Copy link
Contributor

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.

Copy link
Member

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

Copy link
Contributor

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)

@pedro-w pedro-w mentioned this pull request Jan 22, 2024
@khoroshevskyi khoroshevskyi merged commit fac0ccd into master Feb 5, 2024
5 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.

3 participants