danger / python

⚠️ Stop saying "you forgot to …" in code review
https://danger.systems/python
MIT License
106 stars 47 forks source link

Complete DSL input #2

Closed turekj closed 4 years ago

turekj commented 4 years ago

The PR ships completely parsed DangerDSLJSONType structure from the JSON schema.

Unfortunately, I was unable to parse the schema with any code-generation tool for Python (it failed either on missing top-level definition, circular references or some validation error due to the types). So I decided to roll my own generation code for the sake of the project. It does a couple of cool things:

Since this part of the code relies on Jinja templates, it can be potentially reused for other projects, too 👍

EDIT: The PR is huge because it ships the schema with the project and also the generated model file, sorry 🙇

turekj commented 4 years ago

Thanks for the review @orta 🙇 Seems like we're getting closer to the initial release 🔥