Skip to content

Getting Started

Bosaj edited this page Aug 23, 2026 · 2 revisions

Getting Started

Prerequisites

  • Python 3.12
  • Poetry (for tp2 and tp4, which manage dependencies via pyproject.toml)
  • Docker & Docker Compose (for tp5)
  • DVC and MLflow (for tp7)
  • A Jenkins instance and a SonarQube server if you want to exercise tp3/tp4 beyond their pytest suites — these are reference/integration pieces, not required to run the code itself

There is no single project-wide requirements.txt: each lab pins or documents its own dependencies (pyproject.toml for tp2/tp4, requirements.txt for tp5, plain pip install commands for tp7).

Running each lab

# tp2 - pytest suite (unit / integration / functional)
cd tp2 && poetry install && poetry run pytest -v --cov=src

# tp4 - SonarQube-scanned calculator
cd tp4/test-sonarqube && poetry install && poetry run pytest -v --cov=src

# tp5 - Flask + Docker web app
cd tp5 && pip install -r requirements.txt && python app.py
# or: docker-compose up --build

# tp7 - DVC + MLflow pipeline
cd tp7/tp-dvc-mlflow && pip install pandas scikit-learn mlflow joblib pyyaml && dvc repro

tp1_git_intro is a plain Git exercise (no code to run). tp3/Jenkinsfile documents a pipeline meant for a self-hosted Jenkins runner rather than something you execute locally. tp6 is a written Kubernetes lab specification (minikube, kubectl, namespaces and pods) — reference material, not an implemented lab.

How CI validates the project

.github/workflows/ci.yml runs on every push to main and does three things:

  1. Executes the real tp2 pytest suite (unit, integration, functional).
  2. Executes the real tp4 pytest suite for the SonarQube-scanned Calculator module.
  3. Runs a Python syntax/import sanity check across the remaining labs (tp1, tp5, tp7) that don't have their own automated test suite in CI.

CI does not spin up Jenkins, SonarQube, Docker, or a Kubernetes cluster — those require live infrastructure this repository doesn't ship. tp3/Jenkinsfile and the SonarQube scan config in tp4 document how those pieces would run against a real server.

Clone this wiki locally