Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,187 changes: 1,095 additions & 92 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ make validate-wheel
- Or test specific module: `uv run pytest --cov=src/runpod_flash/cli/utils/skeleton`

**Hidden files require explicit glob patterns**
- Pattern `**/.*` needed in pyproject.toml to include `.env`, `.gitignore`, `.flashignore`
- Pattern `**/.*` needed in pyproject.toml to include `.env`, `.gitignore`
- Verify with: `unzip -l dist/runpod_flash-*.whl | grep skeleton_template`

## Pre-Release Checklist
Expand Down
3 changes: 1 addition & 2 deletions scripts/validate-wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ echo "Checking wheel contents..."
REQUIRED_TEMPLATE_FILES=(
"runpod_flash/cli/utils/skeleton_template/.env.example"
"runpod_flash/cli/utils/skeleton_template/.gitignore"
"runpod_flash/cli/utils/skeleton_template/.flashignore"
"runpod_flash/cli/utils/skeleton_template/cpu_worker.py"
"runpod_flash/cli/utils/skeleton_template/gpu_worker.py"
"runpod_flash/cli/utils/skeleton_template/lb_worker.py"
Expand Down Expand Up @@ -75,7 +74,7 @@ flash init test_project > /dev/null 2>&1
# Verify critical files exist
echo ""
echo "Verifying created files..."
REQUIRED_FILES=(".env.example" ".gitignore" ".flashignore" "cpu_worker.py" "gpu_worker.py" "lb_worker.py" "pyproject.toml" "README.md" "requirements.txt")
REQUIRED_FILES=(".env.example" ".gitignore" "cpu_worker.py" "gpu_worker.py" "lb_worker.py" "pyproject.toml" "README.md" "requirements.txt")
MISSING_IN_OUTPUT=0

for file in "${REQUIRED_FILES[@]}"; do
Expand Down
45 changes: 34 additions & 11 deletions src/runpod_flash/cli/utils/ignore.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def parse_ignore_file(file_path: Path) -> list[str]:
Parse an ignore file and return list of patterns.

Args:
file_path: Path to ignore file (.flashignore or .gitignore)
file_path: Path to ignore file (.gitignore)

Returns:
List of pattern strings
Expand All @@ -40,7 +40,7 @@ def parse_ignore_file(file_path: Path) -> list[str]:

def load_ignore_patterns(project_dir: Path) -> pathspec.PathSpec:
"""
Load ignore patterns from .flashignore and .gitignore files.
Load ignore patterns from .gitignore and built-in defaults.

Args:
project_dir: Flash project directory
Expand All @@ -50,12 +50,14 @@ def load_ignore_patterns(project_dir: Path) -> pathspec.PathSpec:
"""
patterns = []

# Load .flashignore
# Warn if project still has a .flashignore (removed in v1.4)
flashignore = project_dir / ".flashignore"
if flashignore.exists():
flash_patterns = parse_ignore_file(flashignore)
patterns.extend(flash_patterns)
log.debug(f"Loaded {len(flash_patterns)} patterns from .flashignore")
log.warning(
".flashignore is no longer supported; "
"patterns are now built-in. "
"Move any custom patterns to .gitignore and delete .flashignore."
)

# Load .gitignore
gitignore = project_dir / ".gitignore"
Expand All @@ -64,21 +66,42 @@ def load_ignore_patterns(project_dir: Path) -> pathspec.PathSpec:
patterns.extend(git_patterns)
log.debug(f"Loaded {len(git_patterns)} patterns from .gitignore")

# Always exclude build artifacts, virtual environments, Python bytecode, and secrets
# Built-in patterns: always excluded from Flash builds.
# Includes build artifacts, caches, virtual environments, IDE files,
# and files tracked by git but irrelevant to deployment (tests, docs).
always_ignore = [
# Build artifacts and caches
".build/",
".flash/",
".runpod/", # Legacy directory — keep ignored during upgrade window
".venv/",
"venv/",
".runpod/",
"*.tar.gz",
".git/",
".gitignore",
"__pycache__/",
"*.pyc",
"*.pyo",
"*.pyd",
"*.egg-info/",
"dist/",
"build/",
# Virtual environments
".venv/",
"venv/",
"env/",
# IDE
".vscode/",
".idea/",
# Environment files
".env",
".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",
]
Comment thread
deanq marked this conversation as resolved.
patterns.extend(always_ignore)

Expand Down
41 changes: 0 additions & 41 deletions src/runpod_flash/cli/utils/skeleton_template/.flashignore

This file was deleted.

2 changes: 1 addition & 1 deletion tests/integration/test_lb_remote_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def get_status():

with tempfile.TemporaryDirectory() as tmpdir:
project_dir = Path(tmpdir)
py_file = project_dir / "test_api.py"
py_file = project_dir / "api_worker.py"
py_file.write_text(code)

scanner = RuntimeScanner(project_dir)
Expand Down
Loading
Loading