diff --git a/.github/workflows/run-pytest-windows.yml b/.github/workflows/run-pytest-windows.yml deleted file mode 100644 index b4839f7..0000000 --- a/.github/workflows/run-pytest-windows.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Run pytests windows - -on: - push: - branches: [dev] - pull_request: - branches: [master, dev] - -jobs: - pytest: - runs-on: ${{ matrix.os }} - strategy: - matrix: - python-version: ["3.10"] - os: [windows-latest] - - steps: - - uses: actions/checkout@v2 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install test dependencies - run: pip install -r requirements/requirements-test.txt - - - name: Install package - run: python -m pip install . - - - name: Run pytest tests - run: pytest tests -x -vv diff --git a/docs/README.md b/docs/README.md index 1976829..3d00313 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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) diff --git a/docs/changelog.md b/docs/changelog.md index 2846978..62194c1 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -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 diff --git a/geofetch/_version.py b/geofetch/_version.py index 8e377d6..8e2394f 100644 --- a/geofetch/_version.py +++ b/geofetch/_version.py @@ -1 +1 @@ -__version__ = "0.12.5" +__version__ = "0.12.6" diff --git a/geofetch/geofetch.py b/geofetch/geofetch.py index 0f904e3..07f3ce4 100755 --- a/geofetch/geofetch.py +++ b/geofetch/geofetch.py @@ -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): """