Skip to content

Top-level cleanup: move examples/gradio and add scripts#1

Open
cyberviser wants to merge 6 commits intomainfrom
copilot/philosophical-cattle
Open

Top-level cleanup: move examples/gradio and add scripts#1
cyberviser wants to merge 6 commits intomainfrom
copilot/philosophical-cattle

Conversation

@cyberviser
Copy link
Owner

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:

  • install.sh remains at the repo root to preserve installer compatibility.
  • If you want me to push and open the PR from this environment, provide push access or add a fork remote I can push to.

Copilot AI review requested due to automatic review settings February 22, 2026 17:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 gradio from repository root to examples/gradio subdirectory
  • 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
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
# Perform migration
mkdir -p examples
if [ -d "gradio" ]; then
git mv gradio examples/ || true
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
git mv gradio examples/ || true
if ! git mv gradio examples/; then
echo "Warning: failed to move 'gradio' to 'examples/'." >&2
fi

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
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