feat(dev): add integration scaffolder#2685
Draft
PascalThuet wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a developer-facing integration scaffolding feature to generate built-in integration packages plus a matching test skeleton, exposed via a new specify dev integration scaffold CLI command and documented for contributors.
Changes:
- Introduces
scaffold_integration()and templates for multiple integration types (markdown/toml/yaml/skills). - Adds
specify dev integration scaffoldTyper command to generate scaffold files and print next steps. - Adds integration tests validating generated file contents and error cases; updates local development docs.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tests/integrations/test_integration_scaffold.py | New integration tests covering CLI scaffold behavior, templates, and validation errors. |
| src/specify_cli/integration_scaffold.py | New scaffold implementation: templates, content generation, filesystem writes, and result metadata. |
| src/specify_cli/init.py | Adds new dev integration scaffold CLI command wiring around scaffold_integration(). |
| docs/local-development.md | Documents how to run the new scaffold command and renumbers subsequent sections. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+90
to
+96
| def _integration_content( | ||
| *, | ||
| key: str, | ||
| package_name: str, | ||
| class_name: str, | ||
| integration_type: str, | ||
| ) -> str: |
Comment on lines
+170
to
+173
| integrations_root = project_root / "src" / "specify_cli" / "integrations" | ||
| tests_root = project_root / "tests" / "integrations" | ||
| if not integrations_root.is_dir() or not tests_root.is_dir(): | ||
| raise ValueError("Run this command from the Spec Kit repository root.") |
Comment on lines
+206
to
+210
| next_steps = ( | ||
| f"Register {class_name} in src/specify_cli/integrations/__init__.py.", | ||
| "Review config metadata, install_url, requires_cli, context_file, and multi_install_safe.", | ||
| f"Run pytest tests/integrations/test_integration_{package_name}.py -v.", | ||
| ) |
Comment on lines
+1302
to
+1306
| integration_type: str = typer.Option( | ||
| "markdown", | ||
| "--type", | ||
| help="Scaffold type: markdown, toml, yaml, or skills", | ||
| ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2683.
Summary
specify dev integration scaffold <key>for built-in integration boilerplateTesting
uv run --extra test pytest tests/integrations/test_integration_scaffold.py -vuv run --extra test pytest tests/integrations/test_integration_scaffold.py tests/integrations/test_registry.py -vuvx ruff check src/specify_cli/integration_scaffold.py src/specify_cli/__init__.py tests/integrations/test_integration_scaffold.pygit diff --check