Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c27f224
Update part merger to consider rows with same supplier and spn duplic…
barisgit Aug 1, 2025
aa42990
Update example import csv to schow real capatibilities
barisgit Aug 1, 2025
c5751b2
Fix timestamp test
barisgit Aug 1, 2025
facfb37
Implement excel based import/export
barisgit Aug 1, 2025
1fb137e
Add export functionality to batch select and fix errors
barisgit Aug 1, 2025
78885ec
Add more tests and fix failing ones
barisgit Aug 2, 2025
aa29f10
Remove problematic tests
barisgit Aug 2, 2025
4c8940f
Simple batch processing
barisgit Aug 2, 2025
5ab7ac4
Move pageSize and table columns filter buttons apart a bit
barisgit Aug 2, 2025
c91d37d
More sophisticated two-step bulk import from info providers
barisgit Aug 2, 2025
fa7f3a1
Fix tests
barisgit Aug 2, 2025
2bc39e7
Add tests and fix static errors
barisgit Aug 2, 2025
ccb837e
Fix migration error and dto error
barisgit Aug 2, 2025
9b4d5e9
Improve test coverage
barisgit Aug 2, 2025
cc9d50a
Add makefile to help with development setup, change part_ids in bulk …
barisgit Aug 2, 2025
ed39676
Let symfony manage translations
barisgit Aug 2, 2025
3896d3d
Fix a single failing test
barisgit Aug 2, 2025
74be016
Add abbility to search faster on LCSC without details
barisgit Aug 4, 2025
4da4035
Increase time limit on batch search and add option to priorities whic…
barisgit Aug 4, 2025
9729a43
Add bulk_info_provider_import_job_part.label
barisgit Aug 4, 2025
5a4f151
Add BulkInfoProviderImportJobPart to element type name generator
barisgit Aug 4, 2025
71be75b
Improve test coverage
barisgit Aug 5, 2025
1156bb5
Added phpoffice dependency
jbtronics Aug 31, 2025
17f123b
Fixed logentryRepositoryTest
jbtronics Aug 31, 2025
0c7aa5e
Fixed phpunit tests
jbtronics Aug 31, 2025
d57107e
Do not use ob_* functions in XSLX exporter, as this affects global st…
jbtronics Aug 31, 2025
4fcd557
Use new settings object in LCSCProvider
jbtronics Aug 31, 2025
52444e0
Optimized LCSC batch search calls and extracted it into interface for…
jbtronics Aug 31, 2025
65d840c
Fix invalid flag --memory-limit
barisgit Sep 9, 2025
d6ac16e
Refactor bulk import functionality to make controller smaller (use se…
barisgit Sep 9, 2025
c7102bc
Update bulk info provider test to work with new services approach
barisgit Sep 9, 2025
46d8c86
Improved makefile
barisgit Sep 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# PartDB Makefile for Test Environment Management

.PHONY: help deps-install lint format format-check test coverage pre-commit all test-typecheck \
test-setup test-clean test-db-create test-db-migrate test-cache-clear test-fixtures test-run test-reset \
section-dev dev-setup dev-clean dev-db-create dev-db-migrate dev-cache-clear dev-warmup dev-reset

# Default target
help: ## Show this help
@awk 'BEGIN {FS = ":.*##"}; /^[a-zA-Z0-9][a-zA-Z0-9_-]+:.*##/ {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)

# Dependencies
deps-install: ## Install PHP dependencies with unlimited memory
@echo "📦 Installing PHP dependencies..."
COMPOSER_MEMORY_LIMIT=-1 composer install
yarn install
@echo "✅ Dependencies installed"

# Complete test environment setup
test-setup: test-clean test-db-create test-db-migrate test-fixtures ## Complete test setup (clean, create DB, migrate, fixtures)
@echo "✅ Test environment setup complete!"

# Clean test environment
test-clean: ## Clean test cache and database files
@echo "🧹 Cleaning test environment..."
rm -rf var/cache/test
rm -f var/app_test.db
@echo "✅ Test environment cleaned"

# Create test database
test-db-create: ## Create test database (if not exists)
@echo "🗄️ Creating test database..."
-php bin/console doctrine:database:create --if-not-exists --env test || echo "⚠️ Database creation failed (expected for SQLite) - continuing..."

# Run database migrations for test environment
test-db-migrate: ## Run database migrations for test environment
@echo "🔄 Running database migrations..."
COMPOSER_MEMORY_LIMIT=-1 php bin/console doctrine:migrations:migrate -n --env test

# Clear test cache
test-cache-clear: ## Clear test cache
@echo "🗑️ Clearing test cache..."
rm -rf var/cache/test
@echo "✅ Test cache cleared"

# Load test fixtures
test-fixtures: ## Load test fixtures
@echo "📦 Loading test fixtures..."
php bin/console partdb:fixtures:load -n --env test

# Run PHPUnit tests
test-run: ## Run PHPUnit tests
@echo "🧪 Running tests..."
php bin/phpunit

# Quick test reset (clean + migrate + fixtures, skip DB creation)
test-reset: test-cache-clear test-db-migrate test-fixtures
@echo "✅ Test environment reset complete!"

test-typecheck: ## Run static analysis (PHPStan)
@echo "🧪 Running type checks..."
COMPOSER_MEMORY_LIMIT=-1 composer phpstan

# Development helpers
dev-setup: dev-clean dev-db-create dev-db-migrate dev-warmup ## Complete development setup (clean, create DB, migrate, warmup)
@echo "✅ Development environment setup complete!"

dev-clean: ## Clean development cache and database files
@echo "🧹 Cleaning development environment..."
rm -rf var/cache/dev
rm -f var/app_dev.db
@echo "✅ Development environment cleaned"

dev-db-create: ## Create development database (if not exists)
@echo "🗄️ Creating development database..."
-php bin/console doctrine:database:create --if-not-exists --env dev || echo "⚠️ Database creation failed (expected for SQLite) - continuing..."

dev-db-migrate: ## Run database migrations for development environment
@echo "🔄 Running database migrations..."
COMPOSER_MEMORY_LIMIT=-1 php bin/console doctrine:migrations:migrate -n --env dev

dev-cache-clear: ## Clear development cache
@echo "🗑️ Clearing development cache..."
rm -rf var/cache/dev
@echo "✅ Development cache cleared"

dev-warmup: ## Warm up development cache
@echo "🔥 Warming up development cache..."
COMPOSER_MEMORY_LIMIT=-1 php -d memory_limit=1G bin/console cache:warmup --env dev -n

dev-reset: dev-cache-clear dev-db-migrate ## Quick development reset (cache clear + migrate)
@echo "✅ Development environment reset complete!"
Loading