feat(build): replace .flashignore with built-in ignore patterns#220
feat(build): replace .flashignore with built-in ignore patterns#220
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request replaces the .flashignore file mechanism with built-in ignore patterns for Flash builds. The change simplifies project structure by eliminating the need for a separate Flash-specific ignore file, instead relying on a combination of .gitignore patterns and opinionated built-in exclusions.
Changes:
- Replaced
.flashignorefile loading with built-in ignore patterns covering tests, docs, build artifacts, IDE files, and virtual environments - Added deprecation warning to guide users with existing
.flashignorefiles to migrate custom patterns - Updated all tests, documentation, and scripts to remove references to
.flashignore
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/runpod_flash/cli/utils/ignore.py | Replaced .flashignore loading with built-in patterns and added deprecation warning |
| tests/unit/cli/utils/test_ignore.py | Added 20 comprehensive tests for all built-in patterns and deprecation behavior |
| tests/unit/test_skeleton.py | Removed .flashignore from skeleton creation tests |
| tests/unit/cli/commands/build_utils/test_scanner.py | Renamed test_module.py to worker_module.py to avoid test_*.py exclusion |
| tests/integration/test_lb_remote_execution.py | Renamed test_api.py to api_worker.py to avoid test_*.py exclusion |
| src/runpod_flash/cli/utils/skeleton_template/.flashignore | Deleted template file |
| src/runpod_flash/cli/commands/build_utils/scanner.py | Updated comment to remove .flashignore reference |
| scripts/validate-wheel.sh | Removed .flashignore from wheel validation checks |
| TESTING.md | Removed .flashignore reference from documentation |
| README.md | Removed .flashignore from project structure and troubleshooting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| always_ignore = [ | ||
| # Build artifacts and caches | ||
| ".build/", | ||
| ".flash/", | ||
| ".runpod/", | ||
| ".venv/", | ||
| "venv/", | ||
| "*.tar.gz", | ||
| ".git/", | ||
| "__pycache__/", | ||
| "*.pyc", | ||
| "*.pyo", | ||
| "*.pyd", | ||
| "*.egg-info/", | ||
| "dist/", | ||
| "build/", | ||
| # Virtual environments | ||
| ".venv/", | ||
| "venv/", | ||
| "env/", | ||
| # IDE | ||
| ".vscode/", | ||
| ".idea/", | ||
| # Environment files | ||
| ".env", | ||
| ".env.local", | ||
| # Tests (tracked by git, excluded from Flash builds) | ||
| "tests/", | ||
| "test_*.py", | ||
| "*_test.py", | ||
| # Documentation (tracked by git, excluded from Flash builds) | ||
| "docs/", | ||
| "*.md", | ||
| "!README.md", | ||
| ] |
There was a problem hiding this comment.
The built-in ignore patterns are missing .gitignore which was explicitly excluded in the old .flashignore file. Git configuration files like .gitignore should not be included in deployment builds as they serve no purpose in the deployed application. Add .gitignore to the always_ignore list to maintain parity with the previous behavior.
852c22c to
0b4d410
Compare
Built-in patterns in ignore.py now handle all default exclusions (tests, docs, build artifacts, IDE files, venvs). Users with existing .flashignore files get a deprecation warning guiding them to migrate custom patterns to .gitignore.
e831dc6 to
5eb1f97
Compare
QA ReportStatus: PASS Targeted Test Results
Ignore Pattern AnalysisBuilt-in patterns cover:
Comparison with old .flashignore template: Missing patterns (minor, not blocking):
These are non-blocking since users can add custom patterns to .gitignore. Backward compatibility with existing .flashignore:
Full Suite ResultsParallel (-n 4, non-serial): 1270 passed, 2 failed, 2 warnings All 12 failures are pre-existing on main (confirmed by running same tests against main branch):
No regressions introduced by this PR. PR Diff AnalysisFiles changed (10):
Code quality: Clean, well-structured. The test renames from test_module.py to worker_module.py are a necessary consequence of the new test_*.py exclusion pattern and demonstrate the author correctly identified the impact. No stale references: Searched entire codebase for "flashignore" -- only the deprecation warning code and its test remain. No references in pyproject.toml or other config files. RecommendationMERGE -- Clean removal of .flashignore with comprehensive built-in defaults, proper deprecation warning for existing users, thorough test coverage (20 new tests), and no regressions. The scanner test fixture renames show careful attention to the cascading effects of the new test_*.py exclusion pattern. Generated by flash-qa agent |
Summary
.flashignorefile loading with built-in ignore patterns inignore.pycovering tests, docs, build artifacts, IDE files, and virtual environments.flashignorefile, guiding them to migrate custom patterns to.gitignore.flashignorefrom skeleton template, documentation, and wheel validation scriptTest plan
tests/unit/cli/utils/test_ignore.pycovering all built-in patterns, deprecation warning, edge casestest_module.py->worker_module.pyto avoid built-intest_*.pyexclusion)make quality-checkpasses (1222 tests, 73% coverage, clean lint)flash buildexcludes tests/docs without needing.flashignore.flashignoreexists in project