iedb.mhc.delete() and iedb.tcell.delete() download the IEDB export before deleting it
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
Research direction
Start with the delete() and local_path() functions in pepdata/iedb/mhc.py and pepdata/iedb/tcell.py, then compare delete() in pepdata/iedb/alleles.py. Add a test for deleting when the file is not cached, verifying that no network request is made and deletion is a no-op; run the relevant tests. Done when all three functions behave consistently for missing files.
Written by the indexing model from the issue text.
Description
Problem
pepdata.iedb.mhc.delete() and pepdata.iedb.tcell.delete() download the IEDB export if it isn't cached, and then delete it:
# pepdata/iedb/mhc.py:35-49 (tcell.py:46-60 is the same)
def local_path(auto_download=True):
path = cache.local_path(...)
if not os.path.exists(path):
if auto_download:
return download()
...
def delete():
os.remove(local_path())
delete() calls local_path() with its default auto_download=True. On a machine without the cached file, a call meant to clean up therefore fetches the full MHC ligand or T-cell export from IEDB and then removes it.
iedb.alleles.delete() (alleles.py:32-38) behaves differently again. It skips the download but raises FileNotFoundError when the XML isn't cached. So the three delete() functions in one package don't agree on what a missing file means.
Evidence
Read at a5dffe3:
pepdata/iedb/mhc.py:35-49pepdata/iedb/tcell.py:46-60pepdata/iedb/alleles.py:32-38
Open PR #58 doesn't touch these functions.
Suggested fix
Have every delete() resolve the path with cache.local_path(...), which doesn't download, and remove the file inside contextlib.suppress(FileNotFoundError), so a missing file is a no-op in all three modules. Add a test that delete() with no cached file makes no network request.
- Dominant language
- Python
- Stars
- 58
- Forks
- 16
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openvax/pepdata
-
PeptideVectorizer fails with the default normalize_row=True on current scikit-learnPossibly taken @iskandr claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
huggingface/deep-rl-class#723 ·
-
[tool] bug: Qwen3 XML tool parser raises on `...` argument values (Ellipsis is not JSON serializable)Possibly taken @super-yuki claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
verl-project/verl#8559 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
TencentCloud/octop-harness#228 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
google/osv-scalibr#2585 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
NousResearch/hermes-agent#149323 ·
Maintainers usually reply within 1 day