Skip to content

Commit e4ed3d2

Browse files
authored
Merge branch 'main' into ESA_euclid_EUCLIDMNGT-1275_LE3_search_capability
2 parents 8c96881 + f1713f8 commit e4ed3d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+2222
-790
lines changed

.github/workflows/ci_crontests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
with:
4141
fetch-depth: 0
4242
- name: Set up Python
43-
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
43+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
4444
with:
4545
python-version: ${{ matrix.python }}
4646
- name: Install Python dependencies

.github/workflows/ci_devtests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
with:
4949
fetch-depth: 0
5050
- name: Set up Python
51-
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
51+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
5252
with:
5353
python-version: ${{ matrix.python }}
5454
- name: Install Python dependencies
@@ -57,6 +57,6 @@ jobs:
5757
run: tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }}
5858
- name: Upload coverage to codecov
5959
if: contains(matrix.toxenv,'-cov')
60-
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
60+
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2
6161
with:
6262
file: ./coverage.xml

.github/workflows/ci_online_crontests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
with:
4343
fetch-depth: 0
4444
- name: Set up Python
45-
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
45+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
4646
with:
4747
python-version: ${{ matrix.python }}
4848
- name: Install Python dependencies

.github/workflows/ci_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
with:
6868
fetch-depth: 0
6969
- name: Set up Python
70-
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
70+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
7171
with:
7272
python-version: ${{ matrix.python }}
7373
- name: Install Python dependencies
@@ -76,7 +76,7 @@ jobs:
7676
run: tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }}
7777
- name: Upload coverage to codecov
7878
if: contains(matrix.toxenv,'-cov')
79-
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
79+
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2
8080
with:
8181
file: ./coverage.xml
8282

@@ -89,7 +89,7 @@ jobs:
8989
with:
9090
fetch-depth: 0
9191
- name: Set up Python
92-
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
92+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
9393
with:
9494
python-version: "3.9"
9595
- name: Run egg_info

ah_bootstrap.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
import pkg_resources
5454

5555
from setuptools import Distribution
56-
from setuptools.package_index import PackageIndex
5756

5857
# This is the minimum Python version required for astropy-helpers
5958
__minimum_python_version__ = (3, 5)
@@ -416,12 +415,6 @@ def get_local_directory_dist(self):
416415
'The requested path {0!r} for importing {1} does not '
417416
'exist, or does not contain a copy of the {1} '
418417
'package.'.format(self.path, PACKAGE_NAME))
419-
elif self.auto_upgrade and not self.is_submodule:
420-
# A version of astropy-helpers was found on the available path, but
421-
# check to see if a bugfix release is available on PyPI
422-
upgrade = self._do_upgrade(dist)
423-
if upgrade is not None:
424-
dist = upgrade
425418

426419
return dist
427420

@@ -448,13 +441,6 @@ def get_local_file_dist(self):
448441
'{2}'.format(PACKAGE_NAME, self.path, str(e)))
449442
dist = None
450443

451-
if dist is not None and self.auto_upgrade:
452-
# A version of astropy-helpers was found on the available path, but
453-
# check to see if a bugfix release is available on PyPI
454-
upgrade = self._do_upgrade(dist)
455-
if upgrade is not None:
456-
dist = upgrade
457-
458444
return dist
459445

460446
def get_index_dist(self):
@@ -588,21 +574,6 @@ def get_option_dict(self, command_name):
588574

589575
raise Exception(msg.format(DIST_NAME, source, repr(e)))
590576

591-
def _do_upgrade(self, dist):
592-
# Build up a requirement for a higher bugfix release but a lower minor
593-
# release (so API compatibility is guaranteed)
594-
next_version = _next_version(dist.parsed_version)
595-
596-
req = pkg_resources.Requirement.parse(
597-
'{0}>{1},<{2}'.format(DIST_NAME, dist.version, next_version))
598-
599-
package_index = PackageIndex(index_url=self.index_url)
600-
601-
upgrade = package_index.obtain(req)
602-
603-
if upgrade is not None:
604-
return self._do_download(version=upgrade.version)
605-
606577
def _check_submodule(self):
607578
"""
608579
Check if the given path is a git submodule.

astroquery/alma/core.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,11 @@ def query_async(self, payload, *, public=True, science=True,
594594
if science is not None:
595595
payload['science_observation'] = science
596596
if public is not None:
597+
if 'public_data' in kwargs:
598+
warnings.warn("Both public and public_data are set. "
599+
"The ``public`` kwarg takes precedence. "
600+
"If you want ``public_data`` to be respected, "
601+
"set ``public=None``.")
597602
payload['public_data'] = public
598603

599604
query = _gen_sql(payload)

astroquery/alma/tests/test_alma_utils.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,19 @@ def test_footprint_to_reg_pointing(pointing_footprint_str=pointing_footprint_str
9797
assert actual_reg.center.ra == reg_output[0].center.ra
9898
assert actual_reg.center.dec == reg_output[0].center.dec
9999
assert actual_reg.radius == reg_output[0].radius
100+
101+
102+
@pytest.mark.skipif(not HAS_REGIONS, reason="regions is required")
103+
def test_footprint_to_reg_plot(pointing_footprint_str=pointing_footprint_str):
104+
reg_output = utils.footprint_to_reg(pointing_footprint_str)
105+
106+
from astropy.wcs import WCS
107+
ww = WCS(naxis=2)
108+
ww.wcs.crpix = [250.0, 250.0]
109+
ww.wcs.cdelt = [-7.500000005754e-05, 7.500000005754e-05]
110+
ww.wcs.ctype = ['RA---SIN', 'DEC--SIN']
111+
ww.wcs.crval = [reg_output[0].center.ra.value, reg_output[0].center.dec.value]
112+
113+
pix_region = reg_output[0].to_pixel(ww)
114+
artist = pix_region.as_artist()
115+
assert artist is not None

astroquery/alma/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ def footprint_to_reg(footprint):
6060
reglist = []
6161

6262
meta = {'source': 1, 'include': 1, 'fixed': 0, 'text': ''}
63-
visual = {'color': 'green', 'dash': '0', 'dashlist': '8 3',
64-
'font': '"helvetica 10 normal roman"', 'width': '1'}
63+
visual = {'color': 'green', 'linestyle': 'solid', 'linewidth': 1.0}
6564

6665
entries = footprint.split()
6766
if entries[0] == 'Circle':

astroquery/esa/euclid/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ class Conf(_config.ConfigNamespace):
1515
Configuration parameters for `astroquery.esa.euclid`.
1616
"""
1717

18-
URL_BASE = _config.ConfigItem('https://eas.esac.esa.int/', 'Euclid base URL')
19-
20-
EUCLID_TAP_SERVER = _config.ConfigItem('https://easidr.esac.esa.int/tap-server/tap', 'Euclid TAP Server')
21-
EUCLID_DATALINK_SERVER = _config.ConfigItem("https://easidr.esac.esa.int/sas-dd/data?", "Euclid DataLink Server")
22-
EUCLID_CUTOUT_SERVER = _config.ConfigItem("https://easidr.esac.esa.int/sas-cutout/cutout?", "Euclid Cutout Server")
23-
2418
ROW_LIMIT = _config.ConfigItem(50,
2519
"Number of rows to return from database query (set to -1 for unlimited).")
2620

astroquery/gaia/core.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def logout(self, *, verbose=False):
168168
except HTTPError:
169169
log.error("Error logging out data server")
170170

171-
@deprecated_renamed_argument("output_file", None, since="0.4.8")
171+
@deprecated_renamed_argument(("output_file", "band"), (None, None), since=("0.4.8", "0.4.11"))
172172
def load_data(self, ids, *, data_release=None, data_structure='INDIVIDUAL', retrieval_type="ALL",
173173
linking_parameter='SOURCE_ID', valid_data=False, band=None, avoid_datatype_check=False,
174174
format="votable", dump_to_file=False, overwrite_output_file=False, verbose=False,
@@ -212,10 +212,6 @@ def load_data(self, ids, *, data_release=None, data_structure='INDIVIDUAL', retr
212212
In order to retrieve only valid data (data rows where flux is not null and/or the
213213
rejected_by_photometry flag is set to False) this request parameter should be included
214214
with valid_data=True.
215-
band : str, optional, default None, valid values: G, BP, RP
216-
By default, the epoch photometry service returns all the
217-
available photometry bands for the requested source.
218-
This parameter allows to filter the output lightcurve by its band.
219215
avoid_datatype_check: boolean, optional, default False.
220216
By default, this value will be set to False. If it is set to 'true'
221217
the Datalink items tags will not be checked.
@@ -281,11 +277,6 @@ def load_data(self, ids, *, data_release=None, data_structure='INDIVIDUAL', retr
281277
elif valid_data:
282278
params_dict['VALID_DATA'] = "true"
283279

284-
if band is not None:
285-
if band != 'G' and band != 'BP' and band != 'RP':
286-
raise ValueError(f"Invalid band value '{band}' (Valid values: 'G', 'BP' and 'RP)")
287-
else:
288-
params_dict['BAND'] = band
289280
if isinstance(ids, str):
290281
ids_arg = ids
291282
else:

0 commit comments

Comments
 (0)