Top-level cleanup: move examples/gradio and add scripts#1
Top-level cleanup: move examples/gradio and add scripts#1cyberviser wants to merge 6 commits intomainfrom
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… Copilot <223556219+Copilot@users.noreply.github.com>
…d-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR reorganizes the repository structure by moving the gradio directory into examples/gradio and introducing supporting scripts and documentation. The changes improve repository organization while maintaining backwards compatibility with the existing installer.
Changes:
- Moved
gradiofrom repository root toexamples/gradiosubdirectory - Added migration helper script with dry-run capability
- Added README files documenting the new structure and scripts directory
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/migrate-top-level.sh | Migration script to move gradio directory with dry-run and apply modes |
| scripts/README.md | Documentation for scripts directory purpose |
| examples/gradio | Subproject commit reference for moved gradio directory |
| examples/README.md | Documentation explaining examples directory and gradio relocation |
| PULL_REQUEST_DRAFT.md | PR template with migration instructions and patch information |
| .github/copilot-instructions.md | Repository guide for Copilot CLI with install.sh conventions and workflow details |
| .github/agents/infra-strategist.agent.md | Agent configuration for infrastructure and repository management assistance |
| .devcontainer/devcontainer.json | Dev container configuration with linting and shell tools |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| fi | ||
|
|
||
| git add -A | ||
| git commit -m "Migration: move gradio into examples/ (scripted)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>" || true |
There was a problem hiding this comment.
The newline character \n in the commit message may not render correctly depending on the shell. Consider using a literal newline or printf format for better cross-shell compatibility.
| git commit -m "Migration: move gradio into examples/ (scripted)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>" || true | |
| git commit \ | |
| -m "Migration: move gradio into examples/ (scripted)" \ | |
| -m "" \ | |
| -m "Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>" || true |
| # Perform migration | ||
| mkdir -p examples | ||
| if [ -d "gradio" ]; then | ||
| git mv gradio examples/ || true |
There was a problem hiding this comment.
Using || true suppresses all errors, making it difficult to diagnose if the move fails for unexpected reasons (e.g., permission issues, non-existent source). Consider checking if the directory exists first and providing a clear message if the move fails.
| git mv gradio examples/ || true | |
| if ! git mv gradio examples/; then | |
| echo "Warning: failed to move 'gradio' to 'examples/'." >&2 | |
| fi |
| fi | ||
|
|
||
| git add -A | ||
| git commit -m "Migration: move gradio into examples/ (scripted)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>" || true |
There was a problem hiding this comment.
Using || true on the commit command silently ignores failures. If the commit fails (e.g., nothing to commit, merge conflicts), users won't be informed. Consider checking the git status first or providing an informative message on failure.
| git commit -m "Migration: move gradio into examples/ (scripted)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>" || true | |
| if git diff --cached --quiet; then | |
| echo "No changes to commit; working tree clean." | |
| else | |
| git commit -m "Migration: move gradio into examples/ (scripted)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>" | |
| fi |
Title: Top-level cleanup: move examples/gradio and add scripts
Summary:
This branch performs a top-level cleanup: it moves the top-level gradio directory into examples/gradio, and adds scripts/migrate-top-level.sh, scripts/README.md, and examples/README.md. install.sh is intentionally left at the repository root to preserve the curl|sh installer behavior.
Patch:
A format-patch of the branch is saved at:
/home/vscode/.copilot/session-state/499fa254-c980-4afc-9b7c-4264fb5e64e5/patches/top-level-cleanup.patch
How to apply the patch locally (if you prefer to push from your environment):
git checkout -b copilot/philosophical-cattle
git am /home/vscode/.copilot/session-state/499fa254-c980-4afc-9b7c-4264fb5e64e5/patches/top-level-cleanup.patch
git push --set-upstream origin copilot/philosophical-cattle
gh pr create --title "Top-level cleanup: move examples/gradio and add scripts" --body "Moves gradio -> examples/gradio and adds migration helper script and READMEs. Patch available in session-state."
Notes: