Good Python Practices
In this session, you will learn some simple yet important practices that you should follow to improve the quality of your Python code. First, you will discover the guidelines for formatting Python code and how to keep it clean and help other developers (including your future self) to understand it more easily. Next, you will learn how to use logging to keep track of what your code is doing while you are not over the screen to supervise it, including how to send mail notifications to yourself e.g., when something fails or your script stops unexpectedly. Finally, you will learn about unit tests and how they can help you validate that your code works as expected.
If you want to practice the things that will be shown in your own machine please follow the preparation steps.
Install the following:
- Python3 (https://www.python.org/downloads/)
- Jupyter lab (https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html)
- Jupyter lab code formatter (https://jupyterlab-code-formatter.readthedocs.io/en/latest/index.html)
To get this code:
- Install git (https://www.atlassian.com/git/tutorials/install-git)
git clone https://github.com/MaryGeorgiou/python_good_practices.git
or you can download it as zip (https://github.com/MaryGeorgiou/python_good_practices/archive/master.zip)