First off, thank you for considering contributing to Codesi! π
Codesi is a community-driven project, and we welcome contributions from developers of all skill levels. Whether you're fixing a typo, adding a feature, or improving documentation, every contribution matters.
- Code of Conduct
- Getting Started
- How Can I Contribute?
- Development Setup
- Coding Guidelines
- Commit Guidelines
- Pull Request Process
- Community
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the maintainers.
- Python 3.7 or higher
- Git
- A GitHub account
- Basic understanding of Python (for code contributions)
New to open source? Here are some good first issues:
- Documentation improvements
- Adding examples
- Fixing typos
- Writing tests
- Translating error messages
Look for issues labeled good first issue or help wanted.
Before creating a bug report:
- Check the existing issues
- Try the latest version
- Collect debug information
Bug Report Template:
## Bug Description
A clear description of the bug
## Steps to Reproduce
1. Create file with code: ...
2. Run command: ...
3. See error: ...
## Expected Behavior
What should happen
## Actual Behavior
What actually happened
## Environment
- Codesi Version: 1.0.0
- Python Version: 3.9.0
- OS: Windows 10 / macOS 12 / Ubuntu 20.04
## Additional Context
Any other relevant informationWe love new ideas! Before suggesting:
- Check if it's already suggested
- Ensure it aligns with Codesi's goals
- Consider if it benefits most users
Feature Request Template:
## Feature Description
Clear description of the feature
## Use Case
Why is this feature needed?
## Proposed Syntax (if applicable)
```codesi
// Example code showing the featureOther ways to achieve this
Links, references, mockups
### 3. π Improving Documentation
Documentation is crucial! You can help by:
- Fixing typos and grammar
- Adding examples
- Clarifying confusing sections
- Translating to other languages
- Adding more detailed explanations
### 4. π¨ Adding Examples
Share your Codesi programs! We need:
- Beginner-friendly examples
- Real-world use cases
- Algorithm implementations
- Game examples
- Utility scripts
### 5. π» Writing Code
Ready to code? Here's what we need:
- Bug fixes
- New features
- Performance improvements
- Test coverage
- Refactoring
---
## π οΈ Development Setup
### 1. Fork and Clone
```bash
# Fork the repository on GitHub, then:
git clone https://github.com/codesi-lang
cd codesi
# Create a new branch for your feature
git checkout -b feature/your-feature-name
# Or for bug fixes
git checkout -b fix/bug-descriptionEdit codesi.py and test your changes:
# Test with REPL
python codesi.py
# Test with a file
python codesi.py test.cds
# Debug mode
python codesi.py test.cds --debugCreate test cases in the examples/ folder:
// test_your_feature.cds
// Test your new feature here
Run through common scenarios:
- β Basic functionality
- β Edge cases
- β Error handling
- β Integration with existing features
If you changed:
- Syntax: Update
docs/SYNTAX_GUIDE.md - Functions: Update
docs/BUILTIN_FUNCTIONS.md - Features: Update
README.mdand relevant docs - Examples: Add to
examples/folder
Follow PEP 8 with these specifics:
# Use descriptive variable names
def visit_BinaryOp(self, node): # Good
def vbo(self, n): # Bad
# Add docstrings for complex functions
def complex_function(param):
"""
Brief description of what this does.
Args:
param: Description of parameter
Returns:
Description of return value
"""
pass
# Use type hints where helpful
def tokenize(self) -> List[Token]:
pass
# Keep functions focused (single responsibility)
# Use dataclasses for structured data
# Comment complex logicWhen adding language features:
-
Hinglish First: Use natural Hindi-English mix
// Good agar (condition) { ... } // Avoid pure English if (condition) { ... } -
Consistency: Follow existing patterns
// We use 'karya' for functions karya name() { ... } // Don't introduce 'function' -
Beginner-Friendly: Clear error messages
# Good raise CodesiError("Variable 'x' define nahi hai") # Bad raise CodesiError("Undefined variable: x")
-
Multiple Syntaxes: Support learning progression
// Both should work har i se 0 tak 5 { ... } har i ke liye (0 se 5 tak) { ... }
# Keep this structure in codesi.py:
# 1. Imports and constants
# 2. Token types (Enum)
# 3. Token and AST classes (@dataclass)
# 4. Lexer class
# 5. Parser class
# 6. Exception classes
# 7. Runtime classes (Function, Class, Object)
# 8. Special systems (JAADU, Samjho, TimeMachine)
# 9. Interpreter class
# 10. Runner functions (run_codesi, run_file, repl, main)Before submitting, verify:
- Code runs without errors
- All existing features still work
- New feature works as expected
- Error messages are helpful
- Documentation is updated
- Examples are added (if applicable)
- No performance regression
- JAADU suggestions work correctly (if modified)
- Samjho explanations are accurate (if modified)
- Time Machine snapshots correctly (if modified)
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting)refactor: Code refactoringtest: Adding testschore: Maintenance tasks
Examples:
feat(parser): add support for switch-case statements
- Implemented SwitchCase AST node
- Added case and default keywords
- Updated parser to handle multiple cases
Closes #123
---
fix(lexer): handle escape sequences in strings
- Fixed \n, \t escape handling
- Added \r, \b, \f, \v support
- Added tests for edge cases
Fixes #456
---
docs(examples): add fibonacci sequence example
- Created examples/fibonacci.cds
- Shows both recursive and iterative approaches
- Added comments explaining logic- Write clear, descriptive messages
- Keep commits focused (one logical change)
- Reference issues when applicable
- Use present tense ("add feature" not "added feature")
-
Update your fork:
git remote add upstream https://github.com/codesi-lang git fetch upstream git merge upstream/main
-
Run final tests:
# Test REPL python codesi.py # Test all examples for file in examples/*.cds; do python codesi.py "$file" done
-
Update documentation: Ensure README.md and docs/ are current
-
Push your branch:
git push origin feature/your-feature-name
-
Create Pull Request on GitHub with this template:
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring
## Changes Made
- Change 1
- Change 2
- Change 3
## Testing Done
- [ ] Tested in REPL
- [ ] Tested with example files
- [ ] Tested edge cases
- [ ] Updated documentation
## Screenshots (if UI changes)
[Add screenshots]
## Related Issues
Closes #123
Related to #456
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Comments added for complex code
- [ ] Documentation updated
- [ ] No breaking changes (or documented)
- [ ] All tests pass- Automated checks will run (if configured)
- Maintainers review your code
- Discussion may happen on the PR
- Changes requested may need addressing
- Approval and merge once ready
- Delete your branch (optional)
- Update your fork
- Celebrate! π You're now a Codesi contributor!
- Testing Framework: Help build comprehensive tests
- VSCode Extension: Syntax highlighting for
.cdsfiles - Performance: Optimize interpreter performance
- Standard Library: Add more built-in functions
- Documentation: Improve and expand docs
Check Issues for:
- Features marked
help wanted - Documentation improvements
- Performance optimizations
- New examples
- Package manager (CPI - Codesi Package Index)
- JIT compilation
- Mobile app (Android/iOS)
- Web-based playground
- Debugger protocol
- IDE integrations
- GitHub Issues: Bug reports, feature requests
- GitHub Discussions: Questions, ideas, showcase
- Pull Requests: Code contributions
- Discord: (Coming soon!)
- Read the Documentation
- Check existing issues
- Ask in GitHub Discussions
- Tag maintainers for urgent issues
Contributors are recognized in:
- README.md Contributors section
- CHANGELOG.md for each version
- GitHub contributor graphs
- Special mentions for significant contributions
We maintain high standards:
- β Code Quality: Clean, readable, documented
- β Testing: Thoroughly tested changes
- β Documentation: Clear and comprehensive
- β Performance: No unnecessary slowdowns
- β Security: Safe and secure code
- β Accessibility: Features work for all users
Every contribution, no matter how small, helps make Codesi better. We appreciate your time and effort!
Special Thanks to all our contributors! π
Project Maintainer: Rishaank Gupta
- GitHub: @rishaankgupta
- Email: codesilang@gmail.com
Project Repository: https://github.com/codesi-lang
Happy Contributing! π
Made with β€οΈ by the Codesi Community