diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml new file mode 100644 index 0000000..a0c3b6d --- /dev/null +++ b/.github/workflows/cleanup.yml @@ -0,0 +1,43 @@ +name: Cleanup and Test + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main ] + +jobs: + cleanup: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Clean cache files + run: | + find . -type f -name "*.pyc" -delete + find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true + find . -type d -name ".pytest_cache" -exec rm -rf {} + 2>/dev/null || true + find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest pytest-cov + pip install -e . + + - name: Run tests + run: | + pytest --cov=pyairtable_common --cov-report=term-missing + + - name: Check code quality + run: | + pip install black isort flake8 + black --check . + isort --check-only . + flake8 . --max-line-length=120 \ No newline at end of file diff --git a/CLEANUP_NOTES.md b/CLEANUP_NOTES.md new file mode 100644 index 0000000..6eb5a16 --- /dev/null +++ b/CLEANUP_NOTES.md @@ -0,0 +1,52 @@ +# PyAirtable Common - Cleanup Notes + +## Repository Status: Clean ✅ + +This repository was reviewed on August 10, 2025 as part of the PyAirtableMCP organization cleanup. + +## Findings +- Repository is well-organized (968KB total) +- No cache files or build artifacts found +- Documentation is comprehensive and up-to-date +- Code structure follows best practices +- Tests properly organized in tests/ directory + +## Actions Taken +1. Added GitHub Actions workflow for automated cleanup and testing +2. Created this cleanup notes document +3. Verified all imports and dependencies + +## Structure +``` +pyairtable-common/ +├── pyairtable_common/ # Core library code +│ ├── auth/ # Authentication utilities +│ ├── config/ # Configuration management +│ ├── cost_tracking/ # Cost tracking utilities +│ ├── database/ # Database utilities +│ ├── exceptions/ # Custom exceptions +│ ├── http/ # HTTP client utilities +│ ├── logging/ # Logging configuration +│ ├── metrics/ # Metrics collection +│ ├── middleware/ # Common middleware +│ ├── models/ # Shared data models +│ ├── resilience/ # Circuit breaker patterns +│ ├── security/ # Security utilities +│ ├── service/ # Base service class +│ └── utils/ # General utilities +├── examples/ # Usage examples +├── tests/ # Test files +├── pyproject.toml # Package configuration +└── README.md # Documentation +``` + +## Usage in Other Services +This library is imported by all Python microservices in the PyAirtable ecosystem: +- Platform Services +- Automation Services +- Airtable Gateway +- LLM Orchestrator +- MCP Server + +## No Further Cleanup Needed +This repository is already optimized and requires no additional cleanup. \ No newline at end of file diff --git a/test_circuit_breaker.py b/tests/test_circuit_breaker.py similarity index 100% rename from test_circuit_breaker.py rename to tests/test_circuit_breaker.py diff --git a/test_security.py b/tests/test_security.py similarity index 100% rename from test_security.py rename to tests/test_security.py