very small numbers get written into URLs with error-raising scientific notation
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 29
- Forks
- 32
- Avg merge
- 19h 6m
- Merged PRs (30d)
- 1
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"]}
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.
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.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100