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
22 changes: 22 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: sunday
time: "13:15"
timezone: Europe/Amsterdam
open-pull-requests-limit: 10
commit-message:
prefix: "build"
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"
day: sunday
time: "13:00"
timezone: Europe/Amsterdam
open-pull-requests-limit: 10
commit-message:
prefix: "build"
9 changes: 7 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ on:

jobs:
ci:
strategy:
matrix:
python-version: ["3.10", "3.14"]
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync --locked --dev
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ dist/
main.spec
.coverage
coverage.xml
.python-version
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

2 changes: 1 addition & 1 deletion codelimit/common/GithubRepository.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class GithubRepository:
owner: str
name: str
branch: str | None = None
branch: str
tag: str | None = None

def __str__(self) -> str:
Expand Down
15 changes: 8 additions & 7 deletions codelimit/common/Scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
from pathlib import Path
from typing import Union, Callable

from pathspec import PathSpec
from pygments.lexer import Lexer
from pygments.lexers import get_lexer_for_filename
from pygments.util import ClassNotFound
from rich import print
from rich.live import Live

from codelimit.common.Codebase import Codebase
from codelimit.common.Configuration import Configuration
from codelimit.common.Language import Language
Expand All @@ -29,6 +22,12 @@
calculate_checksum,
)
from codelimit.languages import Languages
from pathspec import PathSpec
from pygments.lexer import Lexer
from pygments.lexers import get_lexer_for_filename
from pygments.util import ClassNotFound
from rich import print
from rich.live import Live

locale.setlocale(locale.LC_ALL, "")

Expand Down Expand Up @@ -205,4 +204,6 @@ def is_excluded(path: Path, spec: PathSpec):
"venv",
"test",
"tests",
"acceptancetests",
"integrationtests"
]
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "codelimit"
version = "0.20.2"
description = "Your Refactoring Alarm"
authors = [{ name = "Rob van der Leek", email = "robvanderleek@gmail.com" }]
requires-python = ">=3.10,<3.14"
requires-python = ">=3.10,<3.15"
readme = "README.md"
license = "GPL-3.0-or-later"
dependencies = [
Expand All @@ -14,7 +14,7 @@ dependencies = [
"pyperclip>=1.9.0,<2",
"pyyaml>=6.0.1,<7",
"requests>=2.28.2,<3",
"rich>=13.7.1,<14",
"rich>=14.2.0",
"sh>=2.1.0,<3",
"typer>=0.16.0",
]
Expand All @@ -29,15 +29,14 @@ codelimit = "codelimit.__main__:cli"

[dependency-groups]
dev = [
"pyinstaller~=6.0 ; python_version >= '3.8' and python_version < '3.14'",
"pytest-cov>=4.0.0,<5",
"pytest>=7.2.1,<8",
"poethepoet>=0.21.1,<0.22",
"types-pyyaml>=6.0.12.20240917,<7",
"mypy>=1.13.0,<2",
"black>=24.10.0,<25",
"ruff>=0.8.2,<0.9",
"python-semantic-release>=9.21.0",
"pyinstaller>=6.16.0",
]

[build-system]
Expand Down
2 changes: 1 addition & 1 deletion tests/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def compare_reports(r1: Report, r2: Report) -> bool:
def run_repo(report_dir: Path) -> bool:
result = True
repo_parts = report_dir.name.split('_')
repo = GithubRepository(repo_parts[0], repo_parts[1], tag=repo_parts[2])
repo = GithubRepository(repo_parts[0], repo_parts[1], repo_parts[2], tag=repo_parts[2])
info(f'Scanning {repo}')
new_report = scan_repo(repo)
old_report = load_report(report_dir)
Expand Down
465 changes: 50 additions & 415 deletions uv.lock

Large diffs are not rendered by default.