Wireless-Innovation-Forum / 6-GHz-AFC

This repository contains code and data for testing the compliance of Automated Frequency Coordinator (AFC) software. The AFC is defined by the FCC in proceeding 18-295 on Unlicensed Use of the 6 GHz Band. This repository contains procedures, documentation, and tests for such software, and for the devices authorized by it. To contribute, please first read the CONTRIBUTING file in the repository for instructions.
14 stars 3 forks source link

Improve warning messages on object conversion failure #26

Closed AEgbert closed 1 year ago

AEgbert commented 1 year ago

Resolves #18 by clarifying messages related to dataclass conversion in validator paths. This PR does not use either of the methods proposed in #18 for reasons discussed below:

I also considered adding an explicit recursive type-check in test_main after converting the response JSON to object form, external to the validator. However, this causes the test to be skipped for issues in non-critical fields (like VendorExtensions).

The most comprehensive solution to #18 is likely a combination of the "alternate" fix and the recursive type-checker, implemented by using some hidden class variables identifying "required" fields for iteration over by an explicit type checker. If this PR is not sufficient to alleviate the concerns in #18, I recommend pursuing this option.