Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: end-of-file-fixer
exclude: (^|/)requirements.*\.txt$
Expand All @@ -9,13 +9,13 @@ repos:
- id: check-added-large-files

- repo: https://github.com/psf/black
rev: 25.1.0
rev: 25.9.0
hooks:
- id: black
language_version: python3

- repo: https://github.com/PyCQA/isort
rev: 6.0.1
rev: 6.1.0
hooks:
- id: isort
name: isort (python import sort)
Expand Down
10 changes: 6 additions & 4 deletions setup.bat → setup.cmd
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
@echo off

IF NOT EXIST .venv (
echo "Creating Python virtual environment..."
python -m venv .venv
)

CALL .venv\Scripts\activate.bat

pip install --upgrade pip

echo "Installing pre-commit and setting up hooks..."
pip install pre-commit
pre-commit install

IF EXIST requirements.txt (
echo "Installing dependencies from requirements.txt..."
pip install -r requirements.txt
)

pre-commit install

ECHO Setup complete
echo "Dependencies installed and pre-commit hooks configured."
21 changes: 21 additions & 0 deletions setup.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$ErrorActionPreference = "Stop"
Set-StrictMode -Version Latest

if (-not (Test-Path ".venv")) {
Write-Host "Creating Python virtual environment..." -ForegroundColor Yellow
python -m venv .venv
}

. .\.venv\Scripts\Activate.ps1
pip install --upgrade pip

Write-Host "Installing pre-commit and setting up hooks..." -ForegroundColor Yellow
pip install pre-commit
pre-commit install

if (Test-Path "requirements.txt") {
Write-Host "Installing dependencies from requirements.txt..." -ForegroundColor Yellow
pip install -r requirements.txt
}

Write-Host "Dependencies installed and pre-commit hooks configured." -ForegroundColor Green
12 changes: 7 additions & 5 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
#!/bin/bash

set -e
set -euo pipefail

if [ ! -d ".venv" ]; then
echo "Creating Python virtual environment..."
python3 -m venv .venv
fi

source .venv/bin/activate

pip install --upgrade pip

echo "Installing pre-commit and setting up hooks..."
pip install pre-commit
pre-commit install

if [ -f "requirements.txt" ]; then
echo "Installing dependencies from requirements.txt..."
pip install -r requirements.txt
fi

pre-commit install

echo "Setup complete"
echo "Dependencies installed and pre-commit hooks configured."
Loading