# Contributing to Semantica Thank you for your interest in contributing! Every contribution, no matter how small, is valuable. ๐ŸŽ‰ โญ **Give us a Star** โ€ข ๐Ÿด **[Fork Semantica](https://github.com/Hawksight-AI/semantica/fork)** โ€ข ๐Ÿ’ฌ **Join our [Discord](https://discord.gg/sV34vps5hH)** > **New to contributing?** Start with a [`good first issue`](https://github.com/Hawksight-AI/semantica/labels/good%20first%20issue) or join our [Discord](https://discord.gg/sV34vps5hH) community. --- ## ๐Ÿš€ Quick Start 1. Find a [`good first issue`](https://github.com/Hawksight-AI/semantica/labels/good%20first%20issue) 2. [Fork Semantica](https://github.com/Hawksight-AI/semantica/fork) & clone the repository 3. Make your changes 4. Submit a pull request! **Need help?** Join [Discord](https://discord.gg/sV34vps5hH) or [GitHub Discussions](https://github.com/Hawksight-AI/semantica/discussions) --- ## ๐ŸŽฏ Ways to Contribute ### ๐Ÿ’ป Code **What you can do:** - Fix bugs - Add new features - Improve code quality (add type hints, docstrings, improve error messages) - Optimize performance **Where:** `semantica/` directory **Good first issues:** Add docstrings, type hints, or improve error messages --- ### ๐Ÿ“ Documentation **What you can do:** - Fix typos and grammar errors - Improve clarity and readability - Add code examples and tutorials - Create new cookbook notebooks - Improve API documentation (docstrings) - Create troubleshooting guides - Update installation instructions - Add missing documentation **Where:** `README.md`, `docs/`, `cookbook/`, docstrings in code **Good first issues:** Fix typos, add examples, create cookbook tutorials, improve docstrings **Documentation formatting:** - Use clear, concise language - Include code examples where helpful - Follow markdown best practices - Use proper headings hierarchy - Add links to related sections - Include screenshots for UI-related docs --- ### ๐Ÿงช Testing **What you can do:** - Add unit tests - Improve test coverage - Add integration tests **Where:** `tests/` directory **Good first issues:** Add tests for specific functions or classes --- ### ๐Ÿ› Bug Reports **What:** Report bugs you find **How:** Use the [bug report template](https://github.com/Hawksight-AI/semantica/issues/new?template=bug_report.md) **Include:** Description, steps to reproduce, expected vs actual behavior, environment details --- ### ๐Ÿ’ก Feature Requests **What:** Suggest new features or improvements **How:** Use the [feature request template](https://github.com/Hawksight-AI/semantica/issues/new?template=feature_request.md) **Include:** Problem statement, proposed solution, use cases --- ### ๐ŸŽจ Cookbook & Examples **What:** Create tutorials and examples **Where:** `cookbook/` directory **Examples:** Create new notebooks, add examples, improve existing tutorials --- ### ๐Ÿ’ฌ Community Support **What:** Help others in the community **Where:** [Discord](https://discord.gg/sV34vps5hH), [GitHub Discussions](https://github.com/Hawksight-AI/semantica/discussions) **Examples:** Answer questions, review PRs, share your projects --- ### ๐ŸŽ“ Educational Content **What:** Create educational materials **Examples:** Blog posts, video tutorials, talks, workshops, case studies --- ### ๐Ÿ”ง Other Contributions - **Design & Graphics:** Logos, diagrams, visualizations - **Tools & Integrations:** CLI tools, integrations with other frameworks - **Infrastructure:** CI/CD improvements, Docker optimization - **Security:** Report security vulnerabilities (privately) --- ## ๐Ÿ“‹ Getting Started ### 1. Fork & Clone First, [fork Semantica](https://github.com/Hawksight-AI/semantica/fork) on GitHub, then: ```bash git clone https://github.com/your-username/semantica.git cd semantica git remote add upstream https://github.com/Hawksight-AI/semantica.git ``` ### 2. Set Up Environment ```bash # Create virtual environment python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate # Install dev dependencies pip install -e ".[dev]" # Install pre-commit hooks (optional) pre-commit install ``` ### 3. Create Branch ```bash git checkout -b feature/your-feature-name # or git checkout -b fix/bug-description ``` ### 4. Make Changes - Follow code style (see below) - Add tests for new features - Update documentation ### 5. Run Checks ```bash pytest # Run tests black semantica/ tests/ # Format code isort semantica/ tests/ # Sort imports flake8 semantica/ tests/ # Lint ``` Or use pre-commit hooks: `pre-commit run --all-files` ### 6. Commit & Push ```bash git commit -m "feat(module): add new feature" git push origin feature/your-feature-name ``` Then create a pull request on GitHub! --- ## ๐Ÿ“ Code Style We use automated tools: | Tool | Purpose | Command | |----------|----------------------------|----------------------------| | **Black** | Code formatting | `black semantica/ tests/` | | **isort** | Import sorting | `isort semantica/ tests/` | | **flake8** | Style enforcement | `flake8 semantica/ tests/` | | **mypy** | Type checking | `mypy semantica/` | **Run all:** `black semantica/ tests/ && isort semantica/ tests/ && flake8 semantica/ tests/ && mypy semantica/` --- ## ๐Ÿงช Testing ```bash pytest # Run all tests pytest --cov=semantica # With coverage pytest tests/test_file.py # Specific file ``` **Coverage goal:** 80% minimum, 90%+ for critical modules --- ## ๐Ÿ“ Commit Messages Use [Conventional Commits](https://www.conventionalcommits.org/): ``` feat(kg): add temporal graph support fix(parse): handle empty PDF files docs(readme): add installation guide test(extract): add unit tests ``` **Types:** `feat`, `fix`, `docs`, `test`, `refactor`, `perf`, `style`, `chore` --- ## โœ… PR Checklist Before submitting: - [ ] Code follows style guidelines - [ ] Tests pass locally - [ ] New tests added (if applicable) - [ ] Documentation updated - [ ] Commit messages follow conventions - [ ] No merge conflicts --- ## ๐Ÿ“– Documentation Standards ### Code Documentation (Docstrings) **Format:** Use Google-style docstrings ```python def extract_entities(text: str, model: str = "transformer") -> List[Entity]: """Extract named entities from text. Args: text: Input text to process model: NER model to use (default: "transformer") Returns: List of extracted Entity objects Raises: ValueError: If text is empty or model is invalid Example: >>> from semantica.semantic_extract import NERExtractor >>> ner = NERExtractor(method="ml", model="en_core_web_sm") >>> entities = ner.extract("Apple Inc. was founded in 1976.") >>> len(entities) 2 """ ``` ### Markdown Documentation Formatting **General Guidelines:** - Use clear headings (H1 for title, H2 for main sections, H3 for subsections) - Keep paragraphs short and focused - Use bullet points for lists - Add code blocks with syntax highlighting - Include links to related documentation **Code Blocks:** - Use triple backticks with language identifier: ` ```python `, ` ```bash ` - Include comments in code examples - Show expected output when helpful **Examples:** ```markdown ## Section Title Brief introduction paragraph. ### Subsection - Bullet point 1 - Bullet point 2 **Code example:** ```python from semantica import SomeClass instance = SomeClass() result = instance.method() ``` **Note:** Additional context or warnings. ``` **Best Practices:** - Start with an overview/introduction - Use consistent terminology - Include "See also" links - Add examples for complex concepts - Keep formatting consistent across docs --- ## ๐Ÿ†˜ Getting Help - ๐Ÿ’ฌ [Discord](https://discord.gg/sV34vps5hH) - Real-time chat - ๐Ÿ’ญ [GitHub Discussions](https://github.com/Hawksight-AI/semantica/discussions) - Q&A - ๐Ÿ› [GitHub Issues](https://github.com/Hawksight-AI/semantica/issues) - Bug reports **Before asking:** Check existing documentation, search issues/discussions, review cookbook examples --- ## ๐Ÿ† Recognition All contributors are recognized in: - [CONTRIBUTORS.md](CONTRIBUTORS.md) - GitHub contributors page - Release notes We follow the [all-contributors](https://allcontributors.org) specification! --- ## ๐Ÿ“œ Code of Conduct This project follows a [Code of Conduct](CODE_OF_CONDUCT.md). Be respectful and inclusive. --- ## ๐Ÿ“š Resources - [README.md](README.md) - Project overview - [Cookbook](cookbook/) - Tutorials and examples - [Documentation](docs/) - Comprehensive guides --- **Thank you for contributing!** ๐Ÿš€ Every contribution matters - whether it's a single line of code, a typo fix, a helpful answer, or a bug report. We appreciate you! ๐Ÿ™ โญ **Give us a Star** โ€ข ๐Ÿด **[Fork Semantica](https://github.com/Hawksight-AI/semantica/fork)** โ€ข ๐Ÿ’ฌ **Join our [Discord](https://discord.gg/sV34vps5hH)**