datamade / how-to

📚 Doing all sorts of things, the DataMade way
MIT License
86 stars 12 forks source link

Set up linter on the new-django-app template #91

Closed jeancochrane closed 3 years ago

jeancochrane commented 4 years ago

Documentation request

Similar to #75, we have some ad-hoc style conventions for Python but our typical tool for automatically enforcing them (flake8) is not built into our templates and is absent from many of our apps. Let's update our new-django-app template to install a linter, including:

jeancochrane commented 4 years ago

Another consideration: Can we configure flake8 to run using the container image defined in a repo's Dockerfile, as opposed to the system Python?

hancush commented 3 years ago

Our fork of pytest-flake8 no longer works as of pytest 6.0. If we want to use the plugin, we'll either need to patch it or pin pytest<6.0. @fgregg also suggests eschewing the plugin and running flake8 as a separate test step. TBH, I like that, too, since the plugin has proven tricky!