Contributing¶
Thank you for your interest in contributing to ontoink! Every contribution helps — from bug reports to code, documentation, and ideas.
Reporting Issues¶
Found a bug? Have a feature request? Please open an issue on GitHub:
Bug Reports¶
When reporting a bug, please include:
- What you expected to happen
- What actually happened (screenshots help!)
- Steps to reproduce the problem
- Your environment: Python version, ontoink version (
pip show ontoink), browser - Relevant TTL files (if possible) — a minimal example that triggers the bug
Feature Requests¶
Have an idea for a new feature? We'd love to hear it. When opening a feature request:
- Describe the use case — what problem does it solve?
- Sketch out the desired behavior
- Note any alternatives you've considered
Development Setup¶
1. Fork and clone¶
2. Install in editable mode¶
3. Run the test suite¶
4. Serve the demo site locally¶
Open http://127.0.0.1:8000 to see your changes in real time.
Code Contributions¶
Workflow¶
- Open an issue first to discuss proposed changes
- Fork the repository
- Create a feature branch from
main - Make your changes
- Add tests for new functionality
- Ensure
pytestpasses - Submit a pull request
Project Structure¶
ontoink/
__init__.py
plugin.py # MkDocs plugin entry point
fence.py # Custom fence handler (```ontoink blocks)
ttl_parser.py # RDF/TTL parsing and Cytoscape JSON generation
shacl_validator.py # pySHACL validation wrapper
resources/
ontoink.js # Frontend: Cytoscape, editor, export, popups
ontoink.css # Frontend: all styles
tests/
test_fence.py
test_ttl_parser.py
test_shacl_validator.py
demo/
mkdocs.yml # Demo site configuration
docs/ # Demo documentation pages
Key Guidelines¶
- Python code is in
ontoink/— parsing, validation, HTML generation - JavaScript code is in
ontoink/resources/ontoink.js— all frontend logic - CSS is in
ontoink/resources/ontoink.css - Keep JS/CSS as single files (no build step, loaded inline by the plugin)
- All new features should have corresponding tests
Questions?¶
Not sure where to start? Open a discussion and we'll point you in the right direction.