Problem
Adding a new data source to boost-data-collector requires creating at minimum eight artifacts: a Django app directory with __init__.py and apps.py, models with migrations, a services.py module, a management command, test files, a YAML schedule entry, and an update to cross-app-dependencies.md. This per-source creation cost is structural and error-prone. No template, scaffold command, or documented checklist exists to guide a contributor through this process. The README's quick start covers running existing collectors but not creating new ones.
Acceptance Criteria
- Create a scaffold tool: either a
manage.py create_collector <name> management command, a cookiecutter template, or a documented scripts/scaffold_collector.sh
- The scaffold generates: app directory structure, stub
models.py, services.py, management command inheriting from BaseCollectorCommand, tests/ directory with a test stub, and a YAML schedule entry template
- All generated stubs use
AbstractCollector (not the deprecated CollectorBase)
- Add a "Creating a New Collector" section to
CONTRIBUTING.md with step-by-step instructions
- Validate the scaffold by dry-running it and confirming the generated app passes lint + type checks
Implementation Notes
A Django management command is the most natural fit: python manage.py startcollector myplatform could extend Django's startapp with the collector-specific boilerplate. Alternatively, a simple cookiecutter template in templates/new_collector/ works without Django coupling. The key files to template are: apps.py (with correct default_auto_field), services.py (with docstring explaining the service layer convention), and the management command (inheriting BaseCollectorCommand with AbstractCollector). Reference the cross-app-dependencies.md update as a manual step in the docs.
Problem
Adding a new data source to boost-data-collector requires creating at minimum eight artifacts: a Django app directory with
__init__.pyandapps.py, models with migrations, aservices.pymodule, a management command, test files, a YAML schedule entry, and an update tocross-app-dependencies.md. This per-source creation cost is structural and error-prone. No template, scaffold command, or documented checklist exists to guide a contributor through this process. The README's quick start covers running existing collectors but not creating new ones.Acceptance Criteria
manage.py create_collector <name>management command, a cookiecutter template, or a documentedscripts/scaffold_collector.shmodels.py,services.py, management command inheriting fromBaseCollectorCommand,tests/directory with a test stub, and a YAML schedule entry templateAbstractCollector(not the deprecatedCollectorBase)CONTRIBUTING.mdwith step-by-step instructionsImplementation Notes
A Django management command is the most natural fit:
python manage.py startcollector myplatformcould extend Django'sstartappwith the collector-specific boilerplate. Alternatively, a simplecookiecuttertemplate intemplates/new_collector/works without Django coupling. The key files to template are:apps.py(with correctdefault_auto_field),services.py(with docstring explaining the service layer convention), and the management command (inheritingBaseCollectorCommandwithAbstractCollector). Reference thecross-app-dependencies.mdupdate as a manual step in the docs.