Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available: 6.26.0
Contributing to Multilingual-ABSA
Thanks for taking the time to contribute! This document outlines the workflow, tooling, and conventions for building and shipping changes to this repository.
Table of Contents
Development Setup
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
Install the pre-commit hooks (optional but recommended):
pre-commit install
Project Layout
api/ # FastAPI REST service (routes, middleware, services, tasks, models, schemas)
src/absa/ # Core ML library (data, models, evaluation, training, utils) β src-layout
frontend/ # Streamlit dashboard
scripts/ # Operational/one-off utility scripts
notebooks/ # Exploration & Colab training notebooks
tests/ # Pytest suite (api/, web/, unit/)
docs/ # Project documentation
docker/ # Container definitions & compose files
monitoring/ # Prometheus / Grafana configuration
data/ # Datasets (DVC-tracked)
models/ # Model artifacts (DVC-tracked)
Quality Gates
Every change must pass all of the following before being merged:
make lint # ruff check api src/absa tests
make typecheck # mypy api src/absa
make security # bandit -r api src/absa
make test # pytest
Workflow
Fork the repository and create a branch from
main:git checkout -b feature/<description>Make focused, atomic changes β see Commit Guidelines.
Run the quality gates locally.
Open a pull request describing what changed, why, and how you verified it. Reference any related issues.
Conventions
- Python β target 3.10+. Format/lint is enforced by
ruff(120-char lines,E,F,I,N,Wrule set). Type hints are checked bymypy. - Imports β absolute imports only (
from absa.data import ...,from api.routes import ...); never rely onsys.pathhacks in library code. - Models vs. schemas β SQLAlchemy ORM models live in
api/models/; Pydantic request/response models live inapi/schemas/. - Secrets β never commit
.envor real credentials. Add any new required environment variables to.env.example. - Data β datasets and model weights are versioned with DVC, not git.
Update
dvc.yamlwhen preprocessing stages change.
Commit Guidelines
- Keep commits small, focused, and logically independent.
- Use the imperative mood: "Add batch status endpoint", not "Added endpoint".
- Prefix with the area when it aids scanning, e.g.
api:,frontend:,data:,docs:. - Do not bundle unrelated changes (e.g. formatting + feature) in one commit.