From 1bcb5d7ba2fe644cccb7e0e71b2a7f8ffcbdf409 Mon Sep 17 00:00:00 2001 From: havok2063 Date: Wed, 1 Oct 2025 16:21:56 -0400 Subject: [PATCH 1/5] setting dynamic db astra schema change --- python/valis/db/db.py | 23 ++++++++++++++++++++--- python/valis/db/queries.py | 14 ++++++++++---- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/python/valis/db/db.py b/python/valis/db/db.py index d91cb56..6bd8b7b 100644 --- a/python/valis/db/db.py +++ b/python/valis/db/db.py @@ -10,6 +10,7 @@ from sdssdb.peewee.sdss5db import database as pdb from sdssdb.sqlalchemy.sdss5db import database as sdb +from valis.utils.versions import get_software_tag # To make Peewee async-compatible, we need to hack the peewee connection state # See FastAPI/Peewee docs at https://fastapi.tiangolo.com/how-to/sql-databases-peewee/ @@ -69,11 +70,14 @@ def connect_db(db, orm: str = 'peewee'): return db -async def get_pw_db(db_state=Depends(reset_db_state)): - """ Dependency to connect a database with peewee """ +async def get_pw_db(db_state=Depends(reset_db_state), release: str | None = None): + """ Dependency to connect a database with peewee - from valis.main import settings + dependency inputs act as query parameters, release input comes from the + release qp dependency in routes/base.py + """ + from valis.main import settings # connect to the db, yield None since we don't need the db in peewee if settings.db_reset: db = connect_db(pdb, orm='peewee') @@ -81,6 +85,19 @@ async def get_pw_db(db_state=Depends(reset_db_state)): async with asyncio.Lock(): db = connect_db(pdb, orm='peewee') + # set the correct astra schema if needed + try: + vastra = get_software_tag(release, 'v_astra') + except AttributeError: + # case when release is None or invalid + # uses default set astra schema defined in sdssdb + pass + else: + # for dr19 or ipl3 set schema to 0.5.0 ; ipl4=0.8.0 + vastra = "0.5.0" if vastra in ("0.5.0", "0.6.0") else vastra + schema = f"astra_{vastra.replace('.', '')}" + pdb.set_astra_schema(schema) + try: yield db finally: diff --git a/python/valis/db/queries.py b/python/valis/db/queries.py index d6a2e98..f88efe9 100644 --- a/python/valis/db/queries.py +++ b/python/valis/db/queries.py @@ -4,11 +4,10 @@ # all resuable queries go here -from contextlib import contextmanager import itertools import packaging import uuid -from typing import Sequence, Union, Generator +from typing import Union, Generator from enum import Enum import astropy.units as u @@ -73,6 +72,10 @@ def append_pipes(query: peewee.ModelSelect, table: str = 'stacked', if table not in {'stacked', 'flat'}: raise ValueError('table must be either "stacked" or "flat"') + # cannot create temp table if query is None + if query is None: + return query + # Run initial query as a temporary table. temp = create_temporary_table(query, indices=['sdss_id']) @@ -412,6 +415,7 @@ def get_targets_obs(release: str, obs: str, spectrograph: str) -> peewee.ModelSe # test sdss ids # 23326 - boss/astra +# 25739 in astra 0.8.0 but not 0.5.0 sources # 3350466 - apogee/astra # 54392544 - all true # 10 - all false @@ -499,9 +503,11 @@ def get_apogee_target(sdss_id: int, release: str, fields: list = None): def get_astra_target(sdss_id: int, release: str, fields: list = None): """ temporary placeholder for astra """ + # check the astra version against the assigned schema vastra = get_software_tag(release, 'v_astra') - if not vastra or vastra not in ("0.5.0", "0.6.0"): - print('astra only supports DR19 / IPL3 = version 0.5.0, 0.6.0') + vastra = "0.5.0" if vastra in ("0.5.0", "0.6.0") else vastra + if vastra.replace('.', '') not in astra.Source._meta.schema: + print(f"warning: astra version for current release {release} does not match assigned astra schema {astra.Source._meta.schema}") return None # check fields From 6a0352aa1a8e167dc047fb727fbde13939e073c3 Mon Sep 17 00:00:00 2001 From: havok2063 Date: Wed, 1 Oct 2025 16:55:32 -0400 Subject: [PATCH 2/5] switching the apogee target pipeline query to direct query apogeedrp.star table --- python/valis/db/models.py | 6 ++-- python/valis/db/queries.py | 56 ++++++++++++++++++++++++++------------ 2 files changed, 42 insertions(+), 20 deletions(-) diff --git a/python/valis/db/models.py b/python/valis/db/models.py index 35cadf1..b4c2cef 100644 --- a/python/valis/db/models.py +++ b/python/valis/db/models.py @@ -155,7 +155,7 @@ class AstraSource(PeeweeBase): gaia_dr3_source_id: Optional[int] = None tic_v8_id: Optional[int] = None healpix: int = None - n_associated: int = None + n_associated: Optional[int] = None n_neighborhood: int = None sdss4_apogee_target1_flags: int = None sdss4_apogee_target2_flags: int = None @@ -170,8 +170,8 @@ class AstraSource(PeeweeBase): n_apogee_visits: Optional[int] = None l: float = None b: float = None - ebv: float = None - e_ebv: float = None + ebv: Optional[float] = None + e_ebv: Optional[float] = None gaia_v_rad: FloatNaN[float] = None gaia_e_v_rad: FloatNaN[float] = None g_mag: FloatNaN[float] = None diff --git a/python/valis/db/queries.py b/python/valis/db/queries.py index f88efe9..b1f9326 100644 --- a/python/valis/db/queries.py +++ b/python/valis/db/queries.py @@ -468,41 +468,63 @@ def get_boss_target(sdss_id: int, release: str, fields: list = None, return query -def get_apogee_target(sdss_id: int, release: str, fields: list = None): - """ temporary placeholder for apogee """ +def get_apogee_target(sdss_id: int, release: str, fields: list = None) -> peewee.ModelSelect: + """Get the Apogee target metadata for an sdss_id + + Retrieves the apogee pipeline data from the apogee_drp.star table + for the given sdss_id and data release. + + Parameters + ---------- + sdss_id : int + the input sdss_id + release : str + the data release to look up + fields : list, optional + a list of fields to retrieve from the database, by default None + + Returns + ------- + peewee.ModelSelect + the output query + """ # get the relevant software tag apred = get_software_tag(release, 'apred_vers') # create apogee version conditions if isinstance(apred, list): vercond = apo.Star.apred_vers.in_(apred) - avsver = astra.ApogeeVisitSpectrum.apred.in_(apred) else: vercond = apo.Star.apred_vers == apred - avsver = astra.ApogeeVisitSpectrum.apred == apred # check fields fields = fields or [apo.Star] if fields and isinstance(fields[0], str): fields = (getattr(apo.Star, i) for i in fields) - # get the astra source for the sdss_id - s = get_astra_target(sdss_id, release) - if not s: - return - - # get the astra apogee visit spectrum - a = s.first().apogee_visit_spectrum.where(avsver).first() - if not a: - return - # get the apogee star data - return apo.Star.select(*fields).where(apo.Star.pk == a.star_pk, vercond) + return apo.Star.select(*fields).where(apo.Star.sdss_id == sdss_id, vercond) +def get_astra_target(sdss_id: int, release: str, fields: list = None) -> peewee.ModelSelect: + """Get the Astra target metadata for an sdss_id -def get_astra_target(sdss_id: int, release: str, fields: list = None): - """ temporary placeholder for astra """ + Retrieves the astra source data from the astra.source table + for the given sdss_id and data release. + Parameters + ---------- + sdss_id : int + the input sdss_id + release : str + the data release to look up + fields : list, optional + a list of fields to retrieve from the database, by default None + + Returns + ------- + peewee.ModelSelect + the output query + """ # check the astra version against the assigned schema vastra = get_software_tag(release, 'v_astra') vastra = "0.5.0" if vastra in ("0.5.0", "0.6.0") else vastra From 0684158e6480b25768f3caa84ae26ee150dc3aa7 Mon Sep 17 00:00:00 2001 From: havok2063 Date: Thu, 23 Oct 2025 15:36:05 -0400 Subject: [PATCH 3/5] bumping tree and sdssdb packages --- uv.lock | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/uv.lock b/uv.lock index 6cf7282..57899f5 100644 --- a/uv.lock +++ b/uv.lock @@ -503,6 +503,30 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/39/54/db7a801933dd2537f5376fb8a9e28caff488ef5c2d61f3a8fced55fe6336/blake3-1.0.7-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:d9046bb1e22a8607e1d0d7c3ff47e56e0a197c988502df4bf4d78563f3e9fe2c", size = 553411, upload-time = "2025-09-29T16:40:45.667Z" }, { url = "https://files.pythonhosted.org/packages/2c/08/949cf68d16d1f731d502968bb1486e1a4bf7ef032c38fbc2ef26a2353494/blake3-1.0.7-cp313-cp313t-win32.whl", hash = "sha256:bd2f638bcc00fc09ce985ea3c642d45940e1eda198ab1f4b90cfdecbebbc9315", size = 227049, upload-time = "2025-09-29T16:40:47.446Z" }, { url = "https://files.pythonhosted.org/packages/f2/ae/6783a5ca6235024e00a1e92ab6ca2cd855f4c61c763cf8d6d643846d110c/blake3-1.0.7-cp313-cp313t-win_amd64.whl", hash = "sha256:cb3aa1db14231c2ef0ec5acd805505ce128c39ffa510deb3384eed96fe4addcb", size = 214101, upload-time = "2025-09-29T16:40:48.656Z" }, + { url = "https://files.pythonhosted.org/packages/32/aa/99b4b6c22972b9a854f77d97846a717448a77d079e4bd38e46a3f8ecea76/blake3-1.0.7-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:f7db997205aa420d59fb5639346e40beafb9c09252e2ec6efedca8f230f7520c", size = 346664, upload-time = "2025-10-11T18:02:54.609Z" }, + { url = "https://files.pythonhosted.org/packages/f9/44/e98bc5450be415a335a191b154e299e335046d11fe9514d93961902b7aed/blake3-1.0.7-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:19afec6e276f3bc154541248d92b1ecb198af2ee920025f7ce521028f9a69d8b", size = 324576, upload-time = "2025-10-11T18:02:57.062Z" }, + { url = "https://files.pythonhosted.org/packages/74/25/23a39913c8424ac3df705ed71a00efe34cc1cdbd4588ed6eaf458ea9d7ef/blake3-1.0.7-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:006a11bbba65a95e88ddc069cca751c8812fd144d582715eeea512452fdbe80d", size = 370545, upload-time = "2025-10-11T18:02:59.824Z" }, + { url = "https://files.pythonhosted.org/packages/db/83/9f53a86de9a5999b043febfd84765d240014da42055aeac06d1005b20b07/blake3-1.0.7-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7febeffdc8412fed105ca517cee641ac521fb9cfb750bf7e27a5cdf3ddf74a08", size = 374370, upload-time = "2025-10-11T18:03:01.412Z" }, + { url = "https://files.pythonhosted.org/packages/c4/4c/3290aa4fb7483975a7b3322a73692aa3cf491a77ce7ac61c216c71c6f834/blake3-1.0.7-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c032ce7c52b71015651c0abe9fe599aa2669e6be578aa17d5f993dc93373401", size = 447808, upload-time = "2025-10-11T18:03:02.893Z" }, + { url = "https://files.pythonhosted.org/packages/66/26/92b6e15552865416aae1aedad8b9b4d8b47ca9b73d25373622b1798c05a9/blake3-1.0.7-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b81455f7d24b58fe26be037cc3854c28ea6eb3671ceab3b1ec0b1239aeb6fef", size = 506118, upload-time = "2025-10-11T18:03:04.51Z" }, + { url = "https://files.pythonhosted.org/packages/1b/ef/f158fc43a03fd366bc428a52a845bd0f884e518deda901c9216bd469867e/blake3-1.0.7-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:41b0127b0e7c8610054c421959dbe7140a81ac2c88fa9e099994fbaa529af3c1", size = 393239, upload-time = "2025-10-11T18:03:07.102Z" }, + { url = "https://files.pythonhosted.org/packages/10/49/2a56ce897ec7ed0e25953b3873da271ea60cc107ae02ecc6655252e554c7/blake3-1.0.7-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4755ca95b4114b629d8f3570bc661916d211d52d47f57ff70e9687377ab39cb9", size = 386267, upload-time = "2025-10-11T18:03:08.904Z" }, + { url = "https://files.pythonhosted.org/packages/d9/c4/ee4c03ea419198b91c889ef173015b5d637a390d3f7d63cb70033a7201d6/blake3-1.0.7-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:8abe929cfd27b375e02e3dd7a690192fa4efecc52ef510df91ef01651ef08dc7", size = 549641, upload-time = "2025-10-11T18:03:10.64Z" }, + { url = "https://files.pythonhosted.org/packages/b2/cc/a918d6649b56fe705133e06d9958d90978aad30063d42cca4dfe23db16e9/blake3-1.0.7-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:dd607eb5ad5a9b44ff62243759aa0af4085f6f43c9b01f503561a70da63e3b94", size = 553691, upload-time = "2025-10-11T18:03:12.108Z" }, + { url = "https://files.pythonhosted.org/packages/fd/9f/568546f555fd1555d4867c497e9413f67bf769d076e773b9ca9e07a0b6f6/blake3-1.0.7-cp314-cp314-win32.whl", hash = "sha256:a51684d1f346e7680f7c244c25b0e279e3b297f1938126e4ea8e32425ea269f5", size = 227552, upload-time = "2025-10-11T18:03:13.468Z" }, + { url = "https://files.pythonhosted.org/packages/97/2b/d4ef7365d9f601c8a127b5993f2662d45d2cb6d430bf3dbbb7a6f0b33639/blake3-1.0.7-cp314-cp314-win_amd64.whl", hash = "sha256:a6a481719e28e2c61aafd4273d32663365d97613341b72fcdf2f6afbd426319b", size = 214719, upload-time = "2025-10-11T18:03:14.835Z" }, + { url = "https://files.pythonhosted.org/packages/2f/53/f697cc34e382a225d163ea0c6a35c7eb4cfd1011e85db6610adfac98e522/blake3-1.0.7-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:daa8933cd7db19143bd6b59f7ac4c7c7446767d7b2c3a748a4559aa483275fa2", size = 347071, upload-time = "2025-10-11T18:03:16.637Z" }, + { url = "https://files.pythonhosted.org/packages/4c/85/836dcb5c5709c2331f02ce065f7ebfaae710a6c1768cdc47ee3197645f98/blake3-1.0.7-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:24074adfffffe0fa7a7dd930cc608d6e965e70306e2c1e14d412e29ec94fa360", size = 324341, upload-time = "2025-10-11T18:03:18.073Z" }, + { url = "https://files.pythonhosted.org/packages/6d/48/36b2c25007933619ce60e24b9f360baaa77d08939284045476c8e157fe62/blake3-1.0.7-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dce6e6f03de2674f9860cf330d8a4fcdb63a60659435e5e31d72d174fc102d8e", size = 370140, upload-time = "2025-10-11T18:03:19.582Z" }, + { url = "https://files.pythonhosted.org/packages/70/82/8a8977e5d56b9fb719033940c8ce34afc733190d34ab868a647a9af7b584/blake3-1.0.7-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e783f33d53a2de8d2ab845235dd53393d521b5e4a76c23d03e77e472266359d3", size = 373022, upload-time = "2025-10-11T18:03:21.143Z" }, + { url = "https://files.pythonhosted.org/packages/e2/c4/44017ba40804a528568b35a36c05187786830c4d891c5540d59a121a7cec/blake3-1.0.7-cp314-cp314t-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:782784aef18eb61f4ce8bf2b9506b7d90f0d183176b453345b221837a18041b7", size = 447243, upload-time = "2025-10-11T18:03:22.707Z" }, + { url = "https://files.pythonhosted.org/packages/78/c1/4fa20e68624784082734d31b8c9c80ad226658c024e61b9f9b6751ba0a4a/blake3-1.0.7-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6062122e77f40e3733cac2ef3f25e0fc7f555e352fe6f513f8404ad11dc69974", size = 506149, upload-time = "2025-10-11T18:03:24.424Z" }, + { url = "https://files.pythonhosted.org/packages/8e/63/af65466e27e7b92800a068afaee11b2fa071e34a7f5900f8e13832f18185/blake3-1.0.7-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6c2614bc9d69fd6067571f3bb37b3b07a6b86a56167553ad4784a3c508771f39", size = 393243, upload-time = "2025-10-11T18:03:25.872Z" }, + { url = "https://files.pythonhosted.org/packages/f3/82/54a4807a3243d0e094ada9d65687aeb40059587e374b3beb9c89f6552c9b/blake3-1.0.7-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d6df2bd56c43bdeb6699d4af0a0dd0d77537d95cb4a5dde4b39ed6e54cc725d6", size = 386318, upload-time = "2025-10-11T18:03:27.338Z" }, + { url = "https://files.pythonhosted.org/packages/42/e8/32b56531b5d9da67e476735ceaec7c3bf89310629abeeafb03c724145c88/blake3-1.0.7-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:8b635cf4350caf459ecb335b32be622068423245bda457d5bc159106eb20f912", size = 548945, upload-time = "2025-10-11T18:03:28.779Z" }, + { url = "https://files.pythonhosted.org/packages/ad/50/33b1aca708be629e285a537f1adf34dfcabc4c30b28c436361323d11f593/blake3-1.0.7-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:f96a685775f87ddf75ff495dc9698703268c66c170caca977347427ef8d52324", size = 553564, upload-time = "2025-10-11T18:03:30.247Z" }, + { url = "https://files.pythonhosted.org/packages/fe/07/8b17cbf40ccd9afeed6ae9f55018181786b30ff4e079ac8bf4ca4799e47b/blake3-1.0.7-cp314-cp314t-win32.whl", hash = "sha256:0633b7d9bad87dc7fce545042353f2e056604d993f71d1dce666a9f5edc13e05", size = 227345, upload-time = "2025-10-11T18:03:31.933Z" }, + { url = "https://files.pythonhosted.org/packages/d9/8a/ab9de8a73616350759356a483f440212bc2a22fc9aaa77cabbf06c3483db/blake3-1.0.7-cp314-cp314t-win_amd64.whl", hash = "sha256:5e356daa0089968dc1ff1d0d112e7cc1700533441d8f30ae99f835a94dc8b0f3", size = 213964, upload-time = "2025-10-11T18:03:33.919Z" }, ] [[package]] @@ -5926,16 +5950,16 @@ dependencies = [ [[package]] name = "sdss-tree" -version = "4.0.10" +version = "4.1.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "configparser" }, { name = "pygments" }, { name = "sdsstools" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/8b/b4/188be259ea0b407a8fe545b1ee59beea40d3b0ec32c0e39011cc0f6b9efe/sdss_tree-4.0.10.tar.gz", hash = "sha256:b5a87670f70ea9171269e7f48bb3dff91b2170ad3c8a24be4c75e7f7042084bb", size = 55501, upload-time = "2025-07-10T16:53:26.725Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e8/0b/b3d3c58ba86a8b075eafb6a8ff94efa2d43b94580405cd10723b505da56d/sdss_tree-4.1.1.tar.gz", hash = "sha256:85619ecf21153b0079c26a84466bee2586fb11d4160c331489bc857a7ad16605", size = 56203, upload-time = "2025-10-23T18:44:38.344Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/a1/79/db190da71484424a981e6ec8484e264c044242911a76a005620522a2ae03/sdss_tree-4.0.10-py3-none-any.whl", hash = "sha256:fb8252715bfb91429a3e3579888e6533980df0fc716e793befb29e5cc23cf3d4", size = 59161, upload-time = "2025-07-10T16:53:24.522Z" }, + { url = "https://files.pythonhosted.org/packages/7e/5c/b75b94838b36cdf349d23f6010823d3a8f90de14e9321f51f45608593aac/sdss_tree-4.1.1-py3-none-any.whl", hash = "sha256:d00f64fb8408a948a6bf3b71d71a9dbf8cc337cd472e3e1789dfb041767aadeb", size = 62153, upload-time = "2025-10-23T18:44:36.789Z" }, ] [[package]] @@ -6034,7 +6058,7 @@ dev = [ [[package]] name = "sdssdb" -version = "0.13.4" +version = "0.13.5" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "numpy" }, @@ -6045,9 +6069,9 @@ dependencies = [ { name = "six" }, { name = "sqlalchemy" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/50/e7/4c129618b93d026669d273e10c3ef1af61dbe2e9157a41a448a43fc91d8c/sdssdb-0.13.4.tar.gz", hash = "sha256:19efe98ed7bba0c09871bbd6efcdf2585485ac83fd584c3c5c577d1d473a4c7f", size = 167909, upload-time = "2025-10-02T13:37:13.31Z" } +sdist = { url = "https://files.pythonhosted.org/packages/1d/63/c2e07495b05513904395281e6d04bdd22cd494b5c899bc5f8ecfc5297428/sdssdb-0.13.5.tar.gz", hash = "sha256:1bfd285fe6a19b01a9a812ee082bd831079b00f380f4302886b81c2f7ab9862b", size = 168053, upload-time = "2025-10-23T19:30:45.409Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/b7/b4/4936a9aea63e07800b84a279d8bd72c4be24c37bf2918a5c08535b6f7169/sdssdb-0.13.4-py3-none-any.whl", hash = "sha256:3522712d10683b021af9e0ae378ecf00c3bb2927539dd56d42fcadfb4929b094", size = 192673, upload-time = "2025-10-02T13:37:11.385Z" }, + { url = "https://files.pythonhosted.org/packages/d7/46/947a242c9cc6e13be0acd924970c3289ccb82a1672b8b7b92cef08bd58ad/sdssdb-0.13.5-py3-none-any.whl", hash = "sha256:ec0da46d4334e01cfcee094a08c85bfb82c826788d1c608abc22c468661b4b2d", size = 192824, upload-time = "2025-10-23T19:30:43.575Z" }, ] [[package]] From 25dce0ebac272db822f0af4d026e58fec0dddb0a Mon Sep 17 00:00:00 2001 From: havok2063 Date: Wed, 5 Nov 2025 11:04:20 -0500 Subject: [PATCH 4/5] bumping deps --- uv.lock | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/uv.lock b/uv.lock index 57899f5..257da59 100644 --- a/uv.lock +++ b/uv.lock @@ -1839,6 +1839,8 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/7f/91/ae2eb6b7979e2f9b035a9f612cf70f1bf54aad4e1d125129bef1eae96f19/greenlet-3.2.4-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c2ca18a03a8cfb5b25bc1cbe20f3d9a4c80d8c3b13ba3df49ac3961af0b1018d", size = 584358, upload-time = "2025-08-07T13:18:23.708Z" }, { url = "https://files.pythonhosted.org/packages/f7/85/433de0c9c0252b22b16d413c9407e6cb3b41df7389afc366ca204dbc1393/greenlet-3.2.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:9fe0a28a7b952a21e2c062cd5756d34354117796c6d9215a87f55e38d15402c5", size = 1113550, upload-time = "2025-08-07T13:42:37.467Z" }, { url = "https://files.pythonhosted.org/packages/a1/8d/88f3ebd2bc96bf7747093696f4335a0a8a4c5acfcf1b757717c0d2474ba3/greenlet-3.2.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8854167e06950ca75b898b104b63cc646573aa5fef1353d4508ecdd1ee76254f", size = 1137126, upload-time = "2025-08-07T13:18:20.239Z" }, + { url = "https://files.pythonhosted.org/packages/f1/29/74242b7d72385e29bcc5563fba67dad94943d7cd03552bac320d597f29b2/greenlet-3.2.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f47617f698838ba98f4ff4189aef02e7343952df3a615f847bb575c3feb177a7", size = 1544904, upload-time = "2025-11-04T12:42:04.763Z" }, + { url = "https://files.pythonhosted.org/packages/c8/e2/1572b8eeab0f77df5f6729d6ab6b141e4a84ee8eb9bc8c1e7918f94eda6d/greenlet-3.2.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:af41be48a4f60429d5cad9d22175217805098a9ef7c40bfef44f7669fb9d74d8", size = 1611228, upload-time = "2025-11-04T12:42:08.423Z" }, { url = "https://files.pythonhosted.org/packages/d6/6f/b60b0291d9623c496638c582297ead61f43c4b72eef5e9c926ef4565ec13/greenlet-3.2.4-cp310-cp310-win_amd64.whl", hash = "sha256:73f49b5368b5359d04e18d15828eecc1806033db5233397748f4ca813ff1056c", size = 298654, upload-time = "2025-08-07T13:50:00.469Z" }, { url = "https://files.pythonhosted.org/packages/a4/de/f28ced0a67749cac23fecb02b694f6473f47686dff6afaa211d186e2ef9c/greenlet-3.2.4-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:96378df1de302bc38e99c3a9aa311967b7dc80ced1dcc6f171e99842987882a2", size = 272305, upload-time = "2025-08-07T13:15:41.288Z" }, { url = "https://files.pythonhosted.org/packages/09/16/2c3792cba130000bf2a31c5272999113f4764fd9d874fb257ff588ac779a/greenlet-3.2.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1ee8fae0519a337f2329cb78bd7a8e128ec0f881073d43f023c7b8d4831d5246", size = 632472, upload-time = "2025-08-07T13:42:55.044Z" }, @@ -1848,6 +1850,8 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/1f/8e/abdd3f14d735b2929290a018ecf133c901be4874b858dd1c604b9319f064/greenlet-3.2.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2523e5246274f54fdadbce8494458a2ebdcdbc7b802318466ac5606d3cded1f8", size = 587684, upload-time = "2025-08-07T13:18:25.164Z" }, { url = "https://files.pythonhosted.org/packages/5d/65/deb2a69c3e5996439b0176f6651e0052542bb6c8f8ec2e3fba97c9768805/greenlet-3.2.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1987de92fec508535687fb807a5cea1560f6196285a4cde35c100b8cd632cc52", size = 1116647, upload-time = "2025-08-07T13:42:38.655Z" }, { url = "https://files.pythonhosted.org/packages/3f/cc/b07000438a29ac5cfb2194bfc128151d52f333cee74dd7dfe3fb733fc16c/greenlet-3.2.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:55e9c5affaa6775e2c6b67659f3a71684de4c549b3dd9afca3bc773533d284fa", size = 1142073, upload-time = "2025-08-07T13:18:21.737Z" }, + { url = "https://files.pythonhosted.org/packages/67/24/28a5b2fa42d12b3d7e5614145f0bd89714c34c08be6aabe39c14dd52db34/greenlet-3.2.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c9c6de1940a7d828635fbd254d69db79e54619f165ee7ce32fda763a9cb6a58c", size = 1548385, upload-time = "2025-11-04T12:42:11.067Z" }, + { url = "https://files.pythonhosted.org/packages/6a/05/03f2f0bdd0b0ff9a4f7b99333d57b53a7709c27723ec8123056b084e69cd/greenlet-3.2.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:03c5136e7be905045160b1b9fdca93dd6727b180feeafda6818e6496434ed8c5", size = 1613329, upload-time = "2025-11-04T12:42:12.928Z" }, { url = "https://files.pythonhosted.org/packages/d8/0f/30aef242fcab550b0b3520b8e3561156857c94288f0332a79928c31a52cf/greenlet-3.2.4-cp311-cp311-win_amd64.whl", hash = "sha256:9c40adce87eaa9ddb593ccb0fa6a07caf34015a29bf8d344811665b573138db9", size = 299100, upload-time = "2025-08-07T13:44:12.287Z" }, { url = "https://files.pythonhosted.org/packages/44/69/9b804adb5fd0671f367781560eb5eb586c4d495277c93bde4307b9e28068/greenlet-3.2.4-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:3b67ca49f54cede0186854a008109d6ee71f66bd57bb36abd6d0a0267b540cdd", size = 274079, upload-time = "2025-08-07T13:15:45.033Z" }, { url = "https://files.pythonhosted.org/packages/46/e9/d2a80c99f19a153eff70bc451ab78615583b8dac0754cfb942223d2c1a0d/greenlet-3.2.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ddf9164e7a5b08e9d22511526865780a576f19ddd00d62f8a665949327fde8bb", size = 640997, upload-time = "2025-08-07T13:42:56.234Z" }, @@ -1857,6 +1861,8 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/19/0d/6660d55f7373b2ff8152401a83e02084956da23ae58cddbfb0b330978fe9/greenlet-3.2.4-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3b3812d8d0c9579967815af437d96623f45c0f2ae5f04e366de62a12d83a8fb0", size = 607586, upload-time = "2025-08-07T13:18:28.544Z" }, { url = "https://files.pythonhosted.org/packages/8e/1a/c953fdedd22d81ee4629afbb38d2f9d71e37d23caace44775a3a969147d4/greenlet-3.2.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:abbf57b5a870d30c4675928c37278493044d7c14378350b3aa5d484fa65575f0", size = 1123281, upload-time = "2025-08-07T13:42:39.858Z" }, { url = "https://files.pythonhosted.org/packages/3f/c7/12381b18e21aef2c6bd3a636da1088b888b97b7a0362fac2e4de92405f97/greenlet-3.2.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:20fb936b4652b6e307b8f347665e2c615540d4b42b3b4c8a321d8286da7e520f", size = 1151142, upload-time = "2025-08-07T13:18:22.981Z" }, + { url = "https://files.pythonhosted.org/packages/27/45/80935968b53cfd3f33cf99ea5f08227f2646e044568c9b1555b58ffd61c2/greenlet-3.2.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ee7a6ec486883397d70eec05059353b8e83eca9168b9f3f9a361971e77e0bcd0", size = 1564846, upload-time = "2025-11-04T12:42:15.191Z" }, + { url = "https://files.pythonhosted.org/packages/69/02/b7c30e5e04752cb4db6202a3858b149c0710e5453b71a3b2aec5d78a1aab/greenlet-3.2.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:326d234cbf337c9c3def0676412eb7040a35a768efc92504b947b3e9cfc7543d", size = 1633814, upload-time = "2025-11-04T12:42:17.175Z" }, { url = "https://files.pythonhosted.org/packages/e9/08/b0814846b79399e585f974bbeebf5580fbe59e258ea7be64d9dfb253c84f/greenlet-3.2.4-cp312-cp312-win_amd64.whl", hash = "sha256:a7d4e128405eea3814a12cc2605e0e6aedb4035bf32697f72deca74de4105e02", size = 299899, upload-time = "2025-08-07T13:38:53.448Z" }, { url = "https://files.pythonhosted.org/packages/49/e8/58c7f85958bda41dafea50497cbd59738c5c43dbbea5ee83d651234398f4/greenlet-3.2.4-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:1a921e542453fe531144e91e1feedf12e07351b1cf6c9e8a3325ea600a715a31", size = 272814, upload-time = "2025-08-07T13:15:50.011Z" }, { url = "https://files.pythonhosted.org/packages/62/dd/b9f59862e9e257a16e4e610480cfffd29e3fae018a68c2332090b53aac3d/greenlet-3.2.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cd3c8e693bff0fff6ba55f140bf390fa92c994083f838fece0f63be121334945", size = 641073, upload-time = "2025-08-07T13:42:57.23Z" }, @@ -1866,6 +1872,8 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ee/43/3cecdc0349359e1a527cbf2e3e28e5f8f06d3343aaf82ca13437a9aa290f/greenlet-3.2.4-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23768528f2911bcd7e475210822ffb5254ed10d71f4028387e5a99b4c6699671", size = 610497, upload-time = "2025-08-07T13:18:31.636Z" }, { url = "https://files.pythonhosted.org/packages/b8/19/06b6cf5d604e2c382a6f31cafafd6f33d5dea706f4db7bdab184bad2b21d/greenlet-3.2.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:00fadb3fedccc447f517ee0d3fd8fe49eae949e1cd0f6a611818f4f6fb7dc83b", size = 1121662, upload-time = "2025-08-07T13:42:41.117Z" }, { url = "https://files.pythonhosted.org/packages/a2/15/0d5e4e1a66fab130d98168fe984c509249c833c1a3c16806b90f253ce7b9/greenlet-3.2.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:d25c5091190f2dc0eaa3f950252122edbbadbb682aa7b1ef2f8af0f8c0afefae", size = 1149210, upload-time = "2025-08-07T13:18:24.072Z" }, + { url = "https://files.pythonhosted.org/packages/1c/53/f9c440463b3057485b8594d7a638bed53ba531165ef0ca0e6c364b5cc807/greenlet-3.2.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6e343822feb58ac4d0a1211bd9399de2b3a04963ddeec21530fc426cc121f19b", size = 1564759, upload-time = "2025-11-04T12:42:19.395Z" }, + { url = "https://files.pythonhosted.org/packages/47/e4/3bb4240abdd0a8d23f4f88adec746a3099f0d86bfedb623f063b2e3b4df0/greenlet-3.2.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ca7f6f1f2649b89ce02f6f229d7c19f680a6238af656f61e0115b24857917929", size = 1634288, upload-time = "2025-11-04T12:42:21.174Z" }, { url = "https://files.pythonhosted.org/packages/0b/55/2321e43595e6801e105fcfdee02b34c0f996eb71e6ddffca6b10b7e1d771/greenlet-3.2.4-cp313-cp313-win_amd64.whl", hash = "sha256:554b03b6e73aaabec3745364d6239e9e012d64c68ccd0b8430c64ccc14939a8b", size = 299685, upload-time = "2025-08-07T13:24:38.824Z" }, { url = "https://files.pythonhosted.org/packages/22/5c/85273fd7cc388285632b0498dbbab97596e04b154933dfe0f3e68156c68c/greenlet-3.2.4-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:49a30d5fda2507ae77be16479bdb62a660fa51b1eb4928b524975b3bde77b3c0", size = 273586, upload-time = "2025-08-07T13:16:08.004Z" }, { url = "https://files.pythonhosted.org/packages/d1/75/10aeeaa3da9332c2e761e4c50d4c3556c21113ee3f0afa2cf5769946f7a3/greenlet-3.2.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:299fd615cd8fc86267b47597123e3f43ad79c9d8a22bebdce535e53550763e2f", size = 686346, upload-time = "2025-08-07T13:42:59.944Z" }, @@ -1873,6 +1881,8 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/dc/8b/29aae55436521f1d6f8ff4e12fb676f3400de7fcf27fccd1d4d17fd8fecd/greenlet-3.2.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b4a1870c51720687af7fa3e7cda6d08d801dae660f75a76f3845b642b4da6ee1", size = 694659, upload-time = "2025-08-07T13:53:17.759Z" }, { url = "https://files.pythonhosted.org/packages/92/2e/ea25914b1ebfde93b6fc4ff46d6864564fba59024e928bdc7de475affc25/greenlet-3.2.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:061dc4cf2c34852b052a8620d40f36324554bc192be474b9e9770e8c042fd735", size = 695355, upload-time = "2025-08-07T13:18:34.517Z" }, { url = "https://files.pythonhosted.org/packages/72/60/fc56c62046ec17f6b0d3060564562c64c862948c9d4bc8aa807cf5bd74f4/greenlet-3.2.4-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:44358b9bf66c8576a9f57a590d5f5d6e72fa4228b763d0e43fee6d3b06d3a337", size = 657512, upload-time = "2025-08-07T13:18:33.969Z" }, + { url = "https://files.pythonhosted.org/packages/23/6e/74407aed965a4ab6ddd93a7ded3180b730d281c77b765788419484cdfeef/greenlet-3.2.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:2917bdf657f5859fbf3386b12d68ede4cf1f04c90c3a6bc1f013dd68a22e2269", size = 1612508, upload-time = "2025-11-04T12:42:23.427Z" }, + { url = "https://files.pythonhosted.org/packages/0d/da/343cd760ab2f92bac1845ca07ee3faea9fe52bee65f7bcb19f16ad7de08b/greenlet-3.2.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:015d48959d4add5d6c9f6c5210ee3803a830dce46356e3bc326d6776bde54681", size = 1680760, upload-time = "2025-11-04T12:42:25.341Z" }, { url = "https://files.pythonhosted.org/packages/e3/a5/6ddab2b4c112be95601c13428db1d8b6608a8b6039816f2ba09c346c08fc/greenlet-3.2.4-cp314-cp314-win_amd64.whl", hash = "sha256:e37ab26028f12dbb0ff65f29a8d3d44a765c61e729647bf2ddfbbed621726f01", size = 303425, upload-time = "2025-08-07T13:32:27.59Z" }, ] From 29b08cffc90764308324674d1716e84116f7c686 Mon Sep 17 00:00:00 2001 From: havok2063 Date: Wed, 5 Nov 2025 11:06:33 -0500 Subject: [PATCH 5/5] syntax tweak --- python/valis/db/queries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/valis/db/queries.py b/python/valis/db/queries.py index b1f9326..be5fe45 100644 --- a/python/valis/db/queries.py +++ b/python/valis/db/queries.py @@ -528,7 +528,7 @@ def get_astra_target(sdss_id: int, release: str, fields: list = None) -> peewee. # check the astra version against the assigned schema vastra = get_software_tag(release, 'v_astra') vastra = "0.5.0" if vastra in ("0.5.0", "0.6.0") else vastra - if vastra.replace('.', '') not in astra.Source._meta.schema: + if vastra is None or vastra.replace('.', '') not in astra.Source._meta.schema: print(f"warning: astra version for current release {release} does not match assigned astra schema {astra.Source._meta.schema}") return None