Skip to content

Commit b61b277

Browse files
authored
Merge pull request #46 from BruinGrowly/cursor/codebase-review-and-improvement-suggestions-claude-4.5-sonnet-thinking-1a1d
Codebase review and improvement suggestions
2 parents a018b2f + 1194292 commit b61b277

17 files changed

Lines changed: 5154 additions & 39 deletions
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug in Semantic Compressor
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Bug Description
10+
<!-- Clear and concise description of the bug -->
11+
12+
## To Reproduce
13+
Steps to reproduce the behavior:
14+
1. Run command: `...`
15+
2. With input: `...`
16+
3. See error: `...`
17+
18+
## Expected Behavior
19+
<!-- What you expected to happen -->
20+
21+
## Actual Behavior
22+
<!-- What actually happened (include full error messages) -->
23+
24+
## Environment
25+
- **OS:** [e.g., Ubuntu 22.04, macOS 13.2, Windows 11]
26+
- **Python version:** [e.g., 3.11.2]
27+
- **Semantic Compressor version:** [e.g., 2.0.0]
28+
- **Installation method:** [e.g., pip install, git clone]
29+
30+
## Code Sample
31+
<!-- If applicable, provide minimal code to reproduce -->
32+
```python
33+
# Your code here
34+
```
35+
36+
## Additional Context
37+
<!-- Any other relevant information -->
38+
39+
## Checklist
40+
- [ ] I have searched existing issues
41+
- [ ] I am using the latest version
42+
- [ ] I have included all relevant information above
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature for Semantic Compressor
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Feature Description
10+
<!-- Clear description of the proposed feature -->
11+
12+
## Use Case
13+
<!-- Why is this feature needed? What problem does it solve? -->
14+
15+
## Proposed Solution
16+
<!-- How would you like this feature to work? -->
17+
18+
## Example Usage
19+
<!-- Show how this feature would be used -->
20+
```python
21+
# Example code showing the feature
22+
result = new_feature(input)
23+
```
24+
25+
## Alternatives Considered
26+
<!-- Other ways this could be implemented or solved -->
27+
28+
## Additional Context
29+
<!-- Mockups, links to related projects, etc. -->
30+
31+
## Checklist
32+
- [ ] I have checked the [Roadmap](../ROADMAP.md) to see if this is already planned
33+
- [ ] I have searched existing feature requests
34+
- [ ] I have described a clear use case

.github/workflows/tests.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v3
21+
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install pytest pytest-cov
31+
32+
- name: Run tests
33+
run: |
34+
python3 -m pytest tests/ -v --cov=src/ljpw --cov-report=xml --cov-report=term
35+
36+
- name: Upload coverage to Codecov
37+
uses: codecov/codecov-action@v3
38+
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
39+
with:
40+
file: ./coverage.xml
41+
fail_ci_if_error: false
42+
verbose: true
43+
44+
lint:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Checkout code
48+
uses: actions/checkout@v3
49+
50+
- name: Set up Python
51+
uses: actions/setup-python@v4
52+
with:
53+
python-version: '3.11'
54+
55+
- name: Install linting tools
56+
run: |
57+
python -m pip install --upgrade pip
58+
pip install flake8 black isort mypy
59+
60+
- name: Check code formatting with black
61+
run: |
62+
black --check src/ tests/ tools/ examples/ || true
63+
64+
- name: Check import sorting with isort
65+
run: |
66+
isort --check-only src/ tests/ tools/ examples/ || true
67+
68+
- name: Lint with flake8
69+
run: |
70+
flake8 src/ tests/ tools/ examples/ --count --select=E9,F63,F7,F82 --show-source --statistics || true
71+
flake8 src/ tests/ tools/ examples/ --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics || true
72+
73+
test-install:
74+
runs-on: ubuntu-latest
75+
steps:
76+
- name: Checkout code
77+
uses: actions/checkout@v3
78+
79+
- name: Set up Python
80+
uses: actions/setup-python@v4
81+
with:
82+
python-version: '3.11'
83+
84+
- name: Test installation
85+
run: |
86+
python -m pip install --upgrade pip
87+
pip install -e .
88+
89+
- name: Test CLI
90+
run: |
91+
ljpw help || python -m src.ljpw.ljpw_standalone help
92+
93+
- name: Test basic analysis
94+
run: |
95+
echo 'def hello(): print("world")' > test.py
96+
ljpw analyze test.py || python -m src.ljpw.ljpw_standalone analyze test.py

0 commit comments

Comments
 (0)