From bf6f49d2ab36561e6206ec8e4176f588aed27559 Mon Sep 17 00:00:00 2001 From: "Juan M. Carmona Loaiza" Date: Tue, 9 Dec 2025 11:14:18 +0100 Subject: [PATCH 1/3] Add docs note about authenticated queries --- docs/eso/eso.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/eso/eso.rst b/docs/eso/eso.rst index e376723f37..1ede6bed60 100644 --- a/docs/eso/eso.rst +++ b/docs/eso/eso.rst @@ -103,6 +103,27 @@ interaction with the ESO archive. INFO: Downloading file 1/1 https://dataportal.eso.org/dataPortal/file/ADP.2023-03-02T01:01:24.355 ERROR: Access denied to https://dataportal.eso.org/dataPortal/file/ADP.2023-03-02T01:01:24.355 +.. note:: + Even after logging with `Eso.login()`, TAP queries are not authenticated by default. To issue + authenticated queries, the keyword argument `authenticated` must be set to `True` explicitly in + the query functions. For example: + + .. doctest-skip:: + + eso = Eso() + eso.ROW_LIMIT = None + eso.login(username="ICONDOR") + + # Some files are missing without `authenticated=True` + files_tbl = eso.query_instrument("nirps") + + # Get all files to which the authenticated user has access + files_tbl = eso.query_instrument("nirps", authenticated=True) + + Review your queries carefully and update them accordingly to ensure you are retrieving + all your expected results. If you don't stricly need to run an authenticated query, use + the default `authenticated=False`, since it will retrieve your results much faster. + Automatic password ------------------ From a48f75de2d7c6d51cdc49822ee25b9a38b720a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Tue, 9 Dec 2025 11:59:00 -0800 Subject: [PATCH 2/3] DOC: fixing sphinx warnings for ESO note --- docs/eso/eso.rst | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/eso/eso.rst b/docs/eso/eso.rst index 1ede6bed60..ecde3dcba5 100644 --- a/docs/eso/eso.rst +++ b/docs/eso/eso.rst @@ -104,25 +104,25 @@ interaction with the ESO archive. ERROR: Access denied to https://dataportal.eso.org/dataPortal/file/ADP.2023-03-02T01:01:24.355 .. note:: - Even after logging with `Eso.login()`, TAP queries are not authenticated by default. To issue - authenticated queries, the keyword argument `authenticated` must be set to `True` explicitly in + Even after logging with `~astroquery.eso.EsoClass.login()`, TAP queries are not authenticated by default. To issue + authenticated queries, the keyword argument ``authenticated`` must be set to `True` explicitly in the query functions. For example: .. doctest-skip:: - eso = Eso() - eso.ROW_LIMIT = None - eso.login(username="ICONDOR") - - # Some files are missing without `authenticated=True` - files_tbl = eso.query_instrument("nirps") - - # Get all files to which the authenticated user has access - files_tbl = eso.query_instrument("nirps", authenticated=True) + >>> eso = Eso() + >>> eso.ROW_LIMIT = None + >>> eso.login(username="ICONDOR") + >>> + >>> # Some files are missing without `authenticated=True` + >>> files_tbl = eso.query_instrument("nirps") + >>> + >>> # Get all files to which the authenticated user has access + >>> files_tbl = eso.query_instrument("nirps", authenticated=True) Review your queries carefully and update them accordingly to ensure you are retrieving - all your expected results. If you don't stricly need to run an authenticated query, use - the default `authenticated=False`, since it will retrieve your results much faster. + all your expected results. If you don't stricly need to run an authenticated query, use + the default ``authenticated=False``, since it will retrieve your results much faster. Automatic password ------------------ From e5f62ad724da6c6a5c8003b3b961987ac7188e87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Tue, 9 Dec 2025 17:12:25 -0800 Subject: [PATCH 3/3] DOC: rolling back to use code-block as doctest-skip doesn't work within a note --- docs/eso/eso.rst | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/docs/eso/eso.rst b/docs/eso/eso.rst index ecde3dcba5..bda39aa253 100644 --- a/docs/eso/eso.rst +++ b/docs/eso/eso.rst @@ -103,27 +103,33 @@ interaction with the ESO archive. INFO: Downloading file 1/1 https://dataportal.eso.org/dataPortal/file/ADP.2023-03-02T01:01:24.355 ERROR: Access denied to https://dataportal.eso.org/dataPortal/file/ADP.2023-03-02T01:01:24.355 + +.. The doctest-skip directive is not working for pytest within the note directive, thus + we leave the snippet below as a code-block + .. note:: + Even after logging with `~astroquery.eso.EsoClass.login()`, TAP queries are not authenticated by default. To issue - authenticated queries, the keyword argument ``authenticated`` must be set to `True` explicitly in - the query functions. For example: + authenticated queries, the keyword argument ``authenticated`` must be set to `True` explicitly in the query functions. + For example: - .. doctest-skip:: + .. code-block:: python - >>> eso = Eso() - >>> eso.ROW_LIMIT = None - >>> eso.login(username="ICONDOR") - >>> - >>> # Some files are missing without `authenticated=True` - >>> files_tbl = eso.query_instrument("nirps") - >>> - >>> # Get all files to which the authenticated user has access - >>> files_tbl = eso.query_instrument("nirps", authenticated=True) + eso = Eso() + eso.ROW_LIMIT = None + eso.login(username="ICONDOR") + + # Some files are missing without `authenticated=True` + files_tbl = eso.query_instrument("nirps") + + # Get all files to which the authenticated user has access + files_tbl = eso.query_instrument("nirps", authenticated=True) Review your queries carefully and update them accordingly to ensure you are retrieving all your expected results. If you don't stricly need to run an authenticated query, use the default ``authenticated=False``, since it will retrieve your results much faster. + Automatic password ------------------