-
Notifications
You must be signed in to change notification settings - Fork 9
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
Documentation fixes and schema cleanup #272
Conversation
This would allow downstream packages to not only use the schema checker, but also the documentation generation. It's not a particularly large module, so no big harm?
This removes e.g. antenna_name from UVW in VisibilityXds, as this is a dimensionality that would not be allowed in that context. We especially complain when a data array has impossible dimensionality, which automatically catches some inconsistencies in the correlated data schemas.
Also add "data" to the data array one - you can literally get the data by accessing that member of the DataArray, so it is likely appropriate.
We are trying to format rather big tables, so all the margins add up rather quickly.
They just look confusing in the documentation
Turned out to be a bigger refactoring than I had anticipated - but we should generally try to not use nested parses too much here, and instead directly generate the document AST. This also changes the layout slightly - we generate "a,b,c or d" lists, and use non-breaking spaces to make sure the "or d" bit stays together.
5ec2625
to
9197852
Compare
@@ -1892,7 +1904,7 @@ class SpectrumXds: | |||
""" | |||
|
|||
# --- Optional Coordinates --- | |||
polarization_mixed: Optional[Coord[tuple[BaselineId, Polarization], str]] = None | |||
polarization_mixed: Optional[Coord[tuple[AntennaName, Polarization], str]] = None |
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.
👍
|
||
# Assume it's a literal of some kind - collect options | ||
literals = format_literals(attr.typ) | ||
print(literals) |
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.
I think this print is a leftover?
else: | ||
line += nodes.Text(", ") | ||
line += lit | ||
print(line) |
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.
Same here?
Fix a couple nice-to-haves in the schema documentation: