TheThingsNetwork / lorawan-devices

Device Repository for LoRaWAN devices
Apache License 2.0
184 stars 360 forks source link

Validate features #736

Closed LDannijs closed 2 months ago

LDannijs commented 5 months ago

Summary

I stumbled upon the issues from @johanstokking and @KrishnaIyer (#108 and #405) and decided to give it a crack. I am very curious to hear back if these implementations are correct, they would help out a lot.

Changes

Notes for Reviewers

@johanstokking I had a discussion with @Jaime-Trinidad about how much we should check the vendorProfileID and decided to just check for uniqueness and presence. Checking it against the vendorID was a bit outside of the scope since not every vendor adds it.

You asked about EIRP checking as well but i heard there can be some special exceptions so i left that out for now too.

LDannijs commented 5 months ago

I've added another small feature: add a pre-commit message that runs the validation on it's own and displays the error if the validation failed:

Screenshot 2024-01-29 at 10 00 57

I sometimes see users failing to run the validation themselves so this might help to negate that instead of Jaime having to do it himself. I'm not entirely sure if this is something we'd need but I'll be happy to hear feedback.

LDannijs commented 4 months ago

I'm aware not everything is properly implemented, had to fight my script a bit (which will be removed), the schema is missing hardwareVersion, some files are missing proper formatting, yadayada. Will continue this later.

LDannijs commented 4 months ago

@johanstokking i am pretty sure the implementation will have some problems but just as check if this is the correct direction.

LDannijs commented 3 months ago

Alright @johanstokking think I finally understood it now (apologies) I now removed the profileIDs from vendors where vendorProfileID was a repeating id, a vendorid, a made up number, etc.

I think I messed up cause, yes, I initially created a check for if the vendorProfileID was unique, but I rolled back that change.