I'm looking for some best practices for readability (and clean code in general) for naming modules/classes within more extensive projects. More specifically, is it reasonable to add the package's name to the module/class name?
For example, which of the following two structures is preferable?
|-- my_application
| |-- endpoints
| | |-- contact.py
| | |-- change_order.py
| | |-- ticket.py
| |-- models
| | |-- contact.py
| | |-- change_order.py
| | |-- ticket.py
OR
|-- my_application
| |-- endpoints
| | |-- contact_endpoint.py
| | |-- change_order_endpoint.py
| | |-- ticket_endpoint.py
| |-- models
| | |-- contact_model.py
| | |-- change_order_model.py
| | |-- ticket_model.py
Adding the package as a suffix improves the readability by making the purpose of the module unmistakably clear. That said, it also adds visual noise. Knowing that you're working on the my_application/endpoints/contact.py file should be enough to deduct you're working on the contact endpoint and not the model.