Skip to content
QA ATLAS Releasestrategy QA LVL1 Basechecks

QA ATLAS Releasestrategy QA LVL1 Basechecks

Andi Lamprecht Andi Lamprecht ·· 2 min read· Accepted
ADR-0039 · Author: Sybil Melton · Date: 2025-02-07 · Products: platform
Originally ADR-0048 QA_ATLAS-ReleaseStrategy-QA-LVL1-BaseChecks (v7) · Source on Confluence ↗

Release Strategy - QA - Level 1 - Base Checks

Context

The quality assurance process at this level encompasses a well-structured strategy for rapid and automated code validation that is executed with every commit. This critical phase of development incorporates a trio of essential checks:

Python Linting Checks

In this phase, our code undergoes meticulous scrutiny to ensure adherence to Python’s best practices and coding conventions. Linting tools identify potential issues, style violations facilitating cleaner and more maintainable code.

Python Formatting Checks

Consistency in code formatting is paramount for readability and collaboration. These checks ensure that the codebase adheres to a predefined formatting standard, enhancing code uniformity and making it easier for developers to collaborate seamlessly.

Airflow Dags Sanity Checks

A specific group of checks that monitors following properties of Airflow dags:

  • check if the dag is parsable by an Airflow
  • check if the dag load time does not violate the set threshold

Unit Tests

Rigorous unit tests are a cornerstone of robust software development. At this stage, the code is rigorously examined through a battery of unit tests, verifying that each component functions as intended in isolation. This practice aids in early bug detection, accelerates debugging, and provides confidence in the reliability of the software.

Among the unit tests the two most common groups emerges:

  • Airflow Operators Unit tests

Custom Airflow operators define specific tasks within a workflow, and unit tests for these operators validate their functionality in isolation. These tests help ensure that each operator performs its designated task correctly and reliably, contributing to the overall success of data pipelines and workflow automation.

  • Pyspark transformations unit tests

While performing data transformation within spark, a recommended path is to chain .transform(<function>) method on a single dataframe, instead of re-assigning the results on sequential transformations into new variable.

example:

result_df = df \
    .transform(transform_function1) \
    .transform(transform_function2) \
    .transform(transform_function3)

Chaining transformations encourages the creation of small, focused transformation functions. This modularity makes it easier to write unit tests for individual transformation functions, ensuring that each part of your data pipeline behaves as expected. Unit tests should cover all of those functions.

Main goals of this test level

Base Checks bolster the development pipeline by promoting code quality, maintainability, and reliability, setting the stage for subsequent stages of development.

This test level gives an answer to the questions:

Is the code maintainable?
Do the building blocks of the system, such as small functions and methods, behave as expected?
Last updated on