From e984bfa17e860465f2fd1d6ce859b39da8a5a096 Mon Sep 17 00:00:00 2001 From: patree Date: Thu, 30 Mar 2023 23:40:21 -0500 Subject: [PATCH 1/2] Added a tip for creating testable code --- tip-from-patimejia.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tip-from-patimejia.md diff --git a/tip-from-patimejia.md b/tip-from-patimejia.md new file mode 100644 index 0000000..44b6976 --- /dev/null +++ b/tip-from-patimejia.md @@ -0,0 +1,7 @@ +# Code Quality Tips + +Best Practices for Reliable Test-Driven Code: Linters, Microservices, and Docker to Avoid 'Works on My Computer' Issues + +1. Use linters and automated testing to ensure quality code (e.g. Flake8, Pylint, `pytest`). +1. Break code into microservices for easier testing and maintenance (e.g. REST APIs, AWS Lambda). +1. Test microservices with Pytest and `fixtures`, and use Docker for reliable testing/deployment (e.g. parametrized tests, mocks, containers, Kubernetes). From 64c0c3b02b922a854e77683932310deb0e6c81a6 Mon Sep 17 00:00:00 2001 From: patree Date: Thu, 30 Mar 2023 23:55:51 -0500 Subject: [PATCH 2/2] Added tip for testable code with diagrams --- tip-from-patimejia.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tip-from-patimejia.md b/tip-from-patimejia.md index 44b6976..7a9db95 100644 --- a/tip-from-patimejia.md +++ b/tip-from-patimejia.md @@ -1,7 +1,8 @@ # Code Quality Tips -Best Practices for Reliable Test-Driven Code: Linters, Microservices, and Docker to Avoid 'Works on My Computer' Issues +Best Practices for Reliable Test-Driven Code: Linters, Microservices, and Docker to Avoid "Works on My Computer" Issues -1. Use linters and automated testing to ensure quality code (e.g. Flake8, Pylint, `pytest`). -1. Break code into microservices for easier testing and maintenance (e.g. REST APIs, AWS Lambda). -1. Test microservices with Pytest and `fixtures`, and use Docker for reliable testing/deployment (e.g. parametrized tests, mocks, containers, Kubernetes). +1. Use linters and automated testing to ensure quality code (e.g. Flake8, Pylint, `pytest`). +1. Break code into microservices for easier testing and maintenance (e.g. REST APIs, AWS Lambda). +1. Test microservices with Pytest and `fixtures`, and use Docker for reliable testing/deployment (e.g. parametrized tests, mocks, containers, Kubernetes). +1. Create sequence diagrams (or **DAGs**) to visualize how different parts of the code interact with each other.