Crispr paml#116
Merged
Merged
Conversation
yfan2012
marked this pull request as ready for review
June 15, 2026 17:39
yfan2012
commented
Jun 17, 2026
yfan2012
commented
Jun 17, 2026
yfan2012
commented
Jun 17, 2026
yfan2012
commented
Jun 17, 2026
yfan2012
commented
Jun 17, 2026
yfan2012
commented
Jun 17, 2026
yfan2012
commented
Jun 17, 2026
yfan2012
commented
Jun 18, 2026
Comment on lines
-297
to
-301
| if filters and 'suffix' in filters: | ||
| if f.name.endswith(filters['suffix']): | ||
| matching_files.append((f'/{collection_name}/{f.name}', file_id)) | ||
| else: | ||
| matching_files.append((f'/{collection_name}/{f.name}', file_id)) |
Author
There was a problem hiding this comment.
This if/else pairing causes all files to be matched as long as the 'suffix' is not specified, but another filter is. I think this is incorrect. See test_filters_work_on_both_methods() in test_get_files_fullpath.py
Author
|
Regarding previous testing for the
New changes:
|
golharam
reviewed
Jun 23, 2026
| :return: List of tuples (file path, file object) matching filter criteria | ||
| :return: List of tuples (full_path, file_ref) matching filter criteria. | ||
| full_path: The complete path including collection/folder and subdirectories | ||
| e.g., "/CollectionName/subdir/file.fastq.gz" |
There was a problem hiding this comment.
CollectionName shouldn't be mentioned here in base_platform.py. That's Arvados specific.
Author
There was a problem hiding this comment.
Good point, the example now given is the more realistic /inputs/run1/sample1/file1.fastq.gz
Author
|
Tested RNA/WES/WGS pipeline launchers with these changes in Arvados and SBG using P-00000000-0001. All behaving normally. |
golharam
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New abstract methods added to
Platformbase classcopy_file()— Copy a single file between projectsget_current_user()— Return authenticated user profile as a standardized dict_find_or_create_path()— SevenBridgesFix: Root path
'/'now returnsNoneinstead of trying to create a folder with an empty-string name. Changed from stripping the leading empty string to filtering out all empty strings from the split.Unit tests (
test_sevenbridges_platform.py):test_find_or_create_path_root_returns_noneIntegration tests (
test_find_or_create_path.py):test_root_path_returns_nonetest_creates_single_foldertest_creates_nested_pathtest_existing_folder_is_reusedtest_partially_existing_pathupload_file()— SevenBridgesFix:
dest_folder='/'now correctly uploads to root. After stripping the trailing slash, an empty string skips_find_or_create_pathand setsparent_folder_id = None. Also safely handles_find_or_create_pathreturningNone.Unit tests (
test_sevenbridges_platform.py):test_upload_file_to_root—dest_folder=None→ project roottest_upload_file_to_subfolder— creates path, uploads into ittest_upload_file_with_destination_filename— renames on uploadtest_upload_file_skips_existing_when_no_overwrite— returns existing idtest_upload_file_overwrites_existing— uploads despite existing filetest_upload_file_returns_none_on_failure— failed status →Nonetest_upload_file_strips_trailing_slash—/inputs/→/inputstest_upload_file_dest_folder_just_slash—'/'→ roottest_upload_file_extracts_basename—/home/user/file.txt→file.txtIntegration tests (
test_upload_file_integration.py):test_upload_to_roottest_upload_to_subfoldertest_upload_to_nested_subfoldertest_upload_with_destination_filenametest_upload_no_overwrite_returns_existing_idtest_upload_with_overwritetest_upload_to_root_via_slashget_files()— Arvados bugfixFix: Filter logic was broken — independent
ifblocks caused duplicate results, and a misplacedelse(attached to thesuffixcheck, not the overall block) appended unfiltered files. Rewrote as skip-on-mismatch (continue) pattern. Additionally, it now returns the fully nested subdir path as opposed to just the collection name with the file name appended (correctly can return /inputs/run1/sample1/file1.fq.gz as opposed to the incorrect /inputs/file1.fq.gz previously).copy_file()— All platformsfile_pathprovided, usesfile.copy()orfile.copy_to_folder()Collection.copy()_list_files_in_folder()— SevenBridgesFix: When
_find_or_create_pathreturnsNone(root path), falls back toself.api.files.query(project=project).all()instead of failing withAttributeErroronNone.id.get_current_user()— All platformsself.api.users.me()→ maps to standard dictself.api.users().current().execute()→ maps fieldsGET /api/v1/auth/mewith Bearer token; parsesUserPublicresponse directly (no"data"wrapper); safely handles nullfull_name