- Clone the repository:
git clone https://github.com/yourusername/automl-api.git
cd automl-api
- Create a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
pip install -r requirements-dev.txt
- Set up pre-commit hooks:
pre-commit install
# Run all tests
pytest
# Run with coverage
pytest --cov=.
# Run specific test categories
pytest -m "not slow"
- Use Black for code formatting
- Sort imports with isort
- Follow PEP 8 guidelines
- Write docstrings in Google style
- Create a feature branch from
develop
- Make your changes
- Run tests locally
- Push your changes
- Create a PR to
develop
The CI/CD pipeline includes:
- Code quality checks
- Security scanning
- Testing
- Building and pushing Docker image
- Deployment
Set these in GitHub repository settings:
JWT_SECRET_KEY
VALID_API_KEY
DOCKERHUB_USERNAME
DOCKERHUB_TOKEN
SSH_HOST
SSH_USERNAME
SSH_PRIVATE_KEY