electropicks / Payback

A web app to optimize your todo list
https://task-master-three.vercel.app
1 stars 0 forks source link

Code Review Comments - Connor OBrien #21

Open connorpobrien opened 1 year ago

connorpobrien commented 1 year ago
  1. Implement error handling and validation, especially for database interactions. Validate data that is being passed to the database.
  2. Include more logging and print statements. Consider using python's logging library.
  3. Implement some form of testing (or remove /coverage from .gitignore).
  4. Include more comments or docstrings to explain intent of different sections of the code.
  5. Standardize return strings for POST operations. Some return "OK" while others return different structures. See add_transactions vs. add_line_item.
  6. Use a linter to standardize code formatting.
  7. Finish implementing the signin process.
  8. Include more type annotation for inputs, outputs, and local variables.
  9. Consider splitting groups.py into multiple .py files to increase clarity between different types of enpoints.
  10. Include comments/docstring to indicant purpose of different class definitions.
  11. Some endpoints (see create_trip for example) will return None if the transaction attempted during the database connection fails. Include error handling or add a return statement outside the 'with' block to fix this.
  12. Consider using ORM objects for transactions instead of executing raw SQL queries. This would make the more more readable and maintainable.
  13. Avoid using SQL code for business logic calculations. Use python instead.