Welcome Contributors
Shed Skin is an open source project that thrives on community contributions. Whether you’re fixing bugs, adding features, improving documentation, or extending library support, your contributions are valued and appreciated.Shed Skin has successfully participated in Google Summer of Code and GHOP. Students are encouraged to apply for yearly programs!
Ways to Contribute
Report Bugs
Found a bug? Please report it!- Check existing issues: Search GitHub Issues to avoid duplicates
- Create a new issue: Provide:
- Minimal code example that reproduces the bug
- Shed Skin version (
shedskin --version) - Operating system and version
- Expected vs. actual behavior
- Full error message and traceback
- Be responsive: Answer questions from maintainers to help debug
Suggest Features
Have ideas for improvements?- Open a GitHub issue with the
enhancementlabel - Describe the feature and its use case
- Explain why it would benefit Shed Skin users
- Discuss implementation approaches if you have ideas
Contribute Code
Code contributions are especially welcome for:- Bug fixes
- Performance improvements
- Support for additional Python features
- New library module implementations
- Test coverage improvements
- Build system enhancements
Improve Documentation
Documentation contributions help everyone:- Fix typos and unclear explanations
- Add examples and tutorials
- Document undocumented features
- Improve API documentation
- Translate documentation
Add Library Support
One of the most valuable contributions is adding support for more standard library modules. See Adding Library Modules below.Getting Started
Easy Tasks
New to the project? Start with issues labeled easytask on GitHub. These are beginner-friendly tasks that will help you understand the codebase.Development Setup
Prerequisites
- Python 3.8 or later
- Git
- C++ compiler (g++, clang, or MSVC)
- uv (Python package installer)
Clone the Repository
Install Development Dependencies
Shed Skin usesuv for dependency management:
Verify Installation
Project Structure
Key directories and files:Development Workflow
Making Changes
-
Create a branch for your changes:
- Make your changes following the code style
- Test your changes (see Testing below)
-
Commit with clear messages:
-
Push your branch:
- Open a Pull Request on GitHub
Code Style
Shed Skin follows Python best practices:- PEP 8: Follow Python style guide
- Type hints: Use type annotations (the codebase is gradually being typed)
- Docstrings: Document functions and classes
- Mypy: The codebase is moving towards mypy strict mode
Running Mypy
Type check your changes:Testing
Running Tests
Unit Tests
Run Python unit tests with pytest:Integration Tests
Run full compilation tests:Writing Tests
When adding features or fixing bugs, add tests:Unit Tests
Add totests/unit/:
Integration Tests
Add totests/:
- File:
test_<name>.py - Functions:
test_<name>() - Include
test_all()that calls all test functions - Must run with
python test_myfeature.pyandpytest
Test Standards
All tests should:- ✅ Run successfully with
pytest - ✅ Run successfully with
python test_file.py - ✅ Compile and run correctly with Shed Skin
- ✅ Use meaningful names that describe what’s being tested
- ✅ Include assertions to verify correctness
- ✅ Avoid using
globalkeyword (pytest incompatibility) - ✅ Complete quickly (adjust parameters for speed)
Adding Library Modules
Adding support for Python standard library modules is one of the most valuable contributions. Currently, about 30 modules are supported, but many more could be added.How Library Modules Work
Shed Skin library modules consist of two parts:- Type model (
shedskin/lib/modulename.py): Python code that provides type information for inference - C++ implementation (
shedskin/resources/lib/modulename.{hpp,cpp}): C++ code that implements the functionality
Adding a Module: Step by Step
1. Create a Type Model
Createshedskin/lib/modulename.py with Python signatures:
The type model doesn’t need to be functional - only the signatures matter. Shed Skin uses it only for type inference.
2. Compile the Type Model
Create a test program that uses the module:modulename.cpp and modulename.hpp.
3. Implement C++ Code
Editmodulename.cpp and modulename.hpp to implement actual functionality:
4. Move to Library Directory
Move the files to make them part of Shed Skin:import modulename.
5. Add Tests
Createtests/test_lib_modulename.py:
Tips for Library Modules
- Start small: Begin with a few key functions
- Study existing modules: Look at
lib/random.py,lib/re.pyas examples - Use Shed Skin types: See
builtin.hppfor available C++ classes - Handle memory correctly: Use the Boehm GC (
newwithoutdelete) - Test thoroughly: Ensure compiled output matches Python behavior
- Document limitations: Note any partial implementations
Pull Request Process
Before Submitting
- ✅ Tests pass locally
- ✅ Code follows style guidelines
- ✅ Commits have clear messages
- ✅ No unrelated changes included
- ✅ Documentation updated if needed
Submitting PR
- Open Pull Request on GitHub
- Fill out PR template with:
- Description of changes
- Related issue numbers
- Testing performed
- Breaking changes (if any)
- Respond to feedback from maintainers
- Update PR based on review comments
After Submission
- CI tests will run automatically
- Maintainers will review your code
- Address any requested changes
- Once approved, your PR will be merged
Community
Communication
- GitHub Issues: Bug reports, feature requests, questions
- Pull Requests: Code review and discussion
- Discussions: General questions and community interaction
Code of Conduct
Be respectful and professional:- Welcome newcomers
- Be patient with questions
- Provide constructive feedback
- Focus on the code, not the person
- Respect different opinions and approaches
Recognition
All contributors are acknowledged in the README. Your contributions, no matter how small, are valued and appreciated. Thank you for contributing to Shed Skin!Contributors
Shed Skin has been developed by many contributors over the years. Current active maintainers and major contributors include:- Mark Dufour - Original author and maintainer
- Many others - See the full list in the README