very small numbers get written into URLs with error-raising scientific notation
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start at cmr.queries.Query._build_url() and reproduce the issue with the GranuleQuery example using a very small coordinate. Trace how the point value is converted into the URL, then verify that the generated point avoids error-raising scientific notation and is accepted by CMR.
Written by the indexing model from the issue text.
Description
A very small number, for instance a coordinate very close to the equator, can get written to string as scientific notation when cmr.queries.Query._build_url() is called. For example:
from cmr import GranuleQuery
q = GranuleQuery().short_name("FOO").point(42, 0.00001)
q._build_url()
'https://cmr.earthdata.nasa.gov/search/granules.json?short_name=FOO&point[]=42.0,1e-05'
To this request, CMR responds:
{"errors":["[42.0,1e-05] is not a valid URL encoded point"]}
- Dominant language
- Python
- Stars
- 29
- Forks
- 32
- Avg merge
- 19h 6m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
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 nasa/python_cmr
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
nasa/python_cmr#104 ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 38/100
nasa/python_cmr#95 · 1 comment ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 45/100
nasa/python_cmr#94 ·
-
chore
Difficulty 3/5 1-2 days Newbie friendliness 45/100
nasa/python_cmr#93 ·
-
enhancement
nasa/python_cmr#92 · 1 assignee ·
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100