Skip to content

Commit

Permalink
updated windows support
Browse files Browse the repository at this point in the history
  • Loading branch information
khoroshevskyi committed Jan 18, 2024
1 parent 256f5f5 commit 0cbb0c2
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 42 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/run-pytest-windows.yml

This file was deleted.

4 changes: 4 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ geofetch -i GSE95654 --just-metadata
geofetch -i GSE95654 --processed --just-metadata
```


⁣**Note:** We ensure that GEOfetch is compatible with Unix, Linux, and Mac OS X.
However, due to dependencies, some features of GEOfetch may not be available on Windows.

### Check out what exactly argument you want to use to download data:

![](./img/arguments_outputs.svg)
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [0.12.6] -- 2024-01-18
- Updated support for Windows (Some of the functionality could not be available on Windows)

## [0.12.5] -- 2023-11-29
- Fixed bug, where description was not populated in PEP

Expand Down
2 changes: 1 addition & 1 deletion geofetch/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.12.5"
__version__ = "0.12.6"
25 changes: 16 additions & 9 deletions geofetch/geofetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1796,15 +1796,22 @@ def _download_processed_file(self, file_url: str, data_folder: str) -> bool:
return True

except IOError as e:
_LOGGER.error(str(e))
# The server times out if we are hitting it too frequently,
# so we should sleep a bit to reduce frequency
sleeptime = (ntry + 1) ** 3
_LOGGER.info(f"Sleeping for {sleeptime} seconds")
time.sleep(sleeptime)
ntry += 1
if ntry > 4:
raise e
if os.name == "nt":
_LOGGER.error(f"{e}")
raise OSError(
"Windows may not have wget command. "
"Check if `wget` command is installed correctly."
)
else:
_LOGGER.error(str(e))
# The server times out if we are hitting it too frequently,
# so we should sleep a bit to reduce frequency
sleeptime = (ntry + 1) ** 3
_LOGGER.info(f"Sleeping for {sleeptime} seconds")
time.sleep(sleeptime)
ntry += 1
if ntry > 4:
raise e

def _get_SRA_meta(self, file_gse_content: list, gsm_metadata, file_sra=None):
"""
Expand Down

0 comments on commit 0cbb0c2

Please sign in to comment.