Skip to content

fix: accession re-run fails when output directory matches study ID; bump version to 0.0.17#113

Merged
ypriverol merged 2 commits into
devfrom
copilot/update-dev-from-master
Jun 8, 2026
Merged

fix: accession re-run fails when output directory matches study ID; bump version to 0.0.17#113
ypriverol merged 2 commits into
devfrom
copilot/update-dev-from-master

Conversation

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

On a second run of pridepy download-pdc-files -a PDC000714 -o ./, the command fails with Invalid value: Only CSV accession files are supported: PDC000714. This happens because the first run creates ./PDC000714/ as an output subdirectory, and Path("PDC000714").exists() then returns True — causing the accession string to be misinterpreted as a non-CSV file path.

Changes

  • pridepy/pdc/client.py — Replace source_path.exists() with source_path.is_file() in both parse_accessions and parse_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 test test_accession_not_confused_with_same_named_directory: creates a PDC000714/ directory in a temp working dir and asserts both functions still resolve the string as an accession ID.
  • pyproject.toml — Bump version 0.0.160.0.17.

@ypriverol ypriverol marked this pull request as ready for review June 8, 2026 08:40
@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@ypriverol ypriverol merged commit d5fc49a into dev Jun 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants