Skip to content

Commit 135c633

Browse files
committed
feat: implement Strategy Pattern fragmentation with optional parsers
- Add TreeSitterStrategy for 9 languages (Python, JS, TS, Go, Rust, Java, C, C++, Ruby) - Add PythonAstStrategy as stdlib fallback - Add MistuneMarkdownStrategy and RegexMarkdownStrategy for Markdown - Add HTMLStrategy with lxml for HTML/XML semantic blocks - Add RuamelYamlStrategy for YAML with position tracking - Add PySBDTextStrategy for sentence-aware text splitting - Add ConfigStrategy, ParagraphStrategy, GenericStrategy fallbacks - Add FragmentationEngine with priority-based chain of responsibility - All parsers are optional with graceful degradation
1 parent 06f9161 commit 135c633

11 files changed

Lines changed: 1631 additions & 79 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ jobs:
6060
uses: actions/cache@v5
6161
with:
6262
path: ~/.cache/pip
63-
key: ${{ runner.os }}-lint-pip-${{ hashFiles('**/pyproject.toml') }}
63+
key: ${{ runner.os }}-lint-pip-3.11-${{ hashFiles('**/pyproject.toml') }}
6464
restore-keys: |
65-
${{ runner.os }}-lint-pip-
65+
${{ runner.os }}-lint-pip-3.11-
6666
6767
- name: Install Linters and Type Checker
6868
run: |
@@ -121,9 +121,8 @@ jobs:
121121
--cov-report=term-missing --cov-branch --junitxml=test-results.xml
122122
123123
- name: Coverage report with threshold
124-
if: runner.os == 'Linux' && matrix.python-version == '3.12'
125124
run: |
126-
coverage report --fail-under=80 --skip-covered --show-missing
125+
coverage report --fail-under=80
127126
128127
- name: Upload coverage reports to Codecov
129128
if: runner.os == 'Linux' && matrix.python-version == '3.12'
@@ -177,11 +176,10 @@ jobs:
177176
run: |
178177
python -m pip install --upgrade pip
179178
pip install -e .
180-
pip install pytest pytest-cov
179+
pip install pytest
181180
182181
- name: Run Tests
183-
run: |
184-
pytest -v
182+
run: pytest -v
185183

186184
# ============================================================================
187185
# Mutation Testing (test effectiveness validation)
@@ -210,9 +208,8 @@ jobs:
210208
211209
- name: Run mutation testing
212210
run: |
213-
mutmut run . || true
211+
mutmut run --paths-to-mutate=src/treemapper/ --tests-dir=tests/ || true
214212
mutmut results || true
215-
continue-on-error: true
216213
217214
# ============================================================================
218215
# Complexity & Maintainability Metrics
@@ -297,7 +294,6 @@ jobs:
297294
298295
- name: Check import contracts
299296
run: lint-imports
300-
continue-on-error: true
301297

302298
# ============================================================================
303299
# SonarCloud Quality Gate
@@ -344,4 +340,3 @@ jobs:
344340
env:
345341
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
346342
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
347-
continue-on-error: true

0 commit comments

Comments
 (0)