Skip to content

Commit 8d85aeb

Browse files
committed
remove all python dependancies from repo
1 parent a62f651 commit 8d85aeb

17 files changed

Lines changed: 16 additions & 379 deletions

.github/workflows/ci.yml

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ jobs:
1414
strategy:
1515
matrix:
1616
node-version: ['24.x']
17-
python-version: ['3.11', '3.12']
1817

1918
steps:
2019
- name: Checkout code
@@ -31,29 +30,12 @@ jobs:
3130
node-version: ${{ matrix.node-version }}
3231
cache: 'pnpm'
3332

34-
- name: Set up Python ${{ matrix.python-version }}
35-
uses: actions/setup-python@v5
36-
with:
37-
python-version: ${{ matrix.python-version }}
38-
cache: 'pip'
39-
4033
- name: Install Node.js dependencies
4134
run: pnpm install --frozen-lockfile
4235

4336
- name: Install ast-grep
4437
run: pnpm add -g @ast-grep/cli@latest
4538

46-
- name: Install Python dependencies
47-
run: |
48-
python -m pip install --upgrade pip
49-
pip install -r requirements.txt
50-
51-
- name: Verify Python pipeline availability
52-
run: |
53-
echo "Verifying Python pipeline dependencies..."
54-
python3 -c "import pydantic; print(f'✅ pydantic {pydantic.__version__} available')"
55-
python3 -c "import sys; print(f'✅ Python {sys.version} available')"
56-
5739
- name: Verify setup
5840
run: pnpm run verify
5941

@@ -81,31 +63,6 @@ jobs:
8163
echo "⚠️ No dashboard directory found (skipping)"
8264
fi
8365
84-
- name: Test Python pipeline integration
85-
run: |
86-
echo "Testing Python pipeline stages (3-7)..."
87-
88-
# Verify pydantic models load correctly
89-
python3 << 'PYEOF'
90-
import sys
91-
sys.path.insert(0, 'sidequest/pipeline-core')
92-
from models.code_block import CodeBlock, SourceLocation
93-
from models.duplicate_group import DuplicateGroup
94-
print('✅ Pydantic models imported successfully')
95-
PYEOF
96-
97-
# Test structural similarity module
98-
python3 << 'PYEOF'
99-
import sys
100-
sys.path.insert(0, 'sidequest/pipeline-core')
101-
from similarity.structural import calculate_structural_similarity
102-
score, method = calculate_structural_similarity('function a() { return 1; }', 'function b() { return 1; }')
103-
assert 0 <= score <= 1, f'Invalid score: {score}'
104-
print(f'✅ Structural similarity working (score: {score:.2f}, method: {method})')
105-
PYEOF
106-
107-
echo "✅ Python pipeline integration verified"
108-
10966
lint:
11067
name: Lint and Code Quality
11168
runs-on: ubuntu-latest

.github/workflows/deploy.yml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,9 @@ jobs:
2626
node-version: '20.x'
2727
cache: 'pnpm'
2828

29-
- name: Set up Python
30-
uses: actions/setup-python@v5
31-
with:
32-
python-version: '3.11'
33-
cache: 'pip'
34-
3529
- name: Install Node.js dependencies
3630
run: pnpm install --frozen-lockfile --prod
3731

38-
- name: Install Python dependencies
39-
run: |
40-
python -m pip install --upgrade pip
41-
pip install -r requirements.txt
42-
4332
- name: Install Doppler CLI
4433
run: |
4534
# Follow environment-setup-analyzer: Use package manager first
@@ -71,7 +60,7 @@ jobs:
7160
- name: Deploy with rsync
7261
uses: burnett01/rsync-deployments@6.0.0
7362
with:
74-
switches: -avzr --delete --exclude='.git*' --exclude='node_modules' --exclude='venv' --exclude='tests'
63+
switches: -avzr --delete --exclude='.git*' --exclude='node_modules' --exclude='tests'
7564
path: ./
7665
remote_path: ${{ secrets.DEPLOY_PATH }}
7766
remote_host: ${{ secrets.DEPLOY_HOST }}
@@ -99,12 +88,6 @@ jobs:
9988
# Install ast-grep (required for duplicate detection pipeline)
10089
npm install -g @ast-grep/cli
10190
102-
# Install Python dependencies
103-
python3 -m venv venv
104-
source venv/bin/activate
105-
pip install --upgrade pip
106-
pip install -r requirements.txt
107-
10891
- name: Restart services with PM2
10992
uses: appleboy/ssh-action@v1.0.0
11093
with:

.gitignore

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,6 @@ condense/
2525
docs/repomix/*
2626
docs/output/*
2727

28-
# Python
29-
venv/
30-
__pycache__/
31-
**/__pycache__/
32-
*.pyc
33-
*.pyo
34-
*.pyd
35-
.Python
36-
3728
# OS
3829
.DS_Store
3930
Thumbs.db

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const count = jobRepository.getJobCount({ status }); // Efficient COUNT(*) quer
101101
### 8. Constants: No Magic Numbers
102102
```typescript
103103
import { TIMEOUTS, RETRY, CONCURRENCY, DURATION_MS, CACHE } from './sidequest/core/constants.ts';
104-
const timeout = TIMEOUTS.PYTHON_PIPELINE_BASE_MS; // Correct
104+
const timeout = TIMEOUTS.REPOMIX_MS; // Correct
105105
const oneDay = DURATION_MS.DAY; // Correct
106106
```
107107

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@
2424
"test:all:env-host-required": "node --strip-types --test --test-timeout=60000 --test-force-exit tests/unit/api-routes.test.ts tests/unit/port-manager.test.ts tests/unit/websocket.test.ts tests/integration/error-recovery.integration.test.ts tests/integration/pipeline-execution.integration.test.ts tests/integration/port-manager.integration.test.ts sidequest/pipeline-runners/startup-once-mode.test.ts",
2525
"test:all:env": "npm run test:all:env-safe && npm run test:all:env-host-required",
2626
"test:all:node": "npm run test:all:core",
27-
"test:all:py": "bash scripts/analysis/run-python-tests.sh",
28-
"test:all": "npm run test:all:core && npm run test:all:py",
29-
"test:all:full": "npm run test:all:core && npm run test:all:env && npm run test:all:py",
27+
"test:all": "npm run test:all:core",
28+
"test:all:full": "npm run test:all:core && npm run test:all:env",
3029
"test:aall": "npm run test:all",
3130
"test:validate-paths": "node --strip-types tests/scripts/validate-test-paths.ts",
3231
"test:validate-backlog": "node --strip-types tests/scripts/validate-backlog.ts",

requirements.txt

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

scripts/analysis/run-python-tests.sh

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

scripts/deploy/deploy-traditional-server.sh

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,6 @@ setup_macos() {
136136
info "Node.js already installed: $(node --version)"
137137
fi
138138

139-
# Install Python 3
140-
if ! command_exists python3; then
141-
log "Installing Python 3..."
142-
brew install python@3.11
143-
else
144-
info "Python already installed: $(python3 --version)"
145-
fi
146-
147139
# Install Redis
148140
if ! command_exists redis-cli; then
149141
log "Installing Redis..."
@@ -231,17 +223,6 @@ setup_linux() {
231223
info "Node.js already installed: $(node --version)"
232224
fi
233225

234-
# Install Python 3.11
235-
if ! command_exists python3.11; then
236-
log "Installing Python 3.11..."
237-
apt-get install -y software-properties-common
238-
add-apt-repository -y ppa:deadsnakes/ppa
239-
apt-get update
240-
apt-get install -y python3.11 python3.11-venv python3.11-dev python3-pip build-essential
241-
else
242-
info "Python 3.11 already installed: $(python3.11 --version)"
243-
fi
244-
245226
# Install Redis
246227
if ! command_exists redis-cli; then
247228
log "Installing Redis..."
@@ -334,7 +315,6 @@ update_application() {
334315
BACKUP_FILE="$BACKUP_DIR/backup-$(date +%Y%m%d_%H%M%S).tar.gz"
335316
tar -czf "$BACKUP_FILE" \
336317
--exclude='node_modules' \
337-
--exclude='venv' \
338318
--exclude='logs' \
339319
-C "$(dirname "$APP_DIR")" "$(basename "$APP_DIR")"
340320
log "Backup created: $BACKUP_FILE"
@@ -367,28 +347,6 @@ update_application() {
367347
sudo -u "$DEPLOY_USER" npm run build:frontend
368348
fi
369349

370-
# Install/Update Python dependencies
371-
log "Setting up Python virtual environment..."
372-
PYTHON_CMD="python3"
373-
if $IS_LINUX && command_exists python3.11; then
374-
PYTHON_CMD="python3.11"
375-
fi
376-
377-
if [[ ! -d venv ]]; then
378-
if $IS_MACOS; then
379-
$PYTHON_CMD -m venv venv
380-
else
381-
sudo -u "$DEPLOY_USER" $PYTHON_CMD -m venv venv
382-
fi
383-
fi
384-
385-
log "Installing Python dependencies..."
386-
if $IS_MACOS; then
387-
source venv/bin/activate && pip install --upgrade pip && pip install -r requirements.txt
388-
else
389-
sudo -u "$DEPLOY_USER" bash -c "source venv/bin/activate && pip install --upgrade pip && pip install -r requirements.txt"
390-
fi
391-
392350
# Set correct permissions (Linux only)
393351
if $IS_LINUX; then
394352
log "Setting permissions..."
@@ -483,11 +441,9 @@ rollback_application() {
483441
if $IS_MACOS; then
484442
pnpm install --frozen-lockfile
485443
npm run build:frontend
486-
source venv/bin/activate && pip install -r requirements.txt
487444
else
488445
sudo -u "$DEPLOY_USER" pnpm install --frozen-lockfile
489446
sudo -u "$DEPLOY_USER" npm run build:frontend
490-
sudo -u "$DEPLOY_USER" bash -c "source venv/bin/activate && pip install -r requirements.txt"
491447
fi
492448

493449
# Restart PM2 processes

scripts/setup/verify-setup.ts

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -108,70 +108,6 @@ check('git available', () => {
108108
}
109109
});
110110

111-
check('python3 available', () => {
112-
try {
113-
const version = execSync('python3 --version', {
114-
encoding: 'utf8',
115-
stdio: ['ignore', 'pipe', 'ignore'],
116-
}).trim();
117-
console.log(` ${version}`);
118-
} catch (error) {
119-
throw new Error('python3 not found. Required for duplicate detection pipeline');
120-
}
121-
});
122-
123-
check('Python packages available', () => {
124-
// Check if we're in CI (packages installed globally) or local dev (venv)
125-
const isCI = process.env.CI === 'true' || process.env.GITHUB_ACTIONS === 'true';
126-
const venvPath = join(projectRoot, 'venv');
127-
const venvPython = join(venvPath, 'bin', 'python3');
128-
129-
let found = false;
130-
let location = '';
131-
132-
// Try venv Python first (local dev)
133-
if (existsSync(venvPython)) {
134-
try {
135-
execSync(`"${venvPython}" -c "import pydantic"`, {
136-
encoding: 'utf8',
137-
stdio: ['ignore', 'pipe', 'ignore'],
138-
timeout: 3000,
139-
});
140-
found = true;
141-
location = 'venv';
142-
} catch {
143-
// venv exists but packages not installed
144-
}
145-
}
146-
147-
// Fallback to system Python (CI mode)
148-
if (!found) {
149-
try {
150-
execSync('python3 -c "import pydantic"', {
151-
encoding: 'utf8',
152-
stdio: ['ignore', 'pipe', 'ignore'],
153-
timeout: 3000,
154-
});
155-
found = true;
156-
location = isCI ? 'CI global' : 'system';
157-
} catch {
158-
// Not available
159-
}
160-
}
161-
162-
if (found) {
163-
console.log(` Python packages available (${location})`);
164-
} else {
165-
if (!isCI && !existsSync(venvPath)) {
166-
throw new Error('Python packages not found. Run: python3 -m venv venv && source venv/bin/activate && pip install -r requirements.txt');
167-
} else if (!isCI && existsSync(venvPath)) {
168-
throw new Error('venv exists but packages not installed. Run: source venv/bin/activate && pip install -r requirements.txt');
169-
} else {
170-
throw new Error('Python packages not found. Run: pip install -r requirements.txt');
171-
}
172-
}
173-
});
174-
175111
check('ast-grep available', () => {
176112
// Check for ast-grep in common locations
177113
const possiblePaths = [

sidequest/core/constants.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ export const DURATION_MS = {
3030
// -----------------------------------------------------------------------------
3131
export const TIMEOUTS = {
3232
/** Pipeline and worker execution */
33-
PYTHON_PIPELINE_BASE_MS: DURATION_MS.TEN_MINUTES,
34-
PYTHON_PIPELINE_PER_PATTERN_MS: DURATION_MS.ONE_HUNDRED_MS,
35-
PYTHON_PIPELINE_PER_FILE_MS: DURATION_MS.TEN_MS,
3633
REPOMIX_MS: DURATION_MS.TEN_MINUTES,
3734
GIT_REPORT_MS: DURATION_MS.FIVE_MINUTES,
3835
WORKER_INIT_MS: DURATION_MS.THIRTY_SECONDS,

0 commit comments

Comments
 (0)