Skip to content

Commit ce33b91

Browse files
committed
simplify: streamline CI/CD pipeline to Python 3.11 only
- Remove Python 3.8 compatibility workflow and requirements - Simplify code quality workflow to use single Python 3.11 version - Update pyproject.toml configurations to target Python 3.11 - Reduce CI complexity while maintaining code quality checks
1 parent b42f468 commit ce33b91

5 files changed

Lines changed: 20 additions & 120 deletions

File tree

.github/workflows/code-quality.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,41 @@ on:
99
jobs:
1010
code-quality:
1111
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
1512

1613
steps:
1714
- uses: actions/checkout@v4
1815

19-
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v4
16+
- name: Set up Python 3.11
17+
uses: actions/setup-python@v5
2118
with:
22-
python-version: ${{ matrix.python-version }}
19+
python-version: '3.11'
20+
21+
- name: Cache pip dependencies
22+
uses: actions/cache@v4
23+
with:
24+
path: ~/.cache/pip
25+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
26+
restore-keys: |
27+
${{ runner.os }}-pip-
2328
2429
- name: Install dependencies
2530
run: |
2631
python -m pip install --upgrade pip
27-
pip install black flake8 mypy isort
32+
pip install black flake8 mypy isort types-requests
2833
pip install -r requirements.txt
2934
3035
- name: Run Black (Code Formatting)
31-
run: black --check --diff .
36+
run: black --check --diff . --exclude="/(build|dist|venv|env|\.venv|\.env|\.git|\.mypy_cache|\.pytest_cache|\.tox)/"
3237

3338
- name: Run isort (Import Sorting)
34-
run: isort --check-only --diff .
39+
run: isort --check-only --diff . --skip-glob="**/build/**" --skip-glob="**/dist/**" --skip-glob="**/venv/**" --skip-glob="**/.venv/**"
3540

3641
- name: Run Flake8 (Linting)
37-
run: flake8 . --max-line-length=88 --ignore=E203,W503 --exclude=.venv,venv,__pycache__,.git
42+
run: flake8 . --max-line-length=88 --ignore=E203,W503 --exclude=.venv,venv,__pycache__,.git,build,dist
3843

3944
- name: Run MyPy (Type Checking)
40-
run: mypy . --ignore-missing-imports --no-strict-optional
41-
continue-on-error: true # Allow MyPy to fail without stopping the workflow
45+
run: mypy . --ignore-missing-imports --no-strict-optional --exclude="(build|dist|venv|env|\.venv|\.env|\.git|\.mypy_cache|\.pytest_cache|\.tox)/"
46+
continue-on-error: false # Make MyPy a required check
4247

4348
- name: Test Import Structure
4449
run: |

.github/workflows/python38-compat.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.black]
22
line-length = 88
3-
target-version = ['py38']
3+
target-version = ['py311']
44
include = '\.pyi?$'
55
extend-exclude = '''
66
/(
@@ -12,6 +12,7 @@ extend-exclude = '''
1212
| \.venv
1313
| build
1414
| dist
15+
| env
1516
)/
1617
'''
1718

@@ -22,7 +23,7 @@ line_length = 88
2223
known_first_party = ["coderag"]
2324

2425
[tool.mypy]
25-
python_version = "3.9"
26+
python_version = "3.11"
2627
ignore_missing_imports = true
2728
disallow_untyped_defs = false
2829
warn_unused_ignores = true

requirements-py38.txt

Lines changed: 0 additions & 57 deletions
This file was deleted.

requirements.txt

-1.05 KB
Binary file not shown.

0 commit comments

Comments
 (0)