- Clone the repository
git clone https://github.com/steve-phan/orbit
cd orbit- Create virtual environment
python3 -m venv .venv
source .venv/bin/activate- Install dependencies
make installWe use Black for code formatting:
make formatWe use Ruff for linting:
make lintWe use MyPy for static type checking:
mypy orbit/make checkmake testpytest tests/test_dag_executor.py::test_topological_sort_linear -vpytest --cov=orbit tests/- API Layer (
orbit/api): HTTP endpoints, request/response handling - Service Layer (
orbit/services): Business logic - Repository Layer (
orbit/repositories): Data access - Models (
orbit/models): Database entities - Schemas (
orbit/schemas): Request/response validation
Use the dependency injection container in orbit/core/dependencies.py:
from orbit.core.dependencies import get_workflow_service
@router.post("/workflows/")
async def create_workflow(
service: WorkflowService = Depends(get_workflow_service)
):
return await service.create_workflow(...)Use custom exceptions from orbit/core/exceptions.py:
from orbit.core.exceptions import WorkflowNotFoundError
raise WorkflowNotFoundError(
"Workflow not found",
details={"workflow_id": str(workflow_id)}
)Use the logging infrastructure:
from orbit.core.logging import get_logger
logger = get_logger("module_name")
logger.info("Operation completed")
logger.error("Operation failed", exc_info=True)- Create a feature branch
git checkout -b feature/your-feature-name- Make your changes
- Write tests for new functionality
- Update documentation
- Follow code style guidelines
- Run quality checks
make check- Commit your changes
git add .
git commit -m "feat: add new feature"Use conventional commit messages:
feat:New featurefix:Bug fixdocs:Documentation changesrefactor:Code refactoringtest:Adding testschore:Maintenance tasks
- Push and create PR
git push origin feature/your-feature-name- Tests pass (
make test) - Code is formatted (
make format) - No linting errors (
make lint) - Type hints are present
- Documentation is updated
- Commit messages follow conventions
- No breaking changes (or documented)
orbit/
├── api/ # API endpoints
│ └── v1/
│ ├── endpoints/
│ └── api.py
├── core/ # Core infrastructure
│ ├── config.py
│ ├── dependencies.py
│ ├── exceptions.py
│ └── logging.py
├── db/ # Database
│ └── session.py
├── models/ # Database models
│ └── workflow.py
├── repositories/ # Data access layer
│ └── workflow_repository.py
├── schemas/ # Pydantic schemas
│ └── workflow.py
└── services/ # Business logic
├── dag_executor.py
├── task_runner.py
├── websocket_manager.py
└── workflow_service.py
- Create schema in
orbit/schemas/ - Add business logic to service in
orbit/services/ - Create endpoint in
orbit/api/v1/endpoints/ - Add tests in
tests/
- Add action type to
TaskRunner._execute_action() - Implement execution logic
- Add tests
- Update documentation
Open an issue or reach out to the maintainers.