-
Notifications
You must be signed in to change notification settings - Fork 1
Develop query asm #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop-query_asm
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,11 +5,13 @@ on: | |
| push: | ||
| branches: | ||
| - main | ||
| - develop | ||
| tags: | ||
| - '*' | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - develop | ||
|
Comment on lines
+8
to
+14
|
||
| schedule: | ||
| # run every Monday at 5am UTC | ||
| - cron: '0 5 * * 1' | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,45 @@ | ||||||||||||||||||
| name: Sync Fork | ||||||||||||||||||
| run-name: Sync Fork | ||||||||||||||||||
| on: | ||||||||||||||||||
| schedule: | ||||||||||||||||||
| - cron: '58 23 * * *' # run every day - two minutes to midnight | ||||||||||||||||||
| workflow_dispatch: # to enable manual runs of the workflow | ||||||||||||||||||
|
|
||||||||||||||||||
| jobs: | ||||||||||||||||||
| Get-Timestamp: | ||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||
| steps: | ||||||||||||||||||
| - run: date | ||||||||||||||||||
|
|
||||||||||||||||||
| Sync-With-Upstream: | ||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||
| steps: | ||||||||||||||||||
| - run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | ||||||||||||||||||
| - run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub" | ||||||||||||||||||
| - run: echo "Running on branch ${{ github.ref }}, repository ${{ github.repository }}." | ||||||||||||||||||
| - name: Check out repository code | ||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||
| with: | ||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||
| - run: echo "The ${{ github.repository }} repository has been cloned to the runner." | ||||||||||||||||||
| - name: List files in the repository | ||||||||||||||||||
| run: | | ||||||||||||||||||
| ls ${{ github.workspace }} | ||||||||||||||||||
| - name: Sync repository with upstream | ||||||||||||||||||
| run: | | ||||||||||||||||||
| cd ${{ github.workspace }} | ||||||||||||||||||
| git config --global user.email "jcarmona@eso.org" | ||||||||||||||||||
|
Comment on lines
+29
to
+31
|
||||||||||||||||||
| run: | | |
| cd ${{ github.workspace }} | |
| git config --global user.email "jcarmona@eso.org" | |
| env: | |
| GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }} | |
| run: | | |
| cd ${{ github.workspace }} | |
| git config --global user.email "${GIT_USER_EMAIL}" |
Copilot
AI
Feb 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entire workflow file appears to be specific to maintaining a fork synchronization with the upstream astropy/astroquery repository. This is not mentioned in the PR description and is not related to the ASM query functionality. This should either be in a separate PR or the PR description should be updated to explain why fork synchronization infrastructure is being added.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -38,7 +38,7 @@ | |||||
| from ..utils import schema | ||||||
| from .utils import _UserParams, raise_if_coords_not_valid, _reorder_columns, \ | ||||||
| _raise_if_has_deprecated_keys, _build_adql_string, \ | ||||||
| DEFAULT_LEAD_COLS_PHASE3, DEFAULT_LEAD_COLS_RAW | ||||||
| _split_str_as_list_of_str, DEFAULT_LEAD_COLS_PHASE3, DEFAULT_LEAD_COLS_RAW | ||||||
|
|
||||||
|
|
||||||
| __all__ = ['Eso', 'EsoClass'] | ||||||
|
|
@@ -71,6 +71,7 @@ class _EsoNames: | |||||
| phase3_table = "ivoa.ObsCore" | ||||||
| raw_instruments_column = "instrument" | ||||||
| phase3_surveys_column = "obs_collection" | ||||||
| asm_schema = "asm" | ||||||
|
|
||||||
| @staticmethod | ||||||
| def ist_table(instrument_name): | ||||||
|
|
@@ -79,6 +80,13 @@ def ist_table(instrument_name): | |||||
| """ | ||||||
| return f"ist.{instrument_name}" | ||||||
|
|
||||||
| @staticmethod | ||||||
| def asm_table(asm_name): | ||||||
| """ | ||||||
| Returns the name of the ASM table | ||||||
| """ | ||||||
| return f"{_EsoNames.asm_schema}.{asm_name}" | ||||||
|
|
||||||
| apex_quicklooks_table = ist_table.__func__("apex_quicklooks") | ||||||
| apex_quicklooks_pid_column = "project_id" | ||||||
|
|
||||||
|
|
@@ -348,6 +356,28 @@ def list_instruments(self, cache=True) -> List[str]: | |||||
|
|
||||||
| return l_res | ||||||
|
|
||||||
| @unlimited_maxrec | ||||||
| @deprecated_renamed_argument('cache', None, since='0.4.12') | ||||||
| def list_asm(self, cache=True) -> List[str]: | ||||||
|
||||||
| def list_asm(self, cache=True) -> List[str]: | |
| def list_asm(self, *, cache=True) -> List[str]: |
Copilot
AI
Feb 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docstring has incorrect structure. The 'cache' parameter should be documented in a 'Parameters' section, not mixed with 'Returns'. The current format will not render properly in documentation tools like Sphinx.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be probably rewritten as:
return [x.split(".", 1)[1] for x in res]
assuming that res is an iterable.
Copilot
AI
Feb 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The query_asm method lacks several parameters present in query_instrument (cone_ra, cone_dec, cone_radius, order_by, order_by_desc) but documents order_by and order_by_desc as being available through **kwargs. While cone search might not be applicable for ASM data, the inconsistency in how parameters are handled (some explicit vs some in **kwargs) makes the API less clear. Consider making order_by and order_by_desc explicit parameters like in query_instrument for consistency and better API clarity.
Copilot
AI
Feb 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When help=True is used in query_asm, the function calls list_column with include_description=True to show descriptions. However, in _query_on_allowed_values (line 441), when print_help is True, it calls list_column WITHOUT include_description, defaulting to False. This creates an inconsistency: query_asm(help=True) shows descriptions, but query_instrument(help=True) does not. For consistency across the API, both should behave the same way.
| self.list_column(table_name, include_description=True) | |
| self.list_column(table_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of a 'develop' branch to CI workflow triggers is not mentioned in the PR description, which only describes ASM query functionality. This appears to be an infrastructure change unrelated to the main purpose of this PR and should either be in a separate PR or explained in the PR description.