Learn how to create and submit high-quality pull requests to Apache Superset.
pre-commit run --all-files)# Update your fork git fetch upstream git checkout master git merge upstream/master git push origin master # Create feature branch git checkout -b feature/your-feature-name
# Make changes edit files... # Run tests pytest tests/unit_tests/ cd superset-frontend && npm run test # Run linting pre-commit run --all-files # Commit with conventional format git add . git commit -m "feat(dashboard): add new filter component"
Follow Conventional Commits:
type(scope): description
Types:
feat: New featurefix: Bug fixdocs: Documentation onlystyle: Code style (formatting, semicolons, etc.)refactor: Code refactoringperf: Performance improvementtest: Adding testschore: Maintenance tasksci: CI/CD changesbuild: Build system changesrevert: Reverting changesScopes:
dashboard: Dashboard functionalitysqllab: SQL Lab featuresexplore: Chart explorerchart: Visualization componentsapi: REST API endpointsdb: Database connectionssecurity: Security featuresconfig: ConfigurationExamples:
feat(sqllab): add query cost estimation fix(dashboard): resolve filter cascading issue docs(api): update REST endpoint documentation refactor(explore): simplify chart controls logic perf(dashboard): optimize chart loading
Use the template from .github/PULL_REQUEST_TEMPLATE.md:
### SUMMARY Brief description of changes and motivation. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF [Required for UI changes] ### TESTING INSTRUCTIONS 1. Step-by-step instructions 2. How to verify the fix/feature 3. Any specific test scenarios ### ADDITIONAL INFORMATION - [ ] Has associated issue: #12345 - [ ] Required feature flags: - [ ] API changes: - [ ] DB migration required: ### CHECKLIST - [ ] CI checks pass - [ ] Tests added/updated - [ ] Documentation updated - [ ] PR title follows conventions
# Push to your fork git push origin feature/your-feature-name # Create PR via GitHub CLI gh pr create --title "feat(sqllab): add query cost estimation" \ --body-file .github/PULL_REQUEST_TEMPLATE.md # Or use the GitHub web interface
# Good git commit -m "fix(dashboard): prevent duplicate API calls when filters change" # Bad git commit -m "fix bug" git commit -m "updates"
# Backend test example def test_new_feature(): """Test that new feature works correctly.""" result = new_feature_function() assert result == expected_value
// Frontend test example test('renders new component', () => { const { getByText } = render(<NewComponent />); expect(getByText('Expected Text')).toBeInTheDocument(); });
### Before  ### After 
/docs directoryAll PRs must pass:
Python Tests - Backend unit/integration testsFrontend Tests - JavaScript/TypeScript testsLinting - Code style checksType Checking - MyPy and TypeScriptLicense Check - Apache license headersDocumentation Build - Docs compile successfully# Run locally to debug pytest tests/unit_tests/ -v pytest tests/integration_tests/ -v
cd superset-frontend npm run test -- --coverage
# Auto-fix many issues pre-commit run --all-files # Manual fixes may be needed for: # - MyPy type errors # - Complex ESLint issues # - License headers
# Make requested changes edit files... # Add commits (don't amend during review) git add . git commit -m "fix: address review feedback" git push origin feature/your-feature-name
# Update your branch git fetch upstream git rebase upstream/master # Resolve conflicts edit conflicted files... git add . git rebase --continue # Force push (only to your feature branch!) git push --force-with-lease origin feature/your-feature-name
# Delete local branch git checkout master git branch -d feature/your-feature-name # Delete remote branch git push origin --delete feature/your-feature-name # Update your fork git fetch upstream git merge upstream/master git push origin master