-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Python: Bottle Framework Support #17370
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks 🎉
Overall the code looks OK to me, but to accept this PR I need you to write some tests 😊 (good start by copying over the ConceptsTest, but we also need some code using bottle to show that the modeling works as intended) See flask tests as an inspiration.
@RasmusWL I've added more support for Bottle routes and I've added tests. |
@RasmusWL is travelling at the moment, so I will take this over for now. |
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.
The structure of both the code and the tests are good. I am a little worried that the modelling is not completely aligned with the framework; all these frameworks have subtle differences. A good way to align with the framework could be to write several examples, taken from tutorials and the like, in the test files and then align the modelling to those (padding out the set of function names and argument names by looking at the documentation).
@yoff Hi, please let me know what you think of the changes. I'm trying to model every possible usage of bottle, so even though the documentation might not mention something, if I find it is used a lot in Github I have included them. Obviously it must run on the latest, currently v12.25 as LTS. Also, I'm not sure where I moved away from API nodes in 5d12f7bd3. Everything I have modeled here I have created a codebase/codeql database to ensure validity. |
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 am requesting a small simplification, but I am feeling much better about this now; thanks for explaining your testing :-)
@yoff I was just copying from Werkzeug.qll as recommended by Rasmus on his first pass. The API nodes was working, as I was using these models in my research before PRing. ✅ |
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.
LGTM
In that case, it would be nicer to use the API nodes. They are cleaner and might match in a few more cases. I will not require it, though, it can be a clean-up of both situations later. |
Add basic Bottle support