Contributing to Expresso
We welcome contributions to Expresso! This guide will help you get started with contributing to the project.
Getting Started
Prerequisites
- Java 17 or higher
- Maven 3.6 or higher
- Git
Setup
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/your-username/expresso.git
cd expresso - Add the upstream repository:
git remote add upstream https://github.com/glaamouri/expresso.git
- Create a branch for your work:
git checkout -b feature/your-feature-name
Building Locally
mvn clean install
Running Tests
mvn test
Development Guidelines
Code Style
Expresso follows standard Java code style conventions:
- Use 4 spaces for indentation (no tabs)
- Use camelCase for variables and methods
- Use PascalCase for class names
- Use UPPER_SNAKE_CASE for constants
Adding Tests
We use JUnit 5 for testing. Add tests for any new functionality:
@Test
void testMyNewFunction() {
ExpressionEvaluator evaluator = new ExpressionEvaluator();
Context context = new Context();
context.setVariable("a", 10);
context.setVariable("b", 20);
Object result = evaluator.evaluate("myNewFunction($a, $b)", context);
assertEquals(expectedValue, result);
}
Pull Request Process
Update your branch with the latest upstream changes:
git fetch upstream
git rebase upstream/mainRun all tests to ensure your changes don't break existing functionality:
mvn test
Push your changes to your fork:
git push origin feature/your-feature-name
Create a pull request on GitHub with a clear description:
- What the PR changes
- Why these changes are needed
- Any related issues
Address any code review feedback
Documentation
When adding new features, please update the documentation:
- Update relevant Markdown files in the
docs/
directory - Add Javadoc comments to public API methods
- Provide examples of how to use the new feature
Reporting Bugs
When reporting bugs, please include:
- What you were trying to do
- The actual result
- The expected result
- Steps to reproduce
- Version information (Java version, OS, Expresso version)
- If possible, a minimal code example that reproduces the bug
Feature Requests
Feature requests are welcome! When suggesting a feature:
- Describe the problem you're trying to solve
- Explain how your feature would help
- Provide examples of how the feature would be used
- If possible, suggest an implementation approach
Code of Conduct
- Be respectful and inclusive
- Focus on constructive feedback
- Accept feedback graciously
- Help others learn and grow
Thank you for contributing to Expresso!