Skip to content

Conversation

@A-Artemis
Copy link
Contributor

@A-Artemis A-Artemis commented Jan 6, 2026

Summary

Added contracts:

  • App Main Vertical (main_app) - Enforces layered architecture: api → services → repositories → db. Ensures proper dependency flow from presentation to data layer.

  • Internal API (api) - Controls API module structure: routers → serializers → schemas → dependencies. Keeps API concerns properly separated.

  • Core Module (core_module) - Layers within core: jobs → run → models → logging. Ensures core utilities don't have circular dependencies.

  • Schema-Model (schema_model) - Ensures app.schemas sits above both app.core.models and app.models. Prevents schema layer from being imported by model layers.

  • Service-Utils (service_utils) - services → utils. Utilities should be lower-level, imported by services but not vice versa.

How to test

uv run lint-imports

image

Checklist

  • The PR title and description are clear and descriptive
  • I have manually tested the changes
  • All changes are covered by automated tests
  • All related issues are linked to this PR (if applicable)
  • Documentation has been updated (if applicable)

@A-Artemis A-Artemis self-assigned this Jan 6, 2026
Copilot AI review requested due to automatic review settings January 6, 2026 12:15
@A-Artemis A-Artemis requested review from a team as code owners January 6, 2026 12:15
@github-actions github-actions bot added DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM BUILD Geti Tune Backend Issues related to Geti Tune backend labels Jan 6, 2026
@A-Artemis A-Artemis linked an issue Jan 6, 2026 that may be closed by this pull request
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds import linting to enforce architectural boundaries and dependency rules in the backend codebase using import-linter. It establishes five contracts that prevent circular dependencies and maintain proper layering between modules.

Key Changes:

  • Added import-linter as a dev dependency and configured five architectural contracts
  • Integrated import-linter into pre-commit hooks and CI/CD pipeline
  • Added cache file to .gitignore

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

File Description
application/backend/pyproject.toml Added import-linter dependency and configured five architectural contracts (main_app, api, core_module, schema_model, service_utils)
application/backend/.pre-commit-config.yaml Added import-linter pre-commit hook with --no-cache flag
application/backend/.gitignore Added .import_linter_cache to ignored files
.github/workflows/backend-lint-and-test.yaml Added import-linter check step to CI pipeline

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

📊 Test coverage report

Metric Coverage
Lines 40.7%
Functions 36.0%
Branches 86.4%
Statements 40.7%

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Docker Image Sizes

CPU

Image Size
geti-tune-cpu:pr-5134 2.85G
geti-tune-cpu:sha-50c2821 2.85G

GPU

Image Size
geti-tune-gpu:pr-5134 10.62G
geti-tune-gpu:sha-50c2821 10.62G

XPU

Image Size
geti-tune-xpu:pr-5134 8.69G
geti-tune-xpu:sha-50c2821 8.69G

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@leoll2 leoll2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice setup, only one suggestion

@A-Artemis A-Artemis enabled auto-merge January 6, 2026 12:51
@A-Artemis A-Artemis added this pull request to the merge queue Jan 6, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 6, 2026
@A-Artemis A-Artemis added this pull request to the merge queue Jan 6, 2026
Merged via the queue into develop with commit 20ee779 Jan 6, 2026
45 checks passed
@A-Artemis A-Artemis deleted the aurelien/import-linters branch January 6, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BUILD DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM Geti Tune Backend Issues related to Geti Tune backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup linter for import constraints

5 participants