We welcome contributions from the community! This project follows standard Apache project guidelines.
- How to Contribute
- Code Standards
- Pull Request Guidelines
- Development Workflow
- Testing
- Reporting Issues
- Code of Conduct
# Fork via GitHub UI, then clone your fork
git clone https://github.com/YOUR-USERNAME/dfe-developer
cd dfe-developer
git remote add upstream https://github.com/hyperi-io/dfe-developergit checkout -b feature/your-feature-name
# Or for bug fixes
git checkout -b fix/issue-description- Follow the KISS principle (Keep It Simple, Stupid)
- Use existing code style and conventions
- Run scripts as regular user with per-command sudo
- Test on a clean Fedora 42 system if possible
- Update documentation as needed
cd fedora/tests
# Static analysis (required)
./01-shellcheck.sh
# Syntax validation
bats 02-syntax.bats
# Unit tests
bats 03-lib-functions.bats
# Container tests (optional)
bats 04-container.batsUse conventional commit format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changeschore:- Maintenance tasksrefactor:- Code refactoringtest:- Test additions or fixes
git add .
git commit -m "feat: add support for Ubuntu 22.04"Important:
- Write clear, concise commit messages
- No tool attribution in commit messages
- Reference issue numbers:
fix: resolve #123
git push origin feature/your-feature-nameThen create a PR via GitHub UI targeting the main branch.
- Shebang: Always use
#!/bin/bash - Error Handling: Scripts must source lib.sh and use centralized error handling
- Execution: Run as regular user, use sudo only when needed
- Idempotency: Scripts must be safe to run multiple times
- Library Functions: Use lib.sh functions for consistency
print_info()- Informational messagesprint_error()- Error messagesprint_warning()- Warning messagesprint_success()- Success messages
# Good - uses lib.sh functions
print_info "Installing package..."
sudo dnf install -y package-name
# Bad - direct echo
echo "Installing package..."# Good - use pushd/popd
pushd /tmp >/dev/null || exit 1
# do work
popd >/dev/null || exit 1
# Bad - use cd
cd /tmp
# do work
cd -Always detect latest versions dynamically, never hardcode:
# Good - dynamic detection
CONFLUENT_VERSION=$(curl -sL https://packages.confluent.io/rpm/ 2>/dev/null | grep -oE '[0-9]+\.[0-9]+' | sort -V | tail -1)
if [ -z "$CONFLUENT_VERSION" ]; then
print_warning "Could not detect latest version, using fallback"
CONFLUENT_VERSION="8.1"
fi
# Bad - hardcoded version
CONFLUENT_VERSION="7.7"- All Output: ASCII only - no emojis or special Unicode characters
- Console Output: Plain text with standard symbols only
- Log Files: Plain ASCII only
- Code Comments: ASCII only
- Commit Messages: ASCII only
All scripts must have a standardized header:
#!/bin/bash
# ============================================================================
# script-name - Brief Description
# ============================================================================
# Longer description of what the script does
#
# USAGE:
# ./script-name.sh [options]
#
# INSTALLS/OPTIMIZES:
# - Item 1
# - Item 2
#
# NOTE: Important context or prerequisites
#
# LICENSE:
# Licensed under the Apache License, Version 2.0
# See ../LICENSE file for full license text
# ============================================================================- All tests pass (ShellCheck and BATS)
- Code follows project style guidelines
- Documentation updated (README.md, STATE.md)
- CHANGELOG.md updated if applicable
- Commit messages follow conventional format
- No merge conflicts with main branch
Include:
- Summary: What does this PR do?
- Motivation: Why is this change needed?
- Testing: How was it tested?
- Screenshots: If UI changes
- Breaking Changes: Clearly marked if any
- Keep PRs focused and reasonably sized
- Split large changes into multiple PRs
- One feature or fix per PR
- Maintainers will review within 48 hours
- Address review feedback promptly
- Keep PR updated with main branch
- Be respectful in discussions
# Clone and setup
git clone https://github.com/YOUR-USERNAME/dfe-developer
cd dfe-developer
# Keep your fork synced
git remote add upstream https://github.com/hyperi-io/dfe-developer
git fetch upstream
git rebase upstream/main- Check existing issues before starting work
- Create an issue for discussion if needed
- Create a feature branch
- Make changes incrementally
- Test frequently
- Commit with clear messages
When adding functions to lib.sh:
- Add function in appropriate section
- Include error handling
- Add BATS unit test in
tests/03-lib-functions.bats - Document function in STATE.md
Example:
# In lib.sh
my_new_function() {
local param="$1"
if [ -z "$param" ]; then
print_error "Parameter required"
return 1
fi
# function logic
return 0
}
# In tests/03-lib-functions.bats
@test "my_new_function works correctly" {
run my_new_function "test"
[ "$status" -eq 0 ]
}All contributions must pass:
-
ShellCheck: Static analysis
cd fedora/tests ./01-shellcheck.sh -
Syntax Tests: Bash syntax validation
bats 02-syntax.bats
-
Unit Tests: lib.sh function tests
bats 03-lib-functions.bats
- Container Tests: Integration tests
bats 04-container.bats
- New functions must have corresponding unit tests
- Changes to existing functions require test updates
- Integration tests for installer scripts
Test Systems:
For HyperSec developers, test systems are available. See STATE.md (not public) for access details.
Fedora (clean VM):
# Reset Fedora test VM (fast - uses snapshot)
# Contact maintainers for test system access
# Test playbook:
ansible-playbook -i tests/fedora/inventory.yml playbooks/main.ymlUbuntu (clean VM):
# Reset Ubuntu test VM (fast - uses snapshot)
# Contact maintainers for test system access
# Test playbook:
ansible-playbook -i tests/ubuntu/inventory.yml playbooks/main.ymlmacOS (clean system):
# ⚠️ WARNING: Mac mini provisioning takes 20-30 minutes!
# Only reset when absolutely necessary (major changes, broken state)
# Use sparingly to avoid unnecessary costs and time
# Contact maintainers for test system access
# Reset Mac mini test system (SLOW - full OS install)
cd ansible
ansible-playbook -i tests/mac/inventory_scaleway.yml tests/provision_scaleway_mac.yml
# Test playbook:
ansible-playbook -i tests/mac/inventory_scaleway.yml playbooks/main.ymlLegacy Fedora Shell Scripts:
cd fedora
# Standard installation
./install-dfe-developer.sh
# Core developer tools
./install-dfe-developer-core.sh
# VM optimizations
./install-vm-optimizer.sh
# RDP optimizations
./install-rdp-optimizer.shUse GitHub Issues and include:
- Fedora Version: Output of
cat /etc/fedora-release - Script: Which script(s) failed
- Error Output: Full error messages and logs
- Steps to Reproduce: Clear reproduction steps
- Expected Behavior: What should have happened
- Actual Behavior: What actually happened
Include:
- Use Case: Why is this feature needed?
- Proposed Solution: How should it work?
- Alternatives: Other approaches considered
- Additional Context: Relevant information
- Check existing issues before creating new ones
- Comment on existing issues if you have the same problem
- Use issue templates when available
- Be respectful and professional
- Focus on technical merit
- Welcome newcomers and help them learn
- Provide constructive feedback
- Accept constructive criticism gracefully
- Harassment or discriminatory language
- Personal attacks or trolling
- Publishing others' private information
- Other conduct inappropriate in a professional setting
Violations will result in:
- Warning from maintainers
- Temporary ban from project
- Permanent ban for repeated violations
Report issues to project maintainers via GitHub Issues.
- STATE.md - Detailed project context and design decisions
- README.md - Project overview and quick start
- CHANGELOG.md - Version history
- LICENSE - Apache License 2.0 text
- Open a GitHub Issue for questions
- Check STATE.md for development context
- Review existing PRs for examples
Thank you for contributing to DFE Developer Environment!