Closed gordonwatts closed 1 month ago
Original error - before I figured out what was going on here.
The OutputFormat
here fails with an error:
General=sx.General(
Codegen=query[1],
# OutputFormat="root-ttree", # type: ignore
OutputFormat=sx.ResultFormat.root_ttree, # Fails with error
Delivery=("LocalCache" if download else "SignedURLs"), # type: ignore
),
and the error:
pydantic_core._pydantic_core.ValidationError: 2 validation errors for General
OutputFormat
Input should be 'parquet' or 'root-ttree' [type=enum, input_value=<ResultFormat.root_ttree: 'root-file'>, input_type=ResultFormat]
For further information visit https://errors.pydantic.dev/2.9/v/enum
Note that the commented-out OutputFormat
setting using a string works fine.
So this is technically an incompatible change with 3.0.0, but as Gordon points out 3.0.0 will fail if you attempt to use ResultFormat
for ROOT files, so I think it's safe to make the change. I propose to export General.OutputFormatEnum
as servicex.OutputFormat
.
The
servicex
package still exportsResultFormat
, which is an enum defined in themodels.py
file. I suspect other things likeResultDesitination
need to also be removed.