Skip to content

MPT-17674: propagate-changes-from-template#39

Merged
d3rky merged 1 commit intomainfrom
MPT-17674-propagate-changes-from-template
Feb 13, 2026
Merged

MPT-17674: propagate-changes-from-template#39
d3rky merged 1 commit intomainfrom
MPT-17674-propagate-changes-from-template

Conversation

@svazquezco
Copy link
Collaborator

@svazquezco svazquezco commented Feb 13, 2026

Closes MPT-17674

  • .editorconfig: enforce tab indentation for Makefile and *.mk files
  • .pre-commit-config.yaml: normalize package names to lowercase and reorder flake8-related entries
  • Replace legacy Makefile with a modular Makefile system:
    • New top-level Makefile dynamically includes make/*.mk fragments, auto-generates .PHONY targets, adds a require helper macro, and sets default goal to help
    • Added make/common.mk: Docker Compose-based development workflow and targets (build, test, check, check-all, format, run, bash, shell) and uv dependency management (uv-add, uv-add-dev, uv-upgrade)
    • Added make/external_tools.mk: review target (CodeRabbit)
    • Added make/repo.mk: placeholder for repo-specific targets
    • Removed old legacy makefile (full deletion) and migrated functionality into the new modular layout
  • Dockerfile refactor:
    • Replace VIRTUAL_ENV usage with UV_PROJECT_ENVIRONMENT and preserve PATH
    • Adjust build stage (COPY . . and uv sync --no-dev), add dev stage (uv sync --dev), and add prod stage that removes tests, creates appuser, sets UV_CACHE_DIR and switches to non-root user
  • README.md: reorganized into a setup-first guide with explicit Makefile structure, setup workflow, developer utilities, and configuration section (env vars)
  • docs/PROJECT_DESCRIPTION.md: add pre-commit snippets showing how to check migrations
  • pyproject.toml: minor Ruff config cleanup (remove docstring-code-format setting)

@svazquezco svazquezco requested a review from a team as a code owner February 13, 2026 13:04
@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

Introduces a modular include-based Makefile and multiple new make fragments, removes the old flat makefile, adds containerized make targets, updates Dockerfile to multi-stage dev/prod with non-root user, restructures README and docs, and tweaks editor, pre-commit, and ruff settings.

Changes

Cohort / File(s) Summary
Makefile orchestration
Makefile, make/*.mk
Adds top-level Makefile that -includes make/*.mk, sets default goal to help, adds MK_FILES discovery, dynamic .PHONY and require macro; introduces new modular make fragments.
Make fragments / targets
make/common.mk, make/external_tools.mk, make/repo.mk
Adds make/common.mk with DC, RUN, RUN_IT variables and many containerized targets (bash, build, check, test, uv-add/uv-upgrade, etc.); adds review target in make/external_tools.mk; placeholder comment in make/repo.mk.
Removed flat makefile
makefile
Deletes previous flat makefile containing older DC variable and all phony targets (bash, build, check, test, run, help, review, etc.).
Docker build/runtime
Dockerfile
Converts build to use UV_PROJECT_ENVIRONMENT, adds COPY ., sync behaviors (--no-dev/--dev), introduces dev and prod stages, creates non-root appuser in prod, removes tests/ in prod, sets cache dir and ownership, and sets default CMD/user.
Documentation
README.md, docs/PROJECT_DESCRIPTION.md
README restructured into setup-first workflow, documents modular Makefile layout and developer utilities; PROJECT_DESCRIPTION adds pre-commit migration snippets.
Config / tooling
.editorconfig, .pre-commit-config.yaml, pyproject.toml
Adds EditorConfig section for Makefiles (tabs); normalizes two flake8 package names (lowercased/reordered) in pre-commit; removes docstring-code-format setting under tool.ruff.format.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main
Jira Issue Key In Title ✅ Passed PR title contains exactly one Jira issue key MPT-17674 in the correct MPT-XXXX format.
Test Coverage Required ✅ Passed PR modifies only infrastructure, configuration, and documentation files—no application source code files are changed, so test coverage requirement does not apply.
Single Commit Required ✅ Passed The pull request contains exactly one commit with message 'feat: propagate-changes-from-template', maintaining clean git history.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


No actionable comments were generated in the recent review. 🎉


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@docs/PROJECT_DESCRIPTION.md`:
- Around line 343-354: Pre-commit YAML example has incorrect indentation for the
hooks list item; update the snippet in PROJECT_DESCRIPTION.md so the "-   id:
check-migrations" entry is nested under "hooks:" (i.e., indent the list item to
align as a child of hooks:), ensure the "repo:", "rev:", and "hooks:" keys
remain left-aligned as shown and the dash for the hook list is indented to be
under hooks: in the .pre-commit-config.yaml example.

In `@make/common.mk`:
- Around line 31-39: The uv-add and uv-add-dev targets call $(call require,pkg)
but no require function is defined; add a small Makefile function named require
that checks a variable is non-empty and prints an error/returns non-zero if
missing (so calls like $(call require,pkg) validate pkg), or alternatively
remove the $(call require,pkg) invocations and inline a conditional check in the
uv-add and uv-add-dev targets to error out when $(pkg) is empty; reference the
existing targets uv-add and uv-add-dev and implement the require function (or
replace its usage) to ensure the pkg parameter is validated before running uv
add and $(MAKE) build.

In `@README.md`:
- Around line 44-69: The README contains an incomplete sentence "In the project
root, create and configure the following files." in the Setup section; either
remove that sentence entirely or replace it with a concrete list of files and
brief descriptions (e.g., .env, docker-compose.yml, config/*.json) so readers
know what to create/configure—look for the exact sentence text to update in the
README's Setup section and implement one of those two fixes.
🧹 Nitpick comments (1)
make/common.mk (1)

1-3: Consider adding .PHONY declaration for all targets.

All targets in this file are phony (they don't create files). Adding a .PHONY declaration prevents unexpected behavior if a file with the same name as a target is ever created.

♻️ Suggested addition at the top of the file
+.PHONY: bash build check check-all down format run shell test uv-add uv-add-dev uv-upgrade
+
 DC = docker compose -f compose.yaml
 RUN = $(DC) run --rm app
 RUN_IT = $(DC) run --rm -it app

@svazquezco svazquezco force-pushed the MPT-17674-propagate-changes-from-template branch from 6888d15 to 064eb9e Compare February 13, 2026 13:31
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@README.md`:
- Line 65: The README contains a broken link to "#configuration"; update that
link so it points to the existing configuration section or add a local heading:
either change the anchor to "docs/PROJECT_DESCRIPTION.md#configuration" wherever
the `.env` edit instruction references the Configuration section, or add a
top-level "## Configuration" heading in README (with the same content or a short
pointer to docs/PROJECT_DESCRIPTION.md) so the existing `#configuration` link
resolves correctly.

@svazquezco svazquezco force-pushed the MPT-17674-propagate-changes-from-template branch from 064eb9e to b640887 Compare February 13, 2026 13:57
@sonarqubecloud
Copy link

@d3rky d3rky merged commit 11306ca into main Feb 13, 2026
4 of 5 checks passed
@d3rky d3rky deleted the MPT-17674-propagate-changes-from-template branch February 13, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants