-
Notifications
You must be signed in to change notification settings - Fork 41
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
Recommendations for Python Development #131
Comments
I don't use black for code formatting. I use Visual Studio Code for that. @zbyte64 what are your thoughts on this? |
Write tests with pytest? Absolutely. I might also add:
|
My advice is:
|
Other recommendations:
|
I think I have seen that recommendation before. Can you link to a source? Thanks. |
From django documentation. https://docs.djangoproject.com/en/2.1/ref/contrib/admin/#module-django.contrib.admin |
@DropsOfSerenity Hmm. That's interesting. I had a different takeaway after reading the exact same paragraph. It sounded to me like trusted users / administrators within a client organization could be given access to the admin interface, while the average user would not have that access. That's how it is set up for Ultra Gro. |
Also for Ultra Gro, I ended up writing tests that fit both the |
They explain the position in some django tickets on their issue tracker as well. The general jist of the thing is:
From experience stripping down the admin to a place where the UX is good for a non-technical administrator is not worth the time. |
@stephengtuggy You can access the testing database in a regular django |
As I recall, the original tests were written for In addition, the test code seemed more elegant that way. If one can make the same (test) code serve two different purposes without duplication, why not, y'know? |
|
couple of thoughts
|
|
I like gunicorn but would encourage others to experiment, especially with all the new asynchronous python going around. In the same theme of experimentation, I wouldn't want to prevent someone from trying new libraries like: https://github.com/strawberry-graphql/strawberry ; as long as it is shown to have a healthy community and fits the requirements. |
Code quality is to me less about a set of perscriptive technologies, and more about a set of techniques to follow to keep your code clean. I agree with @zbyte64 perhaps we should define the borders of what we want "Python Code Quality" to accomplish and where it's boundaries should be. General recommendation IMO should be preferred, the things I see people running into most in django is things like, not using |
I agree @zbyte64 and @DropsOfSerenity. We have to point out all those things and let people experiment, but we also need to provide at least some recommended libraries/frameworks/tools that they can use. The reason is that a lot of people here don't have much experience with Python/Django or simple don't want to spend hours doing research on what's best to use. So we need to provide something for them to get started. Maybe it should be in a separate Github issue, but it's something that we need to have. |
This may be relevant: https://www.toptal.com/django/django-top-10-mistakes |
As a follow-up to what @carlosvargas said, what about renaming this issue to "Shift3 Recommendations for Python Development" or similar? |
Good point. |
Revisiting this in slack. Looking for feedback from those of you that use Python/Django! |
As per feedback from above, renamed the issue to Recommendations for Python Development. Look forward to getting more feedback from everyone! |
Request for comments: what practices should we include in the writing of python code?
Here are a few to get the ball rolling:
The text was updated successfully, but these errors were encountered: