From 9b7872c8c3786ccf29d488fd3beb16d895c7c4c3 Mon Sep 17 00:00:00 2001 From: Andrew Huynh Date: Fri, 22 Aug 2025 14:39:34 -0700 Subject: [PATCH] Enhance documentation for pre-commit hook setup and performance - Added detailed instructions for setting up the pre-commit hook to run DataPilot checks on dbt projects. - Included a sample configuration for the `.pre-commit-config.yaml` file. - Expanded the performance section to emphasize the importance of efficiency in the pre-commit hook's operation. --- docs/performance.rst | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/performance.rst b/docs/performance.rst index dea38c34..6f258470 100644 --- a/docs/performance.rst +++ b/docs/performance.rst @@ -1,9 +1,29 @@ =============================== -Performance of Pre-commit Hook +Pre-commit Hook =============================== Overview -------- +You can use the pre-commit hook to run DataPilot checks on your dbt project. Do this by following the instructions below: + +1. Install pre-commit (https://pre-commit.com/#install) +2. Create a file in the root of the project ``.pre-commit-config.yaml`` +3. Add to that file this below: +4. Run ``pre-commit run --all-files`` to test it out + +.. code-block:: yaml + + repos: + - repo: https://github.com/AltimateAI/datapilot-cli + rev: v0.0.27 + hooks: + - id: datapilot_run_dbt_checks + args: [--config-name, "[The Config Name in the SaaS UI]", --token, "[YOUR API KEY]", --instance-name, "[Your tenant name]"] + + +Performance +----------- + The primary objective is to ensure the pre-commit hook operates swiftly and efficiently, preventing any delay in the development workflow. To achieve this, various optimizations have been applied, focusing on minimizing the time and resources required during execution. Optimizations