From 457d812f7084c8bae16728f8fc3f9d44359327d6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 11:55:08 +0000 Subject: [PATCH 1/3] Initial plan From e5e549830be178e9510231b9fc52cb4c3837d211 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 12:03:05 +0000 Subject: [PATCH 2/3] Change skip options to single --skip-if-downloaded-already flag Co-authored-by: ypriverol <52113+ypriverol@users.noreply.github.com> --- README.md | 4 ++-- pridepy/pridepy.py | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 36030b0..6a8f38a 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ $ pridepy download-all-public-raw-files -a PXD012353 -o /Users/yourname/Download Additional options: -- `--skip-if-downloaded-already` / `--no-skip-if-downloaded-already` flag is used to control whether to skip files that already exist in the output directory. By default, files are skipped if they already exist. Use `--no-skip-if-downloaded-already` to force re-download. +- `--skip-if-downloaded-already` flag is used to skip files that already exist in the output directory. By default, files are re-downloaded even if they already exist. Use this flag to avoid re-downloading existing files. - `--aspera-maximum-bandwidth` flag is used to specify the maximum bandwidth for the Aspera download. The default value is 100M. - `--checksum-check` flag is used to check the checksum of the downloaded files. The default value is False. @@ -93,7 +93,7 @@ $ pridepy download-px-raw-files -a PXD039236 -o /Users/yourname/Downloads/folder ``` - The tool resolves the ProteomeXchange XML and downloads via FTP when available, otherwise HTTP(S). -- Resume and skip-if-already-downloaded are supported by default. +- Resume is supported. Use `--skip-if-downloaded-already` flag to skip files that have already been downloaded. ## Download single file by name diff --git a/pridepy/pridepy.py b/pridepy/pridepy.py index 8e819d7..8821874 100644 --- a/pridepy/pridepy.py +++ b/pridepy/pridepy.py @@ -29,10 +29,10 @@ def main(): help="output folder to download or copy raw files", ) @click.option( - "--skip-if-downloaded-already/--no-skip-if-downloaded-already", + "--skip-if-downloaded-already", is_flag=True, - default=True, - help="Skip the download if the file has already been downloaded. Default is to skip.", + default=False, + help="Skip the download if the file has already been downloaded.", ) @click.option( "--aspera-maximum-bandwidth", @@ -62,7 +62,7 @@ def download_all_public_raw_files( accession (str): PRIDE project accession. protocol (str): Protocol for downloading files (ftp, aspera, globus). Default is ftp. output_folder (str): Directory to save downloaded raw files. - skip_if_downloaded_already (bool): Skip download if files already exist. Default is True. + skip_if_downloaded_already (bool): Skip download if files already exist. Default is False. aspera_maximum_bandwidth (str): Maximum bandwidth for Aspera protocol. Default is 100M. checksum_check (bool): Flag to download checksum file for the project. Default is False. """ @@ -102,10 +102,10 @@ def download_all_public_raw_files( help="output folder to download or copy raw files", ) @click.option( - "--skip-if-downloaded-already/--no-skip-if-downloaded-already", + "--skip-if-downloaded-already", is_flag=True, - default=True, - help="Skip the download if the file has already been downloaded. Default is to skip.", + default=False, + help="Skip the download if the file has already been downloaded.", ) @click.option( "--aspera-maximum-bandwidth", @@ -186,10 +186,10 @@ def download_all_public_category_files( help="output folder to download or copy files", ) @click.option( - "--skip-if-downloaded-already/--no-skip-if-downloaded-already", + "--skip-if-downloaded-already", is_flag=True, - default=True, - help="Skip the download if the file has already been downloaded. Default is to skip.", + default=False, + help="Skip the download if the file has already been downloaded.", ) @click.option("--username", required=False, help="PRIDE login username for private files") @click.option("--password", required=False, help="PRIDE login password for private files") @@ -269,10 +269,10 @@ def download_file_by_name( help="output folder to download files", ) @click.option( - "--skip-if-downloaded-already/--no-skip-if-downloaded-already", + "--skip-if-downloaded-already", is_flag=True, - default=True, - help="Skip the download if the file has already been downloaded. Default is to skip.", + default=False, + help="Skip the download if the file has already been downloaded.", ) def download_px_raw_files(accession: str, output_folder: str, skip_if_downloaded_already: bool): """CLI wrapper to download raw files via ProteomeXchange XML.""" From f34d523b770c3da45cf0ee834229c9d6c6296bd6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 12:04:40 +0000 Subject: [PATCH 3/3] Update remaining docstrings with new default behavior Co-authored-by: ypriverol <52113+ypriverol@users.noreply.github.com> --- pridepy/pridepy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pridepy/pridepy.py b/pridepy/pridepy.py index 8821874..74afe55 100644 --- a/pridepy/pridepy.py +++ b/pridepy/pridepy.py @@ -143,7 +143,7 @@ def download_all_public_category_files( accession (str): The PRIDE project accession identifier. protocol (str): The protocol to use for downloading files (ftp, aspera, globus). output_folder (str): The directory where the files will be downloaded. - skip_if_downloaded_already (bool): If True, skips downloading files that already exist. + skip_if_downloaded_already (bool): If True, skips downloading files that already exist. Default is False. aspera_maximum_bandwidth (str): Maximum bandwidth for Aspera transfers. checksum_check (bool): If True, downloads the checksum file for the project. category (str): The category of files to download. @@ -223,7 +223,7 @@ def download_file_by_name( :param protocol: Protocol to be used to download files either by ftp or aspera or from globus. Default is ftp :param file_name: fileName to be downloaded :param output_folder: output folder to download or copy files - :param skip_if_downloaded_already: Boolean value to skip the download if the file has already been downloaded. + :param skip_if_downloaded_already: Boolean value to skip the download if the file has already been downloaded. Default is False. :param username: PRIDE login username for private files :param password: PRIDE login password for private files :param aspera_maximum_bandwidth: Aspera maximum bandwidth (e.g 50M, 100M, 200M), depending on the user's network bandwidth, default is 100M