fix: accession re-run fails when output directory matches study ID; bump version to 0.0.17#113
Merged
Merged
Conversation
Copilot created this pull request from a session on behalf of
ypriverol
June 8, 2026 08:39
View session
ypriverol
approved these changes
Jun 8, 2026
Contributor
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
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.
On a second run of
pridepy download-pdc-files -a PDC000714 -o ./, the command fails withInvalid value: Only CSV accession files are supported: PDC000714. This happens because the first run creates./PDC000714/as an output subdirectory, andPath("PDC000714").exists()then returnsTrue— causing the accession string to be misinterpreted as a non-CSV file path.Changes
pridepy/pdc/client.py— Replacesource_path.exists()withsource_path.is_file()in bothparse_accessionsandparse_download_requests. A directory is not a file, so the check now correctly falls through to plain-accession parsing.pridepy/tests/test_pdc_client.py— Add regression testtest_accession_not_confused_with_same_named_directory: creates aPDC000714/directory in a temp working dir and asserts both functions still resolve the string as an accession ID.pyproject.toml— Bump version0.0.16→0.0.17.