-
Notifications
You must be signed in to change notification settings - Fork 5
Django Ninja templates #782
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
Conversation
…ase with django-fastapi
| @@ -0,0 +1,2 @@ | |||
| pydantic==2.9.2 | |||
| django-ninja No newline at end of file | |||
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.
Would it make sense to have cloudharness and cloudharness_django as dependencies here? Since they are conceptually required to run the application (f.e. they are used in settings.py) cc @ddelpiano
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 would expect so. I understand we might need CH repo locally if I am in need of regen the template files or the codefresh pipeline, but if I am purely working on the backend I might not need CH and such dependency should be part of the requirements.txt so that all I need to run the backend is already covered by that. Thanks!
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 agree it's better to be explicit about all the dependencies that are imported, even if they are inherited by the base image (like this case)
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 don't know how I'd go about adding that to the requirements.txt file. The cloud harness modules aren't on pip, so I can't just have cloudharness-django in there, and the path to them is not well defined; they're at /libraries/cloudharness-django in the base image, but that isn't necessarily going to always be true, and definitely won't be true for running it outside the image.
ddelpiano
left a comment
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.
requirements.txt is missing ch as dependency since the settings.py of the template requires it.
we are not adding inside dependencies on requirements.txt as they don't add anything to the install process there, I think it's fine to leave this one without as long as it's coherent with the rest |
Closes CH-157
Added support for a django-ninja template when using harness-application and harness-generate. Also refactored the application build process into a more structured process of builder components.
...
To test try generating applications using
harness-application -t django-ninjaand also usingharness-generate serversfor that app to see the generates servers and openapi schema....
Sanity checks:
Breaking changes (select one):
breaking-changeand the migration procedure is well described abovePossible deployment updates issues (select one):
alert:deploymentTest coverage (select one):
Documentation (select one):
Nice to have (if relevant):