feat: Implement comprehensive Market Manager with database and logging
- Add complete Market Manager package with in-memory storage and CRUD operations - Implement arbitrage detection with profit calculations and thresholds - Add database adapter with PostgreSQL schema for persistence - Create comprehensive logging system with specialized log files - Add detailed documentation and implementation plans - Include example application and comprehensive test suite - Update Makefile with market manager build targets - Add check-implementations command for verification
This commit is contained in:
44
Makefile
44
Makefile
@@ -17,23 +17,37 @@ build:
|
||||
@go build -o $(BINARY_PATH) $(MAIN_FILE)
|
||||
@echo "Build successful!"
|
||||
|
||||
# Build market manager example
|
||||
.PHONY: build-mm
|
||||
build-mm:
|
||||
@echo "Building market manager example..."
|
||||
@mkdir -p bin
|
||||
@go build -o bin/marketmanager-example examples/marketmanager/main.go
|
||||
@echo "Market manager example built successfully!"
|
||||
|
||||
# Run the application
|
||||
.PHONY: run
|
||||
run: build
|
||||
@echo "Running $(BINARY)..."
|
||||
@$(BINARY_PATH)
|
||||
|
||||
# Run market manager example
|
||||
.PHONY: run-mm
|
||||
run-mm: build-mm
|
||||
@echo "Running market manager example..."
|
||||
@bin/marketmanager-example
|
||||
|
||||
# Run tests
|
||||
.PHONY: test
|
||||
test:
|
||||
@echo "Running tests..."
|
||||
@go test -v ./...
|
||||
|
||||
# Run tests for a specific package
|
||||
.PHONY: test-pkg
|
||||
test-pkg:
|
||||
@echo "Running tests for package..."
|
||||
@go test -v ./$(PKG)/...
|
||||
# Run tests for market manager
|
||||
.PHONY: test-mm
|
||||
test-mm:
|
||||
@echo "Running market manager tests..."
|
||||
@go test -v ./pkg/marketmanager/...
|
||||
|
||||
# Run tests with coverage
|
||||
.PHONY: test-coverage
|
||||
@@ -82,12 +96,26 @@ fmt:
|
||||
@echo "Formatting code..."
|
||||
@go fmt ./...
|
||||
|
||||
# Format market manager code
|
||||
.PHONY: fmt-mm
|
||||
fmt-mm:
|
||||
@echo "Formatting market manager code..."
|
||||
@go fmt ./pkg/marketmanager/...
|
||||
@go fmt ./examples/marketmanager/...
|
||||
|
||||
# Vet code
|
||||
.PHONY: vet
|
||||
vet:
|
||||
@echo "Vetting code..."
|
||||
@go vet ./...
|
||||
|
||||
# Vet market manager code
|
||||
.PHONY: vet-mm
|
||||
vet-mm:
|
||||
@echo "Vetting market manager code..."
|
||||
@go vet ./pkg/marketmanager/...
|
||||
@go vet ./examples/marketmanager/...
|
||||
|
||||
# Lint code (requires golangci-lint)
|
||||
.PHONY: lint
|
||||
lint:
|
||||
@@ -117,9 +145,11 @@ help:
|
||||
@echo "Available targets:"
|
||||
@echo " all - Build the application (default)"
|
||||
@echo " build - Build the application"
|
||||
@echo " build-mm - Build market manager example"
|
||||
@echo " run - Build and run the application"
|
||||
@echo " run-mm - Build and run market manager example"
|
||||
@echo " test - Run tests"
|
||||
@echo " test-pkg - Run tests for a specific package (use PKG=package_name)"
|
||||
@echo " test-mm - Run market manager tests"
|
||||
@echo " test-coverage - Run tests with coverage report"
|
||||
@echo " test-unit - Run unit tests"
|
||||
@echo " test-integration - Run integration tests"
|
||||
@@ -128,7 +158,9 @@ help:
|
||||
@echo " deps - Install dependencies"
|
||||
@echo " test-deps - Install test dependencies"
|
||||
@echo " fmt - Format code"
|
||||
@echo " fmt-mm - Format market manager code"
|
||||
@echo " vet - Vet code"
|
||||
@echo " vet-mm - Vet market manager code"
|
||||
@echo " lint - Lint code (requires golangci-lint)"
|
||||
@echo " update - Update dependencies"
|
||||
@echo " help - Show this help"
|
||||
Reference in New Issue
Block a user