Module 2: Advanced Python¶
This module focuses on writing clean, professional-grade Python code and introduces the fundamental concepts of data engineering.
Advanced Python & Unit Testing¶
Session 1: With our environment ready in a DevContainer, We'll explore advanced Python features that lead to cleaner, more maintainable code. Topics include type hints for improved static analysis, writing clear docstrings, and using Pydantic for robust data validation.
Session 2: This session is a deep dive into functional code design. We'll discuss how to organize code into reusable modules and classes. We'll also cover concepts like pure functions and higher-order functions and show how to apply them to build elegant and predictable code. We will also discuss object-oriented design patterns.
Unit Testing and Validation¶
Session 3: This session is all about writing high-quality, testable code. We'll introduce unit testing and practice writing tests for a Python application using the pytest framework. We'll emphasize the principles of test-driven development (TDD) to build features that are robust from the start.
Session 4: We'll focus on data validation and error handling. Students will learn how to write tests that specifically challenge Pydantic models to ensure that incoming data is always correctly formatted. We'll also cover best practices for creating custom validation logic.