In batch search, spaces are converted to "%20" and yield no match
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
Research direction
Start with the chem.search entry point and run the provided batch-search reproduction for "potassium bicarbonate", then compare it with the working equals search. Trace where the batch query becomes "potassium%20bicarbonate"; done means batch search preserves the intended query value and returns the matching chemical.
Written by the indexing model from the issue text.
Description
Minimal reproducible example:
import ctxpy
chem = ctxpy.Chemical()
batch search fails, with search value potassium%20bicarbonate
>>> chem.search(by="batch", query=["potassium bicarbonate"])
[{'dtxsid': None, 'dtxcid': None, 'casrn': None, 'smiles': None, 'preferredName': None, 'searchName': None, 'searchValue': 'potassium%20bicarbonate', 'rank': None, 'hasStructureImage': None, 'isMarkush': None, 'searchMsgs': [...], 'suggestions': [...], 'isDuplicate': False}]
exact search works
>>> chem.search(by="equals", query="potassium bicarbonate")
[{'hasStructureImage': 1, 'smiles': '[K+].OC([O-])=O', 'isMarkush': False, 'dtxsid': 'DTXSID0021177', 'dtxcid': 'DTXCID201177', 'casrn': '298-14-6', 'preferredName': 'Potassium bicarbonate', 'searchName': 'Approved Name', 'searchValue': 'Potassium bicarbonate', 'rank': 9}]
- Dominant language
- Python
- Stars
- 20
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Contributor guide
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 USEPA/ctx-python
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
USEPA/ctx-python#9 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
USEPA/ctx-python#7 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
USEPA/ctx-python#6 · 1 comment ·
All issues in USEPA/ctx-python
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
zostera/django-bootstrap4#894 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3276 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zilliztech/memsearch#759 ·