Closed scpmw closed 6 months ago
Note that with this PR we drop support for Python 3.8:
File "/home/fedemp/ws_xradio_pointing/venv_xradio_python_38/lib/python3.8/site-packages/xradio/schema/typing.py", line 11, in <module>
from typing import (
ImportError: cannot import name 'Annotated' from 'typing' (/usr/lib/python3.8/typing.py)
>= 3.9 should be ok.
This follows the general approach of https://pypi.org/project/xarray-dataclasses/, which is to define schemas using (semi-pseudo) dataclasses along the lines of
We do not actually share any code with
xarray-dataclasses
, and instead re-define the type annotations ourselves. The reasoning is that we likely want to implement things substantially differently. For instance, this PR adds:xradio/schema/metamodel.py
) that could be exported or used for checksdoc/source/xradio_sphinx
) which makes tables out of array or dataset schemasDown the line, we will also want custom code for checking schemas as well as generating schema-adhering xarray arrays and datasets.