From eed3d881883543a4ece678f3f09dd91e20b5f0eb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Dec 2025 11:15:18 +0000 Subject: [PATCH 01/11] Initial plan From fd628a610548a252809c46bdb2b626968555ddce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Dec 2025 11:22:19 +0000 Subject: [PATCH 02/11] Convert skip_if_downloaded_already option to a Click flag Co-authored-by: ypriverol <52113+ypriverol@users.noreply.github.com> --- pridepy/pridepy.py | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/pridepy/pridepy.py b/pridepy/pridepy.py index 10b2246..b25c22e 100644 --- a/pridepy/pridepy.py +++ b/pridepy/pridepy.py @@ -29,11 +29,10 @@ def main(): help="output folder to download or copy raw files", ) @click.option( - "-skip", - "--skip_if_downloaded_already", - required=False, + "--skip-if-downloaded-already/--no-skip-if-downloaded-already", + is_flag=True, default=True, - help="Boolean value to skip the download if the file has already been downloaded.", + help="Skip the download if the file has already been downloaded. Default is to skip.", ) @click.option( "--aspera_maximum_bandwidth", @@ -103,11 +102,10 @@ def download_all_public_raw_files( help="output folder to download or copy raw files", ) @click.option( - "-skip", - "--skip_if_downloaded_already", - required=False, + "--skip-if-downloaded-already/--no-skip-if-downloaded-already", + is_flag=True, default=True, - help="Boolean value to skip the download if the file has already been downloaded.", + help="Skip the download if the file has already been downloaded. Default is to skip.", ) @click.option( "--aspera_maximum_bandwidth", @@ -188,11 +186,10 @@ def download_all_public_category_files( help="output folder to download or copy files", ) @click.option( - "-skip", - "--skip_if_downloaded_already", - required=False, + "--skip-if-downloaded-already/--no-skip-if-downloaded-already", + is_flag=True, default=True, - help="Boolean value to skip the download if the file has already been downloaded.", + help="Skip the download if the file has already been downloaded. Default is to skip.", ) @click.option("--username", required=False, help="PRIDE login username for private files") @click.option("--password", required=False, help="PRIDE login password for private files") @@ -272,11 +269,10 @@ def download_file_by_name( help="output folder to download files", ) @click.option( - "-skip", - "--skip_if_downloaded_already", - required=False, + "--skip-if-downloaded-already/--no-skip-if-downloaded-already", + is_flag=True, default=True, - help="Boolean to skip a file if it already exists", + help="Skip a file if it already exists. Default is to skip.", ) 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 6e9c346698a648f6d72dc67bc32ee01d00a166e5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Dec 2025 11:24:23 +0000 Subject: [PATCH 03/11] Make help text consistent across all commands and update README Co-authored-by: ypriverol <52113+ypriverol@users.noreply.github.com> --- README.md | 2 +- pridepy/pridepy.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1b0419b..2c9f9e0 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` flag is used to skip the download of files that already exist in the output directory. +- `--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. - `--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. diff --git a/pridepy/pridepy.py b/pridepy/pridepy.py index b25c22e..a39a5d5 100644 --- a/pridepy/pridepy.py +++ b/pridepy/pridepy.py @@ -272,7 +272,7 @@ def download_file_by_name( "--skip-if-downloaded-already/--no-skip-if-downloaded-already", is_flag=True, default=True, - help="Skip a file if it already exists. Default is to skip.", + help="Skip the download if the file has already been downloaded. Default is to skip.", ) 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 a01e2d9e9b23a73160b1a9bbd354a0f4b894fdfd Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Fri, 12 Dec 2025 11:22:45 +0000 Subject: [PATCH 04/11] Update pridepy/pridepy.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- pridepy/pridepy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pridepy/pridepy.py b/pridepy/pridepy.py index a39a5d5..8341707 100644 --- a/pridepy/pridepy.py +++ b/pridepy/pridepy.py @@ -29,7 +29,7 @@ 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/--no-skip_if_downloaded_already", is_flag=True, default=True, help="Skip the download if the file has already been downloaded. Default is to skip.", From 5ccda19ea4b52c6a98db4dae8d8f1192518cb441 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Fri, 12 Dec 2025 11:31:02 +0000 Subject: [PATCH 05/11] Update pridepy/pridepy.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- pridepy/pridepy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pridepy/pridepy.py b/pridepy/pridepy.py index 8341707..1c84098 100644 --- a/pridepy/pridepy.py +++ b/pridepy/pridepy.py @@ -186,7 +186,7 @@ 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/--no-skip_if_downloaded_already", is_flag=True, default=True, help="Skip the download if the file has already been downloaded. Default is to skip.", From 74d8b47384be6fc6cc374852457bd829d102d912 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Fri, 12 Dec 2025 11:31:10 +0000 Subject: [PATCH 06/11] Update pridepy/pridepy.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- pridepy/pridepy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pridepy/pridepy.py b/pridepy/pridepy.py index 1c84098..d7f1337 100644 --- a/pridepy/pridepy.py +++ b/pridepy/pridepy.py @@ -269,7 +269,7 @@ 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/--no-skip_if_downloaded_already", is_flag=True, default=True, help="Skip the download if the file has already been downloaded. Default is to skip.", From fc0a7b7faec1343acecb851eb2cc46427c1b0d30 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 11:34:11 +0000 Subject: [PATCH 07/11] Initial plan From 61c8b10835bf3ef2c676e174bfec9bca31c01814 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 11:39:20 +0000 Subject: [PATCH 08/11] Convert all CLI flags from underscores to hyphens for consistency Co-authored-by: ypriverol <52113+ypriverol@users.noreply.github.com> --- README.md | 4 ++-- pridepy/pridepy.py | 38 +++++++++++++++++++------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 2c9f9e0..36030b0 100644 --- a/README.md +++ b/README.md @@ -81,8 +81,8 @@ $ 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. -- `--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. +- `--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. ## Downloading raw files from ProteomeXchange (PX) diff --git a/pridepy/pridepy.py b/pridepy/pridepy.py index d7f1337..8e819d7 100644 --- a/pridepy/pridepy.py +++ b/pridepy/pridepy.py @@ -24,24 +24,24 @@ def main(): ) @click.option( "-o", - "--output_folder", + "--output-folder", required=True, help="output folder to download or copy raw files", ) @click.option( - "--skip_if_downloaded_already/--no-skip_if_downloaded_already", + "--skip-if-downloaded-already/--no-skip-if-downloaded-already", is_flag=True, default=True, help="Skip the download if the file has already been downloaded. Default is to skip.", ) @click.option( - "--aspera_maximum_bandwidth", + "--aspera-maximum-bandwidth", required=False, help="Aspera maximum bandwidth (e.g 50M, 100M, 200M), depending on the user's network bandwidth, default is 100M", default="100M", ) @click.option( - "--checksum_check", + "--checksum-check", required=False, help="Download checksum file for project", is_flag=True, @@ -97,7 +97,7 @@ def download_all_public_raw_files( ) @click.option( "-o", - "--output_folder", + "--output-folder", required=True, help="output folder to download or copy raw files", ) @@ -108,13 +108,13 @@ def download_all_public_raw_files( help="Skip the download if the file has already been downloaded. Default is to skip.", ) @click.option( - "--aspera_maximum_bandwidth", + "--aspera-maximum-bandwidth", required=False, help="Aspera maximum bandwidth (e.g 50M, 100M, 200M), depending on the user's network bandwidth, default is 100M", default="100M", ) @click.option( - "--checksum_check", + "--checksum-check", required=False, help="Download checksum file for project", is_flag=True, @@ -178,15 +178,15 @@ def download_all_public_category_files( default="ftp", help="Protocol to be used to download files either by ftp or aspera or from globus. Default is ftp", ) -@click.option("-f", "--file_name", required=True, help="fileName to be downloaded") +@click.option("-f", "--file-name", required=True, help="fileName to be downloaded") @click.option( "-o", - "--output_folder", + "--output-folder", required=True, help="output folder to download or copy files", ) @click.option( - "--skip_if_downloaded_already/--no-skip_if_downloaded_already", + "--skip-if-downloaded-already/--no-skip-if-downloaded-already", is_flag=True, default=True, help="Skip the download if the file has already been downloaded. Default is to skip.", @@ -194,13 +194,13 @@ def download_all_public_category_files( @click.option("--username", required=False, help="PRIDE login username for private files") @click.option("--password", required=False, help="PRIDE login password for private files") @click.option( - "--aspera_maximum_bandwidth", + "--aspera-maximum-bandwidth", required=False, help="Aspera maximum bandwidth (e.g 50M, 100M, 200M), depending on the user's network bandwidth, default is 100M", default="100M", ) @click.option( - "--checksum_check", + "--checksum-check", required=False, help="Download checksum file for project", is_flag=True, @@ -264,12 +264,12 @@ def download_file_by_name( ) @click.option( "-o", - "--output_folder", + "--output-folder", required=True, help="output folder to download files", ) @click.option( - "--skip_if_downloaded_already/--no-skip_if_downloaded_already", + "--skip-if-downloaded-already/--no-skip-if-downloaded-already", is_flag=True, default=True, help="Skip the download if the file has already been downloaded. Default is to skip.", @@ -304,7 +304,7 @@ def list_private_files(accession, user, password): @main.command() @click.option( "-o", - "--output_file", + "--output-file", required=True, help="output file to save all the projects metadata", ) @@ -320,7 +320,7 @@ def stream_projects_metadata(output_file): @main.command() @click.option( "-o", - "--output_file", + "--output-file", required=True, help="output file to save all the files metadata", ) @@ -356,7 +356,7 @@ def stream_files_metadata(accession, output_file): ) @click.option( "-ps", - "--page_size", + "--page-size", required=False, default=100, type=click.IntRange(min=1, max=1000), @@ -372,14 +372,14 @@ def stream_files_metadata(accession, output_file): ) @click.option( "-sd", - "--sort_direction", + "--sort-direction", required=False, default="DESC", help="Sorting direction: ASC or DESC", ) @click.option( "-sf", - "--sort_fields", + "--sort-fields", required=False, default=["submission_date"], multiple=True, 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 09/11] 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 10/11] 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 11/11] 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