Skip to content

[uss_qualifier/reports] Add KML visualization of RID test queries to sequence view artifact#1382

Merged
BenjaminPelletier merged 5 commits intointeruss:mainfrom
BenjaminPelletier:netrid-testing-visualization
Mar 6, 2026
Merged

[uss_qualifier/reports] Add KML visualization of RID test queries to sequence view artifact#1382
BenjaminPelletier merged 5 commits intointeruss:mainfrom
BenjaminPelletier:netrid-testing-visualization

Conversation

@BenjaminPelletier
Copy link
Member

To support debugging a challenging remote ID test report, I added a mechanism to render two new types of queries (RID injection "create test" and F3411-22a "search flights") to those which generate KML content for the sequence view artifact.

A few small issues noticed during this work are also cleaned up:

  • Remove log statements that incorrectly suggest a problem to the user
  • Close a formatting tag in documentation (resulting in the mentioned requirement showing up in autogenerated test suite documentation)
  • Fix a word ("can" -> "cannot") in documentation

basedpyright does not like the clever(?) feature of the QueryKMLRenderer Protocol which allows one or more of the specified arguments to be omitted with defined behavior when that happens (see query_kml_renderer decorator documentation), so two new items are added to the baseline.json backlog. I also added a Make target to make additions/exceptions like this easier to manage. Suggestions for ways to avoid these findings entirely are welcome (e.g., more accurate typing on QueryKMLRenderer or elsewhere).

@the-glu
Copy link
Contributor

the-glu commented Mar 5, 2026

basedpyright does not like the clever(?) feature of the QueryKMLRenderer Protocol which allows one or more of the specified arguments to be omitted with defined behavior when that happens (see query_kml_renderer decorator documentation), so two new items are added to the baseline.json backlog.

Shouldn't we use ignore statements for that? I would say that baseline is for the baseline, created at the start, and ignore is when we processed it and there are no others solutions.

@BenjaminPelletier BenjaminPelletier marked this pull request as ready for review March 5, 2026 07:54
@the-glu
Copy link
Contributor

the-glu commented Mar 5, 2026

Suggestions for ways to avoid these findings entirely are welcome

I tried some solution, it seems that "cheating" is not possible on Protocol side. On the typing side, those function may be called with all arguments and all of them must be supported.

Solution is either to switch to a generic callable (Callable[..., list[kml.Element]]) or to add defaults to all decorated functions :/

@BenjaminPelletier
Copy link
Member Author

Shouldn't we use ignore statements for that? I would say that baseline is for the baseline, created at the start, and ignore is when we processed it and there are no others solutions.

Fair enough; reverted baseline change.

I tried some solution, it seems that "cheating" is not possible on Protocol side. On the typing side, those function may be called with all arguments and all of them must be supported.

Yeah, if these functions really fully implemented Protocol that would be true, but the idea here is to allow for a subset of arguments since only one thing will be calling them and it will apply special logic depending on which arguments are specified. That's hard to type-annotate in Python :/

Solution is either to switch to a generic callable (Callable[..., list[kml.Element]]) or to add defaults to all decorated functions :/

Yeah, that seems substantially less informative; I suppose we'll just take the ignore path. Though actually, that annotation can't be used any way because basedpyright doesn't like to allow use of any of the dynamically-generated kml members from KML_ElementMaker as types (e.g., kml.Element) -- it complains that they are variables rather than types. I would have liked to annotate the return types especially from these function, but it doesn't seem feasible to do that with basedpyright without spamming ignore directives.

@BenjaminPelletier BenjaminPelletier merged commit c2b61c3 into interuss:main Mar 6, 2026
22 checks passed
@BenjaminPelletier BenjaminPelletier deleted the netrid-testing-visualization branch March 6, 2026 22:37
github-actions bot added a commit that referenced this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants