lsst-felis 29.2025.2000__py3-none-any.whl → 29.2025.2200__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of lsst-felis might be problematic. Click here for more details.

felis/cli.py CHANGED
@@ -198,6 +198,12 @@ def create(
198
198
  @click.option("--dry-run", "-D", is_flag=True, help="Execute dry run only. Does not insert any data.")
199
199
  @click.option("--echo", "-e", is_flag=True, help="Print out the generated insert statements to stdout")
200
200
  @click.option("--output-file", "-o", type=click.Path(), help="Write SQL commands to a file")
201
+ @click.option(
202
+ "--force-unbounded-arraysize",
203
+ is_flag=True,
204
+ help="Use unbounded arraysize by default for all variable length string columns"
205
+ ", e.g., ``votable:arraysize: *`` (workaround for astropy bug #18099)",
206
+ ) # DM-50899: Variable-length bounded strings are not handled correctly in astropy
201
207
  @click.option(
202
208
  "--unique-keys",
203
209
  "-u",
@@ -216,6 +222,7 @@ def load_tap_schema(
216
222
  dry_run: bool,
217
223
  echo: bool,
218
224
  output_file: str | None,
225
+ force_unbounded_arraysize: bool,
219
226
  unique_keys: bool,
220
227
  file: IO[str],
221
228
  ) -> None:
@@ -256,7 +263,13 @@ def load_tap_schema(
256
263
  table_name_postfix=tap_tables_postfix,
257
264
  )
258
265
 
259
- schema = Schema.from_stream(file, context={"id_generation": ctx.obj["id_generation"]})
266
+ schema = Schema.from_stream(
267
+ file,
268
+ context={
269
+ "id_generation": ctx.obj["id_generation"],
270
+ "force_unbounded_arraysize": force_unbounded_arraysize,
271
+ },
272
+ )
260
273
 
261
274
  DataLoader(
262
275
  schema,
felis/datamodel.py CHANGED
@@ -421,7 +421,7 @@ class Column(BaseObject):
421
421
 
422
422
  @model_validator(mode="before")
423
423
  @classmethod
424
- def check_votable_arraysize(cls, values: dict[str, Any]) -> dict[str, Any]:
424
+ def check_votable_arraysize(cls, values: dict[str, Any], info: ValidationInfo) -> dict[str, Any]:
425
425
  """Set the default value for the ``votable_arraysize`` field, which
426
426
  corresponds to ``arraysize`` in the IVOA VOTable standard.
427
427
 
@@ -429,6 +429,8 @@ class Column(BaseObject):
429
429
  ----------
430
430
  values
431
431
  Values of the column.
432
+ info
433
+ Validation context used to determine if the check is enabled.
432
434
 
433
435
  Returns
434
436
  -------
@@ -443,6 +445,7 @@ class Column(BaseObject):
443
445
  if values.get("name", None) is None or values.get("datatype", None) is None:
444
446
  # Skip bad column data that will not validate
445
447
  return values
448
+ context = info.context if info.context else {}
446
449
  arraysize = values.get("votable:arraysize", None)
447
450
  if arraysize is None:
448
451
  length = values.get("length", None)
@@ -452,7 +455,14 @@ class Column(BaseObject):
452
455
  if datatype == "char":
453
456
  arraysize = str(length)
454
457
  elif datatype in ("string", "unicode", "binary"):
455
- arraysize = f"{length}*"
458
+ if context.get("force_unbounded_arraysize", False):
459
+ arraysize = "*"
460
+ logger.debug(
461
+ f"Forced VOTable's 'arraysize' to '*' on column '{values['name']}' with datatype "
462
+ + f"'{values['datatype']}' and length '{length}'"
463
+ )
464
+ else:
465
+ arraysize = f"{length}*"
456
466
  elif datatype in ("timestamp", "text"):
457
467
  arraysize = "*"
458
468
  if arraysize is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lsst-felis
3
- Version: 29.2025.2000
3
+ Version: 29.2025.2200
4
4
  Summary: A vocabulary for describing catalogs and acting on those descriptions
5
5
  Author-email: Rubin Observatory Data Management <dm-admin@lists.lsst.org>
6
6
  License: GNU General Public License v3 or later (GPLv3+)
@@ -1,6 +1,6 @@
1
1
  felis/__init__.py,sha256=HnwWzLaPOSnPzAoppSIHzTrGfixEgvkzJdBxa8-03cw,1294
2
- felis/cli.py,sha256=hHixypAU3y0y4DiZ1vyKHp0QvMLWiR6_jVLl6st3Sgg,15668
3
- felis/datamodel.py,sha256=iKL-B2CkiVLKDrlHFkRC9UXGg9uEEwsMEg34Hyws2tM,43686
2
+ felis/cli.py,sha256=jx3yBMEFPgvZTJsTKmWMAx--vBuRBDIOJNBbxMZR6fY,16132
3
+ felis/datamodel.py,sha256=NYTmxuuU6DqL3r2e137sN9xS_WmD_xYeEYKAQjVA6Qs,44245
4
4
  felis/diff.py,sha256=z4ZzUocFYVa2y22BWUAMkeeLORmMtaWIDGTVaUE1OIM,7181
5
5
  felis/metadata.py,sha256=cYx_qizkLBqcoxWV46h4TbwTi1KVJAkuA2OuUmD-K5k,13536
6
6
  felis/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -16,11 +16,11 @@ felis/schemas/tap_schema_std.yaml,sha256=sPW-Vk72nY0PFpCvP5d8L8fWvhkif-x32sGtcfD
16
16
  felis/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  felis/tests/postgresql.py,sha256=B_xk4fLual5-viGDqP20r94okuc0pbSvytRH_L0fvMs,4035
18
18
  felis/tests/run_cli.py,sha256=Gg8loUIGj9t6KlkRKrEc9Z9b5dtlkpJy94ORuj4BrxU,2503
19
- lsst_felis-29.2025.2000.dist-info/licenses/COPYRIGHT,sha256=vJAFLFTSF1mhy9eIuA3P6R-3yxTWKQgpig88P-1IzRw,129
20
- lsst_felis-29.2025.2000.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
21
- lsst_felis-29.2025.2000.dist-info/METADATA,sha256=BpOjZ_it4ujO_yJN32ThbBXXevrLlXOxFFZ3lELJ1GE,1433
22
- lsst_felis-29.2025.2000.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
23
- lsst_felis-29.2025.2000.dist-info/entry_points.txt,sha256=Gk2XFujA_Gp52VBk45g5kim8TDoMDJFPctsMqiq72EM,40
24
- lsst_felis-29.2025.2000.dist-info/top_level.txt,sha256=F4SvPip3iZRVyISi50CHhwTIAokAhSxjWiVcn4IVWRI,6
25
- lsst_felis-29.2025.2000.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
26
- lsst_felis-29.2025.2000.dist-info/RECORD,,
19
+ lsst_felis-29.2025.2200.dist-info/licenses/COPYRIGHT,sha256=vJAFLFTSF1mhy9eIuA3P6R-3yxTWKQgpig88P-1IzRw,129
20
+ lsst_felis-29.2025.2200.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
21
+ lsst_felis-29.2025.2200.dist-info/METADATA,sha256=w4HQCcDRzaf11WrNQCDb5nB2xGRFibRcxaLpHo3BmBU,1433
22
+ lsst_felis-29.2025.2200.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
+ lsst_felis-29.2025.2200.dist-info/entry_points.txt,sha256=Gk2XFujA_Gp52VBk45g5kim8TDoMDJFPctsMqiq72EM,40
24
+ lsst_felis-29.2025.2200.dist-info/top_level.txt,sha256=F4SvPip3iZRVyISi50CHhwTIAokAhSxjWiVcn4IVWRI,6
25
+ lsst_felis-29.2025.2200.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
26
+ lsst_felis-29.2025.2200.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.7.1)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5