proteobench.utils.server_io module#
- proteobench.utils.server_io.dataset_folder_exists(intermediate_hash: str, base_url: str = 'https://proteobench.cubimed.rub.de/datasets/') bool[source]#
Check if a dataset folder already exists on the public server for a given intermediate hash. First tries a direct HEAD to the folder URL, then falls back to parsing the index page.
- Parameters:
intermediate_hash – The hash to check for
base_url – Base URL of the datasets server
- Returns:
True if the dataset folder exists, False otherwise
- proteobench.utils.server_io.download_file(url: str, local_path: str, chunk_size: int = 8192) str[source]#
Download a file from URL to local path.
- proteobench.utils.server_io.get_merged_json(repo_url='https://github.com/Proteobench/Results_quant_ion_DDA/archive/refs/heads/main.zip', write_to_file=False, outfile_name='combined_results.json')[source]#
- proteobench.utils.server_io.get_raw_data(df, base_url='https://proteobench.cubimed.rub.de/datasets/', output_directory='extracted_files')[source]#
- proteobench.utils.server_io.make_submission(submission_files=None, token: str = '', module_name: str = '', submission_source: str = 'resubmission-script') list[source]#
Run the full submission pipeline programmatically for one or more result files.
- Parameters:
submission_files (list of dict, optional) – One dict per submission. Each must carry input_file, input_type and param_file. user_comments is optional. Any of default_cutoff_min_feature, evaluation_type, max_nr_observed or input_file_secondary is forwarded to benchmarking() only if the target module accepts it (see OPTIONAL_BENCHMARKING_KEYS).
token (str) – GitHub token, used both to read the results repo and to push the pull request branch.
module_name (str) – Key into MODULE_CLASSES.
submission_source (str, optional) – Origin recorded on the pull request, which decides its labels. Defaults to “resubmission-script” (label batch-resubmission); “local” additionally applies do-not-merge.
- Returns:
The URL of every pull request created, in submission order.
- Return type:
- Raises:
ValueError – If module_name is not a known module.
KeyError – If a submission dict is missing a required key.