Thank you for your interest in contributing to Cuisine Code! This document provides guidelines and instructions for contributing to the project.
All contributors are expected to adhere to our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to apace@defrecord.com.
graph TD
A[Project Root] --> B[scheme/]
A --> C[web/]
A --> D[c-output/]
A --> E[docs/]
A --> F[tools/]
B --> G[src/]
B --> H[tests/]
G --> I[core/]
G --> J[game/]
G --> K[ui/]
G --> L[social/]
C --> M[src/]
C --> N[wasm/]
F --> O[scheme-to-c.scm]
F --> P[c-to-wasm.sh]See SETUP.org for detailed setup instructions. The basic steps are:
- Install required dependencies:
- Guile Scheme 3.x
- Emscripten
- Node.js
- FreeBSD-compatible build tools
- Clone the repository:
git clone https://github.com/defrecord/cuisine-code.git cd cuisine-code - Install project dependencies:
make deps - Build the project:
make all
- Fork the repository: Create your own fork of the project.
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes: Implement your feature or fix.
- Follow the coding standards:
- All code must be in Scheme
- Follow the project’s style guide
- Add appropriate documentation
- Include tests for new functionality
- Run tests:
make test - Commit your changes:
git commit -m "feat: Add your feature description" - Push to your fork:
git push origin feature/your-feature-name - Submit a Pull Request: Create a pull request from your fork to the main repository.
We follow conventional commits for commit messages. The basic format is:
<type>[optional scope]: <description> [optional body] [optional footer(s)]
Types include:
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing tests or correcting existing tests
- chore: Changes to the build process or auxiliary tools
- Update the documentation with details of changes, including new features, API changes, etc.
- Update the version numbers in any examples files and the README to the new version
- Ensure all tests pass
- The PR may be merged once it receives approval from at least two maintainers
- Write code in Scheme
- Aim for readability and maintainability
- Follow functional programming principles
- Add appropriate documentation
- Implement proper error handling
- Use 2-space indentation
- Prefer kebab-case for function and variable names
- Include docstrings for all public functions
- Group related functions together
- Use meaningful names that reflect purpose
;; Good example
(define (transform-ingredient ingredient transformation)
"Apply a transformation to an ingredient."
(cond
((eq? transformation 'chop)
(string-append "chopped " ingredient))
((eq? transformation 'dice)
(string-append "diced " ingredient))
(else
(error "Unknown transformation" transformation))))- Include docstrings for all public functions
- Document parameters and return values
- Explain non-obvious behaviors
- Include examples for complex functions
- Keep documentation up-to-date with code changes
- Write tests for all new functions
- Focus on testing individual units of functionality
- Test edge cases and error conditions
- Aim for high test coverage
- Test interactions between components
- Ensure system works as a whole
- Test realistic user workflows
;; Example test case
(define-test-case "transform-ingredient-test"
(assert-equal "chopped carrot"
(transform-ingredient "carrot" 'chop))
(assert-equal "diced onion"
(transform-ingredient "onion" 'dice))
(assert-error (transform-ingredient "garlic" 'unknown-transformation)))Documentation is as important as code. Ways to contribute to documentation:
- Improve existing documentation
- Add examples and tutorials
- Create diagrams and visual aids
- Fix typos and clarify explanations
- Translate documentation
- Use the issue tracker to submit feature requests and bug reports
- Provide detailed descriptions
- Include steps to reproduce bugs
- Suggest implementation approaches for features
- Label issues appropriately
All contributions will be reviewed by project maintainers. The review process includes:
- Code review for quality and style
- Test verification
- Documentation review
- Integration testing
- Performance consideration
All contributors will be recognized in the project’s CONTRIBUTORS.md file. Significant contributions may lead to maintainer status.
- REQUIREMENTS.org: Project requirements and architecture
- ARCHITECTURE.org: System design information
- API Documentation: Reference for internal APIs
- Project Wiki: Additional guidance and tutorials