Workflow compliance
All contributions must follow the established workflow rules from the hive/hive repository.Required reading
General workflow
Claude-specific workflow rules
Git guidelines
Branching and merge requests
Contributing guide
Bug reports and enhancements
Key requirements
Development setup
Prerequisites
- Git: Version control
- Python 3.12+: For Python development
- Node.js 20.11+: For TypeScript development
- Poetry 2.1.3: Python dependency management
- pnpm: TypeScript package manager
- Protobuf compiler: For protocol buffer generation
Clone the repository
Set up Python development
Set up TypeScript development
Making changes
Branching strategy
Create a feature branch fromdevelop:
Code style
Python
- Follow PEP 8 style guidelines
- Use Ruff for linting
- Use MyPy for type checking
- Maximum line length: 120 characters
TypeScript
- Follow project ESLint configuration
- Use TypeScript strict mode
- Document public APIs with JSDoc comments
Running tests
Always run tests before committing:Commit messages
Write clear, descriptive commit messages:- feat: New feature
- fix: Bug fix
- docs: Documentation changes
- test: Test additions or changes
- refactor: Code refactoring
- perf: Performance improvements
- chore: Build process or auxiliary tool changes
Submitting changes
Create a merge request
-
Push your branch to GitLab:
- Create a merge request on GitLab
- Mark it as Draft initially
-
Fill in the MR template with:
- Description of changes
- Testing performed
- Related issues
MR checklist
Review process
- Wait for maintainer review
- Address review feedback
- Use fixup commits for review changes:
- Once approved, maintainer will remove Draft status
- Rebase and squash before merge:
Development guidelines
Architecture
Understand the codebase structure:-
core/: Common C++ code shared by Python and TypeScript
- Tightly integrated with hive submodule
- Uses
libraries/protocolandlibraries/fc - Avoid deep scanning during analysis
-
python/: Python implementation
- Cython bindings in
wax/cpp_python_bridge.pyx - Public API in
wax/__init__.py - Internal implementation in
wax/_private/
- Cython bindings in
-
ts/: TypeScript implementation
- WASM compilation from C++
- Minimize final NPM package size
- Core in
wasm/lib/detailed/
Protocol buffers
Protocol buffers are generated fromhive/libraries/protocol/proto/:
- TypeScript: Generated to
ts/wasm/lib/proto/viats-proto - Python: Generated to
python/wax/_private/proto/viagrpcio-tools
ts/protobuf_patterns/: TypeScript patternspython/protobuf_patterns/: Python patterns
Testing guidelines
Write tests for new features
- Add unit tests for new functions/methods
- Add integration tests for complex features
- Ensure tests are deterministic
Use the mock server
For API-related tests, use the provided mock server:Test coverage
Aim for high test coverage:- Unit tests for core functionality
- Integration tests for API calls
- End-to-end tests for complete workflows
Documentation
Updating documentation
When adding new features:- Update API reference documentation
- Add usage examples
- Update guides if applicable
- Add changelog entry
Python docstrings
Use Google-style docstrings:TypeScript JSDoc
Document public APIs:Common contribution types
Adding a new operation
- Define operation in protocol buffers (if not already defined)
- Implement in both Python and TypeScript
- Add tests for the operation
- Add example usage
- Update documentation
Adding a new API endpoint
- Extend the API interface
- Implement the endpoint call
- Add response type definitions
- Add tests
- Document the new endpoint
Fixing a bug
- Write a failing test that reproduces the bug
- Fix the bug
- Verify the test passes
- Add regression test
- Document the fix in changelog
Getting help
GitLab issues
Report bugs or request features
Discussions
Ask questions and discuss ideas
Contact maintainers
For questions about contributing:- Open a discussion on GitLab
- Comment on related issues
- Tag maintainers in merge requests
License
By contributing to WAX, you agree that your contributions will be licensed under the project’s license. See LICENSE.md for details.Next steps
Building from source
Learn how to build WAX
Running tests
Run tests and examples