Skip to content

Commit

Permalink
freeze rounding in heasarc query, adapted data files
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyrss committed Mar 30, 2022
1 parent e6cc721 commit 8802f84
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion astroquery/heasarc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def query_region_async(self, position: Union[coordinates.SkyCoord, str],
# Generate the request
request_payload = self._args_to_payload(
mission=mission,
entry="{:10f},{:.10f}".format(c.ra.degree, c.dec.degree),
entry=f"{c.ra.degree:.10f},{c.dec.degree:.10f}",
radius=u.Quantity(radius),
**kwargs
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 6 additions & 1 deletion astroquery/heasarc/tests/parametrization.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import json
import os
import glob
import hashlib
Expand Down Expand Up @@ -40,7 +41,11 @@ def fileid_for_request(url, params):

def filename_for_request(url, params, output=False):
fileid = fileid_for_request(url, params)
return data_path(fileid, output=output)

filename = data_path(fileid, output=output)
log.debug(f'constructed filename {filename} for request: ' + json.dumps(dict(url=url, params=params), sort_keys=True, indent=4))

return filename


def get_mockreturn(session, method, url, params=None, timeout=10, **kwargs):
Expand Down
1 change: 1 addition & 0 deletions astroquery/heasarc/tests/test_heasarc_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def test_custom_args(self):
time="2020-09-01 .. 2020-12-01",
resultmax=10,
good_isgri=">1000",
cache=False
)

def test_filter_custom_args(self):
Expand Down
1 change: 1 addition & 0 deletions astroquery/heasarc/tests/test_heasarc_remote_isdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def test_custom_args(self):
time="2020-09-01 .. 2020-12-01",
resultmax=10,
good_isgri=">1000",
cache=False
)

def test_filter_custom_args(self):
Expand Down

0 comments on commit 8802f84

Please sign in to comment.