Skip to content

Conversation

@policyengine
Copy link
Contributor

@policyengine policyengine bot commented Dec 9, 2025

Summary

Documents the pattern of delegating dataset selection to policyengine.py by returning None from the API, rather than hardcoding dataset paths in the API layer.

Context

This pattern emerged from PR #2953 in policyengine-api, where we moved from explicitly specifying state-specific datasets in the API to delegating that responsibility to policyengine.py. This improves separation of concerns.

Changes

Added new "Dataset Selection Pattern" section to policyengine-api-skill that explains:

  • When to return None vs when to specify explicit datasets
  • Why this delegation pattern is preferred
  • Example of the NYC special case that should be explicit
  • Where to find this pattern in the codebase

Why this matters

Future Claude sessions working on dataset selection will understand:

  • The API should generally delegate to policyengine.py
  • Only special cases (like NYC) should be explicit
  • Dataset logic belongs centralized in policyengine.py

🤖 Generated with Claude Code

Document the pattern of returning None from API to delegate dataset
selection to policyengine.py, rather than hardcoding dataset paths.

This pattern improves separation of concerns by keeping dataset logic
centralized in policyengine.py where it belongs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants