mirror of
https://github.com/kjanat/articulate-parser.git
synced 2026-01-16 13:42:10 +01:00
4.5 KiB
4.5 KiB
Contributing to Articulate Rise Parser
Thank you for your interest in contributing to the Articulate Rise Parser! We welcome contributions from the community.
Code of Conduct
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
How Can I Contribute?
Reporting Bugs
Before creating bug reports, please check existing issues as you might find that the issue has already been reported. When creating a bug report, include as many details as possible:
- Use the bug report template
- Include sample Articulate Rise content that reproduces the issue
- Provide your environment details (OS, Go version, etc.)
- Include error messages and stack traces
Suggesting Enhancements
Enhancement suggestions are welcome! Please use the feature request template and include:
- A clear description of the enhancement
- Your use case and why this would be valuable
- Any implementation ideas you might have
Pull Requests
- Fork the repository and create your branch from
master - Make your changes following our coding standards
- Add tests for any new functionality
- Ensure all tests pass by running
go test ./... - Run
go fmtto format your code - Run
go vetto check for common issues - Update documentation if needed
- Create a pull request with a clear title and description
Development Setup
- Prerequisites:
- Go 1.21 or later
- Git
- Clone and setup:
git clone https://github.com/your-username/articulate-parser.git
cd articulate-parser
go mod download
- Run tests:
go test -v ./...
- Build:
go build main.go
Coding Standards
Go Style Guide
- Follow the Go Code Review Comments
- Use
gofmtto format your code - Use meaningful variable and function names
- Add comments for exported functions and types
- Keep functions focused and small
Testing
- Write tests for new functionality
- Use table-driven tests where appropriate
- Aim for good test coverage
- Test error cases and edge conditions
Commit Messages
Use clear and meaningful commit messages:
Add support for new content type: interactive timeline
- Parse timeline content blocks
- Export timeline data to markdown
- Add tests for timeline parsing
- Update documentation
Fixes #123
Project Structure
articulate-parser/
├── main.go # Entry point and CLI handling
├── parser/ # Core parsing logic
├── exporters/ # Output format handlers
├── types/ # Data structures
├── utils/ # Utility functions
├── tests/ # Test files and data
└── docs/ # Documentation
Adding New Features
New Content Types
- Add the content type definition to
types/ - Implement parsing logic in
parser/ - Add export handling in
exporters/ - Write comprehensive tests
- Update documentation
New Export Formats
- Create a new exporter in
exporters/ - Implement the
Exporterinterface - Add CLI support in
main.go - Add tests with sample output
- Update README with usage examples
Testing
Running Tests
# Run all tests
go test ./...
# Run tests with coverage
go test -cover ./...
# Run tests with race detection
go test -race ./...
# Run specific test
go test -run TestSpecificFunction ./...
Test Data
- Add sample Articulate Rise JSON files to
tests/data/ - Include both simple and complex content examples
- Test edge cases and error conditions
Documentation
- Update the README for user-facing changes
- Add inline code comments for complex logic
- Update examples when adding new features
- Keep the feature list current
Release Process
Releases are handled by maintainers:
- Version bumping follows semantic versioning
- Releases are created from the
masterbranch - GitHub Actions automatically builds and publishes releases
- Release notes are auto-generated from commits
Questions?
- Open a discussion for general questions
- Use the question issue template for specific help
- Check existing issues and documentation first
Recognition
Contributors will be recognized in release notes and the project README. Thank you for helping make this project better!