Skip to content

Commit 0bf7ab2

Browse files
committed
chore: bump version to 1.6.0
Major release featuring: - Smart file grouping with semantic analysis - Migration from Poetry to UV package manager - Improved test coverage (74%) - Enhanced CI/CD pipeline
1 parent 32c6bab commit 0bf7ab2

31 files changed

+1845
-988
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -11,94 +11,64 @@ jobs:
1111
name: Lint
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515

1616
- name: Set up Python
17-
uses: actions/setup-python@v4
17+
uses: actions/setup-python@v5
1818
with:
1919
python-version: "3.11"
2020

21-
- name: Install Poetry
22-
uses: snok/install-poetry@v1
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v3
2323
with:
24-
version: 1.7.1
25-
virtualenvs-create: true
26-
virtualenvs-in-project: true
27-
28-
- name: Load cached venv
29-
id: cached-poetry-dependencies
30-
uses: actions/cache@v3
31-
with:
32-
path: .venv
33-
key: venv-${{ runner.os }}-3.11-${{ hashFiles('**/poetry.lock') }}
24+
enable-cache: true
25+
cache-dependency-glob: "pyproject.toml"
3426

3527
- name: Install dependencies
36-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
37-
run: poetry install --no-interaction --no-root
38-
39-
- name: Install project
4028
run: |
41-
poetry install --no-interaction
42-
poetry run pip install -e .
43-
29+
uv sync --all-extras --dev
30+
4431
- name: Check code formatting
4532
run: |
46-
source .venv/bin/activate
47-
poetry run ruff format .
33+
uv run ruff format --check .
4834
4935
- name: Run linter
5036
run: |
51-
source .venv/bin/activate
52-
poetry run ruff check .
37+
uv run ruff check .
5338
5439
- name: Type check
5540
run: |
56-
source .venv/bin/activate
57-
poetry run mypy commitloom tests
41+
uv run mypy commitloom tests
5842
5943
test:
6044
name: Test
6145
runs-on: ubuntu-latest
6246
strategy:
6347
matrix:
64-
python-version: ["3.11"]
48+
python-version: ["3.10", "3.11", "3.12"]
6549
steps:
66-
- uses: actions/checkout@v3
50+
- uses: actions/checkout@v4
6751

6852
- name: Set up Python ${{ matrix.python-version }}
69-
uses: actions/setup-python@v4
53+
uses: actions/setup-python@v5
7054
with:
7155
python-version: ${{ matrix.python-version }}
7256

73-
- name: Install Poetry
74-
uses: snok/install-poetry@v1
57+
- name: Install uv
58+
uses: astral-sh/setup-uv@v3
7559
with:
76-
version: 1.7.1
77-
virtualenvs-create: true
78-
virtualenvs-in-project: true
79-
80-
- name: Load cached venv
81-
id: cached-poetry-dependencies
82-
uses: actions/cache@v3
83-
with:
84-
path: .venv
85-
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
60+
enable-cache: true
61+
cache-dependency-glob: "pyproject.toml"
8662

8763
- name: Install dependencies
88-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
89-
run: poetry install --no-interaction --no-root
90-
91-
- name: Install project
9264
run: |
93-
poetry install --no-interaction
94-
poetry run pip install -e .
65+
uv sync --all-extras --dev
9566
9667
- name: Run tests
9768
env:
9869
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
9970
run: |
100-
source .venv/bin/activate
101-
poetry run pytest --cov=commitloom --cov-report=xml
71+
uv run pytest --cov=commitloom --cov-report=xml
10272
10373
- name: Upload coverage to Codecov
10474
uses: codecov/codecov-action@v5
@@ -110,22 +80,22 @@ jobs:
11080
name: Build Package
11181
runs-on: ubuntu-latest
11282
steps:
113-
- uses: actions/checkout@v3
83+
- uses: actions/checkout@v4
11484

11585
- name: Set up Python
116-
uses: actions/setup-python@v4
86+
uses: actions/setup-python@v5
11787
with:
11888
python-version: "3.11"
11989

120-
- name: Install Poetry
121-
uses: snok/install-poetry@v1
90+
- name: Install uv
91+
uses: astral-sh/setup-uv@v3
12292
with:
123-
version: 1.7.1
124-
virtualenvs-create: true
125-
virtualenvs-in-project: true
93+
enable-cache: true
94+
cache-dependency-glob: "pyproject.toml"
12695

12796
- name: Build package
128-
run: poetry build
97+
run: |
98+
uv build
12999
130100
- name: Check dist contents
131101
run: |

.github/workflows/manual-publish.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@ jobs:
2323
- name: Set up Python
2424
uses: actions/setup-python@v5
2525
with:
26-
python-version: "3.10"
27-
- name: Install Poetry
28-
run: |
29-
python -m pip install --upgrade pip
30-
pip install poetry
26+
python-version: "3.11"
27+
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@v3
30+
with:
31+
enable-cache: true
3132

3233
- name: Verify version matches
3334
run: |
34-
VERSION=$(grep -m 1 "version = " pyproject.toml | sed 's/version = "\(.*\)"/\1/')
35+
VERSION=$(grep -m 1 "^version = " pyproject.toml | sed 's/version = "\(.*\)"/\1/')
3536
echo "Version in pyproject.toml: $VERSION"
3637
echo "Version requested: ${{ github.event.inputs.version }}"
3738
if [ "$VERSION" != "${{ github.event.inputs.version }}" ]; then
@@ -40,9 +41,10 @@ jobs:
4041
fi
4142
4243
- name: Install dependencies
43-
run: poetry install --no-root
44-
- name: Build package (poetry)
45-
run: poetry build
44+
run: uv sync --all-extras --dev
45+
46+
- name: Build package (uv)
47+
run: uv build
4648

4749
- name: Verify distribution files
4850
run: |
@@ -61,9 +63,9 @@ jobs:
6163
echo "Waiting for PyPI to index the package..."
6264
sleep 30
6365
64-
# Use pip to verify the version is available
65-
poetry run pip install commitloom==${{ github.event.inputs.version }} --no-deps
66-
INSTALLED_VERSION=$(poetry run python -c "import commitloom; print(commitloom.__version__)")
66+
# Use uv to verify the version is available
67+
uv pip install commitloom==${{ github.event.inputs.version }} --no-deps
68+
INSTALLED_VERSION=$(uv run python -c "import commitloom; print(commitloom.__version__)")
6769
6870
echo "Installed version: $INSTALLED_VERSION"
6971
if [ "$INSTALLED_VERSION" == "${{ github.event.inputs.version }}" ]; then

.github/workflows/publish.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Get version from pyproject.toml
3535
id: get-version
3636
run: |
37-
VERSION=$(grep -m 1 "version = " pyproject.toml | sed 's/version = "\(.*\)"/\1/')
37+
VERSION=$(grep -m 1 "^version = " pyproject.toml | sed 's/version = "\(.*\)"/\1/')
3838
echo "version=$VERSION" >> $GITHUB_OUTPUT
3939
echo "Current version: $VERSION"
4040
@@ -71,11 +71,14 @@ jobs:
7171
with:
7272
python-version: "3.11"
7373

74+
- name: Install uv
75+
uses: astral-sh/setup-uv@v3
76+
with:
77+
enable-cache: true
78+
7479
- name: Build release distributions
7580
run: |
76-
python -m pip install --upgrade pip
77-
python -m pip install build
78-
python -m build
81+
uv build
7982
8083
- name: Upload distributions
8184
uses: actions/upload-artifact@v4

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
# Changelog
22

3+
## [1.6.0] - 2025-08-21
4+
5+
### ✨ Features
6+
- **Smart File Grouping**: Intelligent semantic analysis for grouping related files in commits
7+
- Detects relationships between test files and their implementations
8+
- Identifies component pairs (e.g., .tsx and .css files)
9+
- Groups files by change type (feature, fix, test, docs, etc.)
10+
- Analyzes file dependencies and imports
11+
- CLI option `-s/--smart-grouping` (enabled by default)
12+
13+
### 🚀 Improvements
14+
- **Migration from Poetry to UV**: Complete build system overhaul
15+
- 10-100x faster dependency installation
16+
- Simplified configuration using PEP 621 standard
17+
- Improved CI/CD pipeline performance
18+
- Better cache management
19+
- Updated all GitHub Actions workflows
20+
21+
### 📦 Build System
22+
- Migrated from Poetry to UV package manager
23+
- Updated pyproject.toml to PEP 621 format
24+
- Added Dockerfile with UV support
25+
- Updated CI/CD workflows for UV compatibility
26+
27+
### 📚 Documentation
28+
- Updated CONTRIBUTING.md with UV instructions
29+
- Added comprehensive tests for smart grouping feature
30+
- Improved code coverage to 74%
31+
32+
### 🧪 Tests
33+
- Added comprehensive test suite for smart grouping
34+
- All 133 tests passing
35+
- Code coverage increased from 68% to 74%
36+
337
## [1.5.6] - 2025-08-21
438

539
### ✨ Features

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@ If you have a suggestion for the project, I'd love to hear it! Enhancement sugge
4949
cd commitloom
5050
```
5151

52-
2. Install Poetry (if not already installed):
52+
2. Install uv (if not already installed):
5353
```bash
54-
curl -sSL https://install.python-poetry.org | python3 -
54+
curl -LsSf https://astral.sh/uv/install.sh | sh
5555
```
5656

5757
3. Install dependencies:
5858
```bash
59-
poetry install
59+
uv sync --all-extras --dev
6060
```
6161

62-
4. Set up pre-commit hooks:
62+
4. Set up pre-commit hooks (if available):
6363
```bash
64-
poetry run pre-commit install
64+
uv run pre-commit install
6565
```
6666

6767
## Style Guide
@@ -98,8 +98,8 @@ def process_data(input_data: List[str], max_items: Optional[int] = None) -> List
9898

9999
- All new features should include tests
100100
- Maintain or improve test coverage
101-
- Run tests with: `poetry run pytest`
102-
- Check coverage with: `poetry run pytest --cov`
101+
- Run tests with: `uv run pytest`
102+
- Check coverage with: `uv run pytest --cov`
103103

104104
## Documentation
105105

Dockerfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Multi-stage build for optimal image size
2+
FROM python:3.11-slim as builder
3+
4+
# Install uv
5+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
6+
7+
# Set working directory
8+
WORKDIR /app
9+
10+
# Copy dependency files
11+
COPY pyproject.toml ./
12+
13+
# Create virtual environment and install dependencies
14+
RUN uv venv .venv && \
15+
. .venv/bin/activate && \
16+
uv pip install -e .
17+
18+
# Final stage
19+
FROM python:3.11-slim
20+
21+
# Set working directory
22+
WORKDIR /app
23+
24+
# Copy virtual environment from builder
25+
COPY --from=builder /app/.venv /app/.venv
26+
27+
# Copy application code
28+
COPY commitloom/ ./commitloom/
29+
COPY pyproject.toml ./
30+
31+
# Set environment variables
32+
ENV PATH="/app/.venv/bin:$PATH"
33+
ENV PYTHONUNBUFFERED=1
34+
35+
# Create a non-root user
36+
RUN useradd -m -u 1000 appuser && \
37+
chown -R appuser:appuser /app
38+
39+
USER appuser
40+
41+
# Entry point
42+
ENTRYPOINT ["python", "-m", "commitloom"]

commitloom/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from .core.git import GitError, GitFile, GitOperations
66
from .services.ai_service import AIService, CommitSuggestion, TokenUsage
77

8-
__version__ = "1.5.6"
8+
__version__ = "1.6.0"
99
__author__ = "Petru Arakiss"
1010
__email__ = "petruarakiss@gmail.com"
1111

0 commit comments

Comments
 (0)