Skip to content

Reduce Local Dev Setup Ceremony #214

@leostar0412

Description

@leostar0412

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions