We appreciate all contributions! Here's how to get involved.
If you're fixing a bug, please go ahead and submit a pull request without prior discussion.
Include:
- A test that reproduces the bug (fails before your fix, passes after)
- A clear commit message explaining what was broken and why
If you plan to contribute new features, please first open an issue and discuss the feature with us before writing code. This avoids wasted effort on features that may not fit the project's direction.
# Clone the repo
git clone https://github.com/MrDebugger/bs2json.git
cd bs2json
# Install in editable mode
pip install -e .
# Run tests
python3 -m pytest tests/tests.py -vbs2json/
├── __init__.py # Public API exports
├── models.py # ConversionConfig dataclass
├── serializer.py # Stateless recursive conversion engine
├── converter.py # BS2Json orchestrator class
└── extension.py # install()/remove() monkey-patching
All changes must include tests. Run the full suite before submitting:
python3 -m pytest tests/tests.py -v- Tests live in
tests/tests.py - Expected outputs for the standard test HTML are in
tests/expected_output.py - Aim for tests that verify behavior, not implementation details
- Follow existing patterns in the codebase
- Use type hints for public method signatures
- Keep files focused — one responsibility per module
- No new dependencies unless absolutely necessary
This project follows Semantic Versioning:
- MAJOR (x.0.0): Breaking changes to the public API (removed/renamed methods, changed output format, removed parameters)
- MINOR (0.x.0): New features that are backward-compatible (new parameters with defaults, new methods, new exports)
- PATCH (0.0.x): Bug fixes and internal improvements that don't change the public API
BS2Jsonclass and all its public methodsConversionConfigdataclass and its fieldsinstall()andremove()functions- The JSON output structure for both default and
group_by_tagmodes
| Change | Version bump |
|---|---|
Fix a bug in convert() |
PATCH |
Add a new option like strip=True |
MINOR |
| Change default output format | MAJOR |
Rename convert_all() to something else |
MAJOR |
Add a new method to BS2Json |
MINOR |
| Restructure internal modules (no API change) | PATCH |
- Create a feature branch from
master - Make your changes with tests
- Run the full test suite
- Submit a PR with a clear description of what and why