Graph-Native Infrastructure for Context and Accountable AI Systems
Python agent-memoryaiai-governanceai-infrastructureartificial-intelligencecontext-engineeringcontext-graphsdata-engineeringdecision-intelligencedeveloper-toolsexplainable-aigenerative-aigraph-ragknowledge-graphllmontologyprovenancepythonreasoningsemantic-search
docs: Add comprehensive open source project improvements
KaifAhmad103b84ab23889
diff --git a/.all-contributorsrc b/.all-contributorsrcnew file mode 100644index 00000000..77741d45--- /dev/null+++ b/.all-contributorsrc@@ -0,0 +1,17 @@+{+ "projectName": "Semantica",+ "projectOwner": "Hawksight-AI",+ "repoType": "github",+ "repoHost": "https://github.com",+ "files": [+ "CONTRIBUTORS.md"+ ],+ "imageSize": 100,+ "commit": true,+ "commitConvention": "conventional",+ "contributors": [],+ "contributorsPerLine": 7,+ "badgeTemplate": "[](#contributors)",+ "skipCi": true+}+diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.mdnew file mode 100644index 00000000..46a50bbf--- /dev/null+++ b/.github/ISSUE_TEMPLATE/bug_report.md@@ -0,0 +1,59 @@+---+name: Bug Report+about: Create a report to help us improve+title: '[BUG] '+labels: bug+assignees: ''+---++## Bug Description++A clear and concise description of what the bug is.++## Steps to Reproduce++1. Go to '...'+2. Run command '...'+3. See error++## Expected Behavior++A clear and concise description of what you expected to happen.++## Actual Behavior++A clear and concise description of what actually happened.++## Environment++- **OS**: [e.g., Windows 10, Ubuntu 22.04, macOS 13.0]+- **Python Version**: [e.g., 3.9.7]+- **Semantica Version**: [e.g., 0.0.1]+- **Installation Method**: [e.g., pip, source, conda]++## Code Example++```python+# Minimal code example that reproduces the issue+from semantica import Semantica++core = Semantica()+# ... your code here+```++## Error Messages / Logs++```+Paste error messages or logs here+```++## Additional Context++- Screenshots (if applicable)+- Related issues or PRs+- Any other context about the problem++## Possible Solution++If you have ideas on how to fix this, please share them here.+diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.ymlnew file mode 100644index 00000000..7dc393d7--- /dev/null+++ b/.github/ISSUE_TEMPLATE/config.yml@@ -0,0 +1,12 @@+blank_issues_enabled: false+contact_links:+ - name: GitHub Discussions+ url: https://github.com/Hawksight-AI/semantica/discussions+ about: Ask questions and discuss ideas with the community+ - name: Discord Community+ url: https://discord.gg/semantica+ about: Join our Discord server for real-time help and discussions+ - name: Security Issues+ url: https://github.com/Hawksight-AI/semantica/security/advisories/new+ about: Report security vulnerabilities privately+diff --git a/.github/ISSUE_TEMPLATE/documentation_issue.md b/.github/ISSUE_TEMPLATE/documentation_issue.mdnew file mode 100644index 00000000..dcac72c3--- /dev/null+++ b/.github/ISSUE_TEMPLATE/documentation_issue.md@@ -0,0 +1,64 @@+---+name: Documentation Issue+about: Report an issue or suggest improvements to documentation+title: '[DOCS] '+labels: documentation+assignees: ''+---++## Documentation Section++Which section or page is affected?++- [ ] Getting Started+- [ ] API Reference+- [ ] Concepts+- [ ] Cookbook+- [ ] Examples+- [ ] Other: ___________++**URL or File Path**: [e.g., docs/getting-started.md]++## Current Content++What is the current content or issue?++```markdown+Paste current content here+```++## Problem++What is wrong or unclear about the current documentation?++- [ ] Typo or grammar error+- [ ] Outdated information+- [ ] Missing information+- [ ] Unclear explanation+- [ ] Broken link+- [ ] Code example doesn't work+- [ ] Other: ___________++## Proposed Changes++What should the documentation say instead?++```markdown+Proposed content here+```++## Rationale++Why is this change needed? How does it improve the documentation?++## Additional Context++- Screenshots (if applicable)+- Related issues or PRs+- Any other context++## Contribution++- [ ] I'm willing to submit a PR with the fix+- [ ] I can help review the changes+diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.mdnew file mode 100644index 00000000..e1b224a1--- /dev/null+++ b/.github/ISSUE_TEMPLATE/feature_request.md@@ -0,0 +1,59 @@+---+name: Feature Request+about: Suggest an idea for this project+title: '[FEATURE] '+labels: enhancement+assignees: ''+---++## Problem Statement++A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]++## Proposed Solution++A clear and concise description of what you want to happen.++## Alternatives Considered++A clear and concise description of any alternative solutions or features you've considered.++## Use Cases++Describe specific use cases where this feature would be helpful:++1. Use case 1+2. Use case 2+3. Use case 3++## Impact Assessment++- **Who would benefit?** [e.g., All users, specific user groups]+- **Priority**: [Low, Medium, High, Critical]+- **Breaking Changes**: [Yes/No - if yes, describe]+- **Dependencies**: [Any dependencies or related features]++## Implementation Ideas++If you have ideas on how this could be implemented, please share:++```python+# Example API or code structure+from semantica import NewFeature++feature = NewFeature()+# ...+```++## Additional Context++- Related issues or PRs+- References to similar features in other projects+- Any other context, mockups, or examples++## Contribution++- [ ] I'm willing to help implement this feature+- [ ] I can help with documentation+- [ ] I can help with testing+diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.mdnew file mode 100644index 00000000..53baaefc--- /dev/null+++ b/.github/ISSUE_TEMPLATE/question.md@@ -0,0 +1,63 @@+---+name: Question+about: Ask a question about Semantica+title: '[QUESTION] '+labels: question+assignees: ''+---++## Question++What is your question?++## Context++Provide context about your question:++- What are you trying to accomplish?+- What have you tried so far?+- What specific aspect do you need help with?++## Code Example++If applicable, include code that demonstrates your question:++```python+from semantica import Semantica++# Your code here+```++## Environment++- **OS**: [e.g., Windows 10, Ubuntu 22.04, macOS 13.0]+- **Python Version**: [e.g., 3.9.7]+- **Semantica Version**: [e.g., 0.0.1]++## What You've Tried++- [ ] Checked the documentation+- [ ] Searched GitHub issues+- [ ] Searched GitHub discussions+- [ ] Checked the cookbook examples+- [ ] Tried debugging on my own++## Additional Information++Any other information that might be helpful:++- Error messages+- Logs+- Screenshots+- Related issues or discussions++## Expected Response++What kind of help are you looking for?++- [ ] Quick answer+- [ ] Detailed explanation+- [ ] Code example+- [ ] Point to documentation+- [ ] Other: ___________+diff --git a/.github/dependabot.yml b/.github/dependabot.ymlnew file mode 100644index 00000000..f7bf7849--- /dev/null+++ b/.github/dependabot.yml@@ -0,0 +1,25 @@+version: 2+updates:+ - package-ecosystem: "pip"+ directory: "/"+ schedule:+ interval: "weekly"+ open-pull-requests-limit: 10+ reviewers:+ - "Hawksight-AI"+ labels:+ - "dependencies"+ - "python"+ commit-message:+ prefix: "deps"+ include: "scope"++ - package-ecosystem: "github-actions"+ directory: "/"+ schedule:+ interval: "monthly"+ open-pull-requests-limit: 5+ labels:+ - "dependencies"+ - "github-actions"+diff --git a/.github/pull_request_template.md b/.github/pull_request_template.mdnew file mode 100644index 00000000..9006c0dc--- /dev/null+++ b/.github/pull_request_template.md@@ -0,0 +1,120 @@+## Description++<!-- Provide a brief description of your changes -->++## Type of Change++<!-- Mark the relevant option with an 'x' -->++- [ ] Bug fix (non-breaking change which fixes an issue)+- [ ] New feature (non-breaking change which adds functionality)+- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)+- [ ] Documentation update+- [ ] Code refactoring+- [ ] Performance improvement+- [ ] Test addition or update+- [ ] Other (please describe): ___________++## Related Issues++<!-- Link related issues using keywords like "Closes", "Fixes", "Resolves" -->++Closes #+Related to #+Fixes #++## Changes Made++<!-- List the main changes in this PR -->++- Change 1+- Change 2+- Change 3++## Testing++<!-- Describe the tests you ran and how to verify your changes -->++- [ ] Tests pass locally+- [ ] Added new tests for new functionality+- [ ] Updated existing tests+- [ ] All tests pass (`pytest`)+- [ ] Code coverage maintained or improved++### Test Results++```+Paste test output or command here+```++## Documentation++<!-- Checklist for documentation updates -->++- [ ] Updated relevant documentation+- [ ] Added code examples if applicable+- [ ] Updated API reference if adding new APIs+- [ ] Updated cookbook if adding new examples+- [ ] No documentation changes needed++## Code Quality++<!-- Checklist for code quality -->++- [ ] Code follows style guidelines (black, isort, flake8)+- [ ] Type hints added for new functions+- [ ] Docstrings added/updated+- [ ] No new warnings or errors+- [ ] Self-review completed++### Code Quality Checks++```bash+# Run these commands and ensure they pass+black semantica/ tests/+isort semantica/ tests/+flake8 semantica/ tests/+mypy semantica/+pytest+```++## Breaking Changes++<!-- If this is a breaking change, describe the impact and migration path -->++**Breaking Changes**: [Yes/No]++If yes, describe:+- What breaks+- Why it's necessary+- How to migrate++## Screenshots / Examples++<!-- If applicable, add screenshots or code examples -->++```python+# Example usage of new feature+```++## Checklist++<!-- Mark completed items with an 'x' -->++- [ ] My code follows the project's style guidelines+- [ ] I have performed a self-review of my code+- [ ] I have commented my code, particularly in hard-to-understand areas+- [ ] I have made corresponding changes to the documentation+- [ ] My changes generate no new warnings+- [ ] I have added tests that prove my fix is effective or that my feature works+- [ ] New and existing unit tests pass locally with my changes+- [ ] Any dependent changes have been merged and published++## Additional Notes++<!-- Any additional information, context, or notes for reviewers -->++## Reviewer Notes++<!-- Any specific areas you'd like reviewers to focus on -->+diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlnew file mode 100644index 00000000..cbf1fd3d--- /dev/null+++ b/.github/workflows/ci.yml@@ -0,0 +1,99 @@+name: CI++on:+ push:+ branches: [ main, develop ]+ pull_request:+ branches: [ main, develop ]++jobs:+ test:+ name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}+ runs-on: ${{ matrix.os }}+ strategy:+ fail-fast: false+ matrix:+ os: [ubuntu-latest, windows-latest, macos-latest]+ python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']++ steps:+ - uses: actions/checkout@v4++ - name: Set up Python ${{ matrix.python-version }}+ uses: actions/setup-python@v5+ with:+ python-version: ${{ matrix.python-version }}++ - name: Cache pip packages+ uses: actions/cache@v4+ with:+ path: ~/.cache/pip+ key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt', '**/pyproject.toml') }}+ restore-keys: |+ ${{ runner.os }}-pip-++ - name: Install dependencies+ run: |+ python -m pip install --upgrade pip+ pip install -e ".[dev]"++ - name: Run tests+ run: |+ pytest --cov=semantica --cov-report=xml --cov-report=html++ - name: Upload coverage to Codecov+ uses: codecov/codecov-action@v4+ if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'+ with:+ file: ./coverage.xml+ flags: unittests+ name: codecov-umbrella++ lint:+ name: Lint Code+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v4++ - name: Set up Python+ uses: actions/setup-python@v5+ with:+ python-version: '3.11'++ - name: Install dependencies+ run: |+ python -m pip install --upgrade pip+ pip install -e ".[dev]"++ - name: Run black+ run: black --check semantica/ tests/++ - name: Run isort+ run: isort --check-only semantica/ tests/++ - name: Run flake8+ run: flake8 semantica/ tests/++ - name: Run mypy+ run: mypy semantica/+ continue-on-error: true++ type-check:+ name: Type Check+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v4++ - name: Set up Python+ uses: actions/setup-python@v5+ with:+ python-version: '3.11'++ - name: Install dependencies+ run: |+ python -m pip install --upgrade pip+ pip install -e ".[dev]"++ - name: Run mypy+ run: mypy semantica/+diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.ymlnew file mode 100644index 00000000..b7bcfd3b--- /dev/null+++ b/.github/workflows/dependabot.yml@@ -0,0 +1,33 @@+name: Dependabot Auto-merge++on:+ pull_request:+ types: [opened, synchronize, reopened]++jobs:+ dependabot:+ name: Dependabot+ runs-on: ubuntu-latest+ if: github.actor == 'dependabot[bot]'+ steps:+ - uses: actions/checkout@v4++ - name: Set up Python+ uses: actions/setup-python@v5+ with:+ python-version: '3.11'++ - name: Install dependencies+ run: |+ python -m pip install --upgrade pip+ pip install -e ".[dev]"++ - name: Run tests+ run: pytest++ - name: Auto-merge Dependabot PRs+ if: success()+ uses: fastify/github-action-merge-dependabot@v3+ with:+ github-token: ${{ secrets.GITHUB_TOKEN }}+diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.ymlindex f66b3039..205cb514 100644--- a/.github/workflows/docs.yml+++ b/.github/workflows/docs.yml@@ -1,49 +1,79 @@-name: Deploy Documentation+name: Documentationon:push:- branches:- - main+ branches: [ main ]paths:- 'docs/**'+ - 'mkdocs.yml'- '.github/workflows/docs.yml'- workflow_dispatch:--permissions:- contents: read- pages: write- id-token: write--concurrency:- group: "pages"- cancel-in-progress: false+ pull_request:+ branches: [ main ]+ paths:+ - 'docs/**'+ - 'mkdocs.yml'jobs:build:+ name: Build Documentationruns-on: ubuntu-lateststeps:- - name: Checkout- uses: actions/checkout@v4-- - name: Setup Pages- uses: actions/configure-pages@v4-- - name: Build with Jekyll- uses: actions/jekyll-build-pages@v1- with:- source: ./docs-- - name: Upload artifact- uses: actions/upload-pages-artifact@v3-- deploy:- environment:- name: github-pages- url: ${{ steps.deployment.outputs.page_url }}+ - uses: actions/checkout@v4++ - name: Set up Python+ uses: actions/setup-python@v5+ with:+ python-version: '3.11'++ - name: Install dependencies+ run: |+ python -m pip install --upgrade pip+ pip install -r requirements-docs.txt+ pip install mkdocs-material mkdocstrings[python]++ - name: Build documentation+ run: mkdocs build --strict++ - name: Check for broken links+ run: |+ pip install linkchecker+ linkchecker site/ --check-extern++ - name: Deploy to GitHub Pages+ if: github.ref == 'refs/heads/main' && github.event_name == 'push'+ uses: peaceiris/actions-gh-pages@v3+ with:+ github_token: ${{ secrets.GITHUB_TOKEN }}+ publish_dir: ./site++ preview:+ name: Preview Documentationruns-on: ubuntu-latest- needs: build+ if: github.event_name == 'pull_request'steps:- - name: Deploy to GitHub Pages- id: deployment- uses: actions/deploy-pages@v4+ - uses: actions/checkout@v4++ - name: Set up Python+ uses: actions/setup-python@v5+ with:+ python-version: '3.11'++ - name: Install dependencies+ run: |+ python -m pip install --upgrade pip+ pip install -r requirements-docs.txt+ pip install mkdocs-material mkdocstrings[python]++ - name: Build documentation+ run: mkdocs build --strict+ - name: Comment PR with preview link+ uses: actions/github-script@v7+ with:+ script: |+ github.rest.issues.createComment({+ issue_number: context.issue.number,+ owner: context.repo.owner,+ repo: context.repo.repo,+ body: 'π Documentation preview will be available after merge.'+ })diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlnew file mode 100644index 00000000..5a305b4e--- /dev/null+++ b/.github/workflows/release.yml@@ -0,0 +1,55 @@+name: Release++on:+ push:+ tags:+ - 'v*'++jobs:+ release:+ name: Create Release+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v4+ with:+ fetch-depth: 0++ - name: Set up Python+ uses: actions/setup-python@v5+ with:+ python-version: '3.11'++ - name: Install dependencies+ run: |+ python -m pip install --upgrade pip+ pip install build twine++ - name: Extract version from tag+ id: tag+ run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT++ - name: Build package+ run: python -m build++ - name: Check package+ run: twine check dist/*++ - name: Create GitHub Release+ uses: actions/create-release@v1+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ with:+ tag_name: ${{ github.ref }}+ release_name: Release ${{ steps.tag.outputs.VERSION }}+ body_path: CHANGELOG.md+ draft: false+ prerelease: false++ - name: Publish to PyPI+ if: startsWith(github.ref, 'refs/tags/v')+ env:+ TWINE_USERNAME: __token__+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}+ run: twine upload dist/*+ continue-on-error: true+diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlnew file mode 100644index 00000000..60fc6a1b--- /dev/null+++ b/.pre-commit-config.yaml@@ -0,0 +1,80 @@+repos:+ - repo: https://github.com/pre-commit/pre-commit-hooks+ rev: v4.5.0+ hooks:+ - id: trailing-whitespace+ - id: end-of-file-fixer+ - id: check-yaml+ - id: check-json+ - id: check-toml+ - id: check-added-large-files+ args: ['--maxkb=1000']+ - id: check-merge-conflict+ - id: check-case-conflict+ - id: check-docstring-first+ - id: debug-statements+ - id: mixed-line-ending+ - id: name-tests-test+ args: ['--pytest-test-first']++ - repo: https://github.com/psf/black+ rev: 24.1.1+ hooks:+ - id: black+ language_version: python3+ args: ['--line-length=88']++ - repo: https://github.com/pycqa/isort+ rev: 5.13.2+ hooks:+ - id: isort+ args: ['--profile', 'black', '--line-length=88']++ - repo: https://github.com/pycqa/flake8+ rev: 7.0.0+ hooks:+ - id: flake8+ args: ['--max-line-length=88', '--extend-ignore=E203,W503']+ additional_dependencies:+ - flake8-docstrings+ - flake8-bugbear++ - repo: https://github.com/pre-commit/mirrors-mypy+ rev: v1.8.0+ hooks:+ - id: mypy+ additional_dependencies:+ - types-all+ args: ['--ignore-missing-imports', '--no-strict-optional']++ - repo: https://github.com/pre-commit/pygrep-hooks+ rev: v1.10.0+ hooks:+ - id: python-check-blanket-noqa+ - id: python-check-mock-methods+ - id: python-no-eval+ - id: python-no-log-warn++ - repo: https://github.com/PyCQA/bandit+ rev: 1.7.6+ hooks:+ - id: bandit+ args: ['-r', 'semantica/', '-f', 'json', '-o', 'bandit-report.json']+ exclude: ^tests/++ - repo: https://github.com/adrienverge/yamllint+ rev: v1.33.0+ hooks:+ - id: yamllint+ args: ['-d', '{extends: default, rules: {line-length: {max: 120}}}']++ - repo: local+ hooks:+ - id: pytest+ name: pytest+ entry: pytest+ language: system+ pass_filenames: false+ always_run: true+ args: ['-v', '--tb=short']+diff --git a/CHANGELOG.md b/CHANGELOG.mdnew file mode 100644index 00000000..853eae21--- /dev/null+++ b/CHANGELOG.md@@ -0,0 +1,69 @@+# Changelog++All notable changes to this project will be documented in this file.++The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).++## [Unreleased]++### Added+- Initial open source project structure+- Comprehensive documentation framework+- Contributing guidelines and code of conduct+- Security policy and vulnerability reporting process++## [0.0.1] - 2024-01-XX++### Added+- Core framework architecture+- Universal data ingestion (50+ file formats)+- Semantic intelligence engine (NER, relation extraction, event detection)+- Knowledge graph construction with entity resolution+- 6-stage ontology generation pipeline+- GraphRAG engine for hybrid retrieval+- Multi-agent system infrastructure+- Production-ready quality assurance modules+- Comprehensive documentation with MkDocs+- Cookbook with interactive tutorials+- Support for multiple vector stores (Pinecone, Weaviate, Qdrant, FAISS)+- Support for multiple graph databases (Neo4j, NetworkX, RDFLib)+- Temporal knowledge graph support+- Conflict detection and resolution+- Deduplication and entity merging+- Schema template enforcement+- Seed data management+- Multi-format export (RDF, JSON-LD, CSV, GraphML)+- Visualization tools+- Pipeline orchestration+- Streaming support (Kafka, RabbitMQ, Kinesis)+- Context engineering for AI agents+- Reasoning and inference engine++### Documentation+- Getting started guide+- API reference for all modules+- Concepts and architecture documentation+- Use case examples+- Cookbook tutorials+- Community projects showcase++---++## Types of Changes++- **Added** for new features+- **Changed** for changes in existing functionality+- **Deprecated** for soon-to-be removed features+- **Removed** for now removed features+- **Fixed** for any bug fixes+- **Security** for vulnerability fixes++## Migration Guides++When breaking changes are introduced, migration guides will be provided in the release notes and documentation.++---++For detailed release notes, see [GitHub Releases](https://github.com/Hawksight-AI/semantica/releases).+diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.mdnew file mode 100644index 00000000..228f84f0--- /dev/null+++ b/CODE_OF_CONDUCT.md@@ -0,0 +1,125 @@+# Contributor Covenant Code of Conduct++## Our Pledge++We as members, contributors, and leaders pledge to make participation in our+community a harassment-free experience for everyone, regardless of age, body+size, visible or invisible disability, ethnicity, sex characteristics, gender+identity and expression, level of experience, education, socio-economic status,+nationality, personal appearance, race, caste, color, religion, or sexual+identity and orientation.++We pledge to act and interact in ways that contribute to an open, welcoming,+diverse, inclusive, and healthy community.++## Our Standards++Examples of behavior that contributes to a positive environment for our+community include:++* Using welcoming and inclusive language+* Being respectful of differing viewpoints and experiences+* Gracefully accepting constructive criticism+* Focusing on what is best for the community+* Showing empathy towards other community members++Examples of unacceptable behavior include:++* The use of sexualized language or imagery, and sexual attention or advances of+ any kind+* Trolling, insulting or derogatory comments, and personal or political attacks+* Public or private harassment+* Publishing others' private information, such as a physical or email address,+ without their explicit permission+* Other conduct which could reasonably be considered inappropriate in a+ professional setting++## Enforcement Responsibilities++Community leaders are responsible for clarifying and enforcing our standards of+acceptable behavior and will take appropriate and fair corrective action in+response to any behavior that they deem inappropriate, threatening, offensive,+or harmful.++Community leaders have the right and responsibility to remove, edit, or reject+comments, commits, code, wiki edits, issues, and other contributions that are+not aligned to this Code of Conduct, and will communicate reasons for moderation+decisions when appropriate.++## Scope++This Code of Conduct applies within all community spaces, and also applies when+an individual is officially representing the community in public spaces.+Examples of representing our community include using an official e-mail address,+posting via an official social media account, or acting as an appointed+representative at an online or offline event.++## Enforcement++Instances of abusive, harassing, or otherwise unacceptable behavior may be+reported to the community leaders responsible for enforcement at+All complaints will be reviewed and investigated promptly and fairly.++All community leaders are obligated to respect the privacy and security of the+reporter of any incident.++## Enforcement Guidelines++Community leaders will follow these Community Impact Guidelines in determining+the consequences for any action they deem in violation of this Code of Conduct:++### 1. Correction+**Community Impact**: Use of inappropriate language or other behavior deemed+unprofessional or unwelcome in the community.++**Consequence**: A private, written warning from community leaders, providing+clarity around the nature of the violation and an explanation of why the+behavior was inappropriate. A public apology may be requested.++### 2. Warning+**Community Impact**: A violation through a single incident or series of+actions.++**Consequence**: A warning with consequences for continued behavior. No+interaction with the people involved, including unsolicited interaction with+those enforcing the Code of Conduct, for a specified period of time. This+includes avoiding interactions in community spaces as well as external channels+like social media. Violating these terms may lead to a temporary or permanent+ban.++### 3. Temporary Ban+**Community Impact**: A serious violation of community standards, including+sustained inappropriate behavior.++**Consequence**: A temporary ban from any sort of interaction or public+communication with the community for a specified period of time. No public or+private interaction with the people involved, including unsolicited interaction+with those enforcing the Code of Conduct, is allowed during this period.+Violating these terms may lead to a permanent ban.++### 4. Permanent Ban+**Community Impact**: Demonstrating a pattern of violation of community+standards, including sustained inappropriate behavior, harassment of an+individual, or aggression toward or disparagement of classes of individuals.++**Consequence**: A permanent ban from any sort of public interaction within the+community.++## Attribution++This Code of Conduct is adapted from the [Contributor Covenant][homepage],+version 2.1, available at+[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]++Community Impact Guidelines were inspired by+[Mozilla's code of conduct enforcement ladder][Mozilla CoC].++For answers to common questions about this code of conduct, see+[https://www.contributor-covenant.org/faq][FAQ]++[homepage]: https://www.contributor-covenant.org+[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html+[Mozilla CoC]: https://github.com/mozilla/diversity+[FAQ]: https://www.contributor-covenant.org/faq+diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdnew file mode 100644index 00000000..e18c4d60--- /dev/null+++ b/CONTRIBUTING.md@@ -0,0 +1,392 @@+# Contributing to Semantica++Thank you for your interest in contributing to Semantica! This document provides guidelines and instructions for contributing to the project.++## Table of Contents++- [Code of Conduct](#code-of-conduct)+- [Getting Started](#getting-started)+- [Development Setup](#development-setup)+- [Code Style Guidelines](#code-style-guidelines)+- [Testing Requirements](#testing-requirements)+- [Commit Message Conventions](#commit-message-conventions)+- [Pull Request Process](#pull-request-process)+- [Documentation Standards](#documentation-standards)+- [Types of Contributions](#types-of-contributions)+- [Getting Help](#getting-help)++## Code of Conduct++This project adheres to a [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to the maintainers.++## Getting Started++1. **Fork the repository** on GitHub+2. **Clone your fork** locally:+ ```bash+ git clone https://github.com/your-username/semantica.git+ cd semantica+ ```+3. **Add the upstream remote**:+ ```bash+ git remote add upstream https://github.com/Hawksight-AI/semantica.git+ ```++## Development Setup++### Prerequisites++- Python 3.8 or higher (3.9+ recommended)+- pip package manager+- Git++### Installation++1. **Create a virtual environment** (recommended):+ ```bash+ python -m venv venv+ source venv/bin/activate # On Windows: venv\Scripts\activate+ ```++2. **Install the project in editable mode with dev dependencies**:+ ```bash+ pip install -e ".[dev]"+ ```++3. **Install pre-commit hooks**:+ ```bash+ pre-commit install+ ```++### Verify Installation++```bash+python -c "import semantica; print(semantica.__version__)"+pytest --version+black --version+```++## Code Style Guidelines++We use several tools to maintain code quality and consistency:++### Formatting++- **Black**: Code formatting (line length: 88)+ ```bash+ black semantica/+ ```++- **isort**: Import sorting+ ```bash+ isort semantica/+ ```++### Linting++- **flake8**: Style guide enforcement+ ```bash+ flake8 semantica/+ ```++- **mypy**: Static type checking+ ```bash+ mypy semantica/+ ```++### Running All Checks++```bash+# Format code+black semantica/ tests/++# Sort imports+isort semantica/ tests/++# Lint+flake8 semantica/ tests/++# Type check+mypy semantica/+```++Or use pre-commit hooks (automatically runs on commit):+```bash+pre-commit run --all-files+```++## Testing Requirements++### Running Tests++```bash+# Run all tests+pytest++# Run with coverage+pytest --cov=semantica --cov-report=html++# Run specific test file+pytest tests/test_specific.py++# Run with verbose output+pytest -v+```++### Test Coverage++- Minimum coverage: **80%**+- Critical modules: **90%+**+- Coverage reports are generated in `htmlcov/`++### Writing Tests++- Follow pytest conventions+- Use descriptive test names+- Include docstrings for complex tests+- Test both success and failure cases+- Use fixtures for common setup++Example:+```python+def test_entity_extraction():+ """Test basic entity extraction functionality."""+ from semantica.semantic_extract import NamedEntityRecognizer++ ner = NamedEntityRecognizer()+ entities = ner.extract("Apple Inc. was founded by Steve Jobs.")++ assert len(entities) > 0+ assert any(e.text == "Apple Inc." for e in entities)+```++## Commit Message Conventions++We follow [Conventional Commits](https://www.conventionalcommits.org/) specification:++### Format++```+<type>(<scope>): <subject>++<body>++<footer>+```++### Types++- `feat`: New feature+- `fix`: Bug fix+- `docs`: Documentation changes+- `style`: Code style changes (formatting, etc.)+- `refactor`: Code refactoring+- `test`: Adding or updating tests+- `chore`: Maintenance tasks+- `perf`: Performance improvements+- `ci`: CI/CD changes++### Examples++```+feat(kg): add temporal graph support++Add support for temporal knowledge graphs with version tracking+and time-based queries.++Closes #123+```++```+fix(parse): handle empty PDF files gracefully++Previously, empty PDF files would cause a crash. Now they return+an empty document with appropriate warnings.++Fixes #456+```++## Pull Request Process++### Before Submitting++1. **Update your fork**:+ ```bash+ git fetch upstream+ git checkout main+ git merge upstream/main+ ```++2. **Create a feature branch**:+ ```bash+ git checkout -b feature/your-feature-name+ # or+ git checkout -b fix/bug-description+ ```++3. **Make your changes** and commit following our conventions++4. **Run all checks**:+ ```bash+ pytest+ black semantica/ tests/+ isort semantica/ tests/+ flake8 semantica/ tests/+ mypy semantica/+ ```++5. **Push to your fork**:+ ```bash+ git push origin feature/your-feature-name+ ```++### PR Checklist++- [ ] Code follows style guidelines+- [ ] Tests pass locally+- [ ] New tests added for new features+- [ ] Documentation updated+- [ ] Commit messages follow conventions+- [ ] No merge conflicts+- [ ] PR description is clear and complete++### PR Description Template++```markdown+## Description+Brief description of changes++## Type of Change+- [ ] Bug fix+- [ ] New feature+- [ ] Breaking change+- [ ] Documentation update++## Related Issues+Closes #123+Related to #456++## Testing+- [ ] Tests pass locally+- [ ] Added new tests+- [ ] Updated existing tests++## Checklist+- [ ] Code follows style guidelines+- [ ] Self-review completed+- [ ] Comments added for complex code+- [ ] Documentation updated+- [ ] No new warnings generated+```++## Documentation Standards++### Code Documentation++- Use Google-style docstrings+- Include type hints+- Document all public functions and classes+- Include examples for complex functions++Example:+```python+def extract_entities(+ text: str,+ model: str = "transformer",+ confidence_threshold: float = 0.7+) -> List[Entity]:+ """Extract named entities from text.++ Args:+ text: Input text to process+ model: NER model to use (default: "transformer")+ confidence_threshold: Minimum confidence score (default: 0.7)++ Returns:+ List of extracted Entity objects++ Raises:+ ValueError: If text is empty or model is invalid++ Example:+ >>> ner = NamedEntityRecognizer()+ >>> entities = ner.extract("Apple Inc. was founded in 1976.")+ >>> len(entities)+ 2+ """+ ...+```++### Documentation Files++- Update relevant documentation in `docs/`+- Add examples to cookbook if applicable+- Update API reference if adding new public APIs+- Keep README.md up to date++## Types of Contributions++### Code Contributions++- Bug fixes+- New features+- Performance improvements+- Refactoring++### Documentation Contributions++- Fix typos and grammar+- Improve clarity+- Add examples+- Create tutorials+- Translate documentation++### Testing Contributions++- Add test coverage+- Improve test quality+- Add integration tests+- Performance benchmarks++### Other Contributions++- Answer questions in discussions+- Help with issues+- Review pull requests+- Share use cases+- Report bugs+- Suggest features++## Getting Help++### Communication Channels++- **GitHub Discussions**: General questions and discussions+- **GitHub Issues**: Bug reports and feature requests+- **Discord**: Real-time chat and community support+- **Email**: [email protected]++### Before Asking for Help++1. Check existing documentation+2. Search GitHub issues and discussions+3. Review code examples in cookbook+4. Check FAQ in documentation++### Asking Good Questions++- Provide context and environment details+- Include code examples+- Show what you've tried+- Include error messages and logs+- Be specific about what you need++## Recognition++Contributors are recognized in:+- [CONTRIBUTORS.md](CONTRIBUTORS.md)+- GitHub contributors page+- Release notes for significant contributions++Thank you for contributing to Semantica! π+diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.mdnew file mode 100644index 00000000..c99d25cd--- /dev/null+++ b/CONTRIBUTORS.md@@ -0,0 +1,97 @@+# Contributors++Thank you to all the people who have contributed to Semantica! π++This project follows the [all-contributors](https://allcontributors.org) specification. Contributions of any kind are welcome!++## How to Contribute++We welcome contributions of all kinds! Whether you're:+- Writing code+- Improving documentation+- Reporting bugs+- Suggesting features+- Answering questions+- Reviewing pull requests+- Sharing use cases+- Creating examples++All contributions are valuable and appreciated!++## Contribution Types++- π» **Code**: Writing code, fixing bugs, implementing features+- π **Documentation**: Writing docs, tutorials, examples+- π **Bug Reports**: Finding and reporting bugs+- π‘ **Ideas**: Suggesting new features or improvements+- π¨ **Design**: UI/UX improvements, graphics, branding+- π **Examples**: Creating code examples and tutorials+- π **Testing**: Writing tests, improving test coverage+- π¬ **Answering Questions**: Helping others in discussions+- π’ **Talks**: Giving talks, presentations, workshops+- π **Translation**: Translating documentation+- π§ **Tools**: Creating tools, scripts, integrations+- π¦ **Packaging**: Improving build, release, distribution+- β οΈ **Security**: Reporting security vulnerabilities+- π **Education**: Teaching, mentoring, tutorials+- πΉ **Video**: Creating video content, tutorials+- π΅ **Audio**: Podcasts, audio content+- πΈ **Photography**: Screenshots, images+- π¬ **Research**: Research, analysis, studies+- π° **Financial**: Sponsoring, funding+- ποΈ **Infrastructure**: CI/CD, hosting, infrastructure+- π **Maintenance**: Maintenance, triage, project management++## Contributors++<!-- ALL-CONTRIBUTORS-LIST:START -->+<!-- This section is auto-generated by all-contributors bot -->+<!-- Do not edit this section manually -->++<!-- ALL-CONTRIBUTORS-LIST:END -->++## Recognition++### Top Contributors++Contributors are recognized based on their contributions to the project. Recognition includes:++- Listing in this file+- GitHub contributor statistics+- Special mentions in release notes+- Featured showcases for significant contributions++### Hall of Fame++Special recognition for exceptional contributions:++- **Coming soon** - We'll feature outstanding contributors here!++## How to Add Yourself++If you've contributed to Semantica and want to be added to this list:++1. **Automatic**: If you've made a commit, you'll appear in [GitHub's contributors graph](https://github.com/Hawksight-AI/semantica/graphs/contributors)+2. **Manual**: Open a PR adding yourself to this file, or use the [@all-contributors bot](https://allcontributors.org/docs/en/bot/usage)++Example:+```markdown+- [Your Name](https://github.com/yourusername) - π» π π+```++## All Contributors Bot++We use the [all-contributors](https://allcontributors.org) bot to automatically recognize contributors. To add a contributor, comment on an issue or PR:++```+@all-contributors please add @username for code, docs, bug+```++## Thank You!++Every contribution, no matter how small, helps make Semantica better. Thank you for being part of our community!++---++**Want to contribute?** Check out our [Contributing Guide](CONTRIBUTING.md) to get started!+diff --git a/README.md b/README.mdindex 6b557abc..601e71a3 100644--- a/README.md+++ b/README.md@@ -10,6 +10,11 @@[](https://pepy.tech/project/semantica)[](https://semantica.readthedocs.io/)[](https://discord.gg/semantica)+[](https://github.com/Hawksight-AI/semantica/actions)+[](https://github.com/psf/black)+[](https://github.com/Hawksight-AI/semantica/graphs/contributors)+[](https://github.com/Hawksight-AI/semantica/issues)+[](https://github.com/Hawksight-AI/semantica/pulls)**Open Source Framework for Semantic Intelligence & Knowledge Engineering**diff --git a/SECURITY.md b/SECURITY.mdnew file mode 100644index 00000000..d770254a--- /dev/null+++ b/SECURITY.md@@ -0,0 +1,166 @@+# Security Policy++## Supported Versions++We actively support the following versions of Semantica with security updates:++| Version | Supported |+| ------- | ------------------ |+| 0.0.1 | :white_check_mark: |+| < 0.0.1 | :x: |++## Reporting a Vulnerability++We take security vulnerabilities seriously. If you discover a security vulnerability, please follow these steps:++### 1. **Do NOT** create a public GitHub issue++Security vulnerabilities should be reported privately to prevent potential exploitation.++### 2. Email Security Team++Send an email to: **[email protected]**++Include the following information:++- **Type of vulnerability** (e.g., XSS, SQL injection, authentication bypass)+- **Affected component** (module, function, or file)+- **Steps to reproduce** (detailed description or proof-of-concept code)+- **Potential impact** (what could an attacker do?)+- **Suggested fix** (if you have one)+- **Your contact information** (for follow-up questions)++### 3. Response Timeline++- **Initial Response**: Within 48 hours+- **Status Update**: Within 7 days+- **Resolution**: Depends on severity and complexity++### 4. Disclosure Policy++- We will acknowledge receipt of your report within 48 hours+- We will provide regular updates on the status of the vulnerability+- Once fixed, we will credit you (if desired) in the security advisory+- We will coordinate public disclosure with you++## Security Update Process++1. **Assessment**: We assess the severity using CVSS scoring+2. **Fix Development**: We develop and test a fix+3. **Release**: We release a security update+4. **Advisory**: We publish a security advisory on GitHub+5. **Communication**: We notify users through appropriate channels++## Severity Levels++### Critical+- Remote code execution+- Authentication bypass+- Data breach or exposure+- **Response Time**: Immediate (within 24 hours)++### High+- Privilege escalation+- Significant data leakage+- Denial of service+- **Response Time**: Within 7 days++### Medium+- Information disclosure+- Cross-site scripting (XSS)+- CSRF vulnerabilities+- **Response Time**: Within 30 days++### Low+- Minor information leakage+- Best practice violations+- **Response Time**: Next release cycle++## Known Security Considerations++### Dependencies++We regularly update dependencies to address security vulnerabilities. However, you should:++- Keep your dependencies up to date+- Review security advisories for our dependencies+- Use tools like `pip-audit` or `safety` to check for known vulnerabilities++### API Keys and Credentials++- **Never commit API keys or credentials** to the repository+- Use environment variables or secure configuration management+- Rotate keys regularly+- Use least-privilege access principles++### Data Handling++- Be cautious when processing untrusted data+- Validate and sanitize all inputs+- Use parameterized queries for database operations+- Implement rate limiting for public APIs++### Network Security++- Use HTTPS for all network communications+- Validate SSL/TLS certificates+- Be cautious with external API calls+- Implement proper authentication and authorization++## Dependency Security Policy++### Regular Updates++- We monitor security advisories for all dependencies+- We update dependencies regularly in our development branch+- Critical security updates are backported to supported versions++### Reporting Dependency Vulnerabilities++If you discover a vulnerability in one of our dependencies:++1. Check if it's already reported upstream+2. Report to us if it affects Semantica specifically+3. We will coordinate with upstream maintainers if needed++### Security Scanning++We use automated tools to scan for vulnerabilities:++- **Dependabot**: Automated dependency updates and security alerts+- **GitHub Security Advisories**: Vulnerability tracking+- **Manual Reviews**: Regular security audits++## Best Practices for Users++1. **Keep Semantica Updated**: Always use the latest stable version+2. **Review Dependencies**: Regularly update your project dependencies+3. **Secure Configuration**: Use secure defaults and proper configuration+4. **Monitor Logs**: Watch for suspicious activity+5. **Report Issues**: Don't hesitate to report potential security issues++## Security Acknowledgments++We appreciate responsible disclosure. Security researchers who help us improve the security of Semantica will be:++- Credited in security advisories (if desired)+- Listed in our security acknowledgments+- Recognized for their contribution++## Contact++For security-related questions or concerns:++- **Email**: [email protected]+- **Subject**: [SECURITY] Brief description++## Additional Resources++- [OWASP Top 10](https://owasp.org/www-project-top-ten/)+- [Python Security Best Practices](https://python.readthedocs.io/en/latest/library/security.html)+- [GitHub Security Best Practices](https://docs.github.com/en/code-security)++---++**Thank you for helping keep Semantica and its users safe!**+diff --git a/SUPPORT.md b/SUPPORT.mdnew file mode 100644index 00000000..a7c0fb9b--- /dev/null+++ b/SUPPORT.md@@ -0,0 +1,130 @@+# Support++Need help with Semantica? You've come to the right place!++## Getting Help++### Documentation++Start with our comprehensive documentation:++- [Getting Started](docs/getting-started.md) - Quick start guide+- [Concepts](docs/concepts.md) - Core concepts+- [API Reference](docs/reference/core.md) - Complete API docs+- [Cookbook](docs/cookbook.md) - Interactive tutorials+- [FAQ](docs/faq.md) - Frequently asked questions++### Community Support++#### GitHub Discussions++**Best for**: General questions, feature discussions, and getting help++- [Ask a question](https://github.com/Hawksight-AI/semantica/discussions/new?category=q-a)+- [Browse discussions](https://github.com/Hawksight-AI/semantica/discussions)++#### Discord++**Best for**: Real-time chat and quick questions++- [Join Discord](https://discord.gg/semantica)++#### GitHub Issues++**Best for**: Bug reports and feature requests++- [Report a bug](https://github.com/Hawksight-AI/semantica/issues/new?template=bug_report.md)+- [Request a feature](https://github.com/Hawksight-AI/semantica/issues/new?template=feature_request.md)++### Before Asking++1. **Check the documentation** - Your question might already be answered+2. **Search existing issues** - Someone might have asked the same question+3. **Review the cookbook** - Examples might help+4. **Check the FAQ** - Common questions are answered there++## Reporting Issues++### Bug Reports++Use our [bug report template](https://github.com/Hawksight-AI/semantica/issues/new?template=bug_report.md) to report bugs.++Include:+- Clear description of the bug+- Steps to reproduce+- Expected vs actual behavior+- Environment details+- Error messages or logs++### Feature Requests++Use our [feature request template](https://github.com/Hawksight-AI/semantica/issues/new?template=feature_request.md) to suggest features.++Include:+- Problem statement+- Proposed solution+- Use cases+- Impact assessment++### Security Issues++**Do NOT** create a public issue for security vulnerabilities.++Instead:+- Email: [email protected]+- Subject: [SECURITY] Brief description+- See [Security Policy](SECURITY.md) for details++## Commercial Support++For enterprise support, custom development, or consulting:++- **Email**: [email protected]+- **Subject**: [ENTERPRISE] Your request++## Response Times++- **Community Support**: Best effort (volunteer-based)+- **Bug Reports**: Initial response within 48 hours+- **Security Issues**: Response within 24 hours+- **Enterprise**: Contact for SLA details++## Resources++### Learning++- [Documentation](https://semantica.readthedocs.io/)+- [Cookbook Tutorials](docs/cookbook.md)+- [Code Examples](docs/examples.md)+- [Use Cases](docs/use-cases.md)++### Community++- [Contributing Guide](CONTRIBUTING.md)+- [Code of Conduct](CODE_OF_CONDUCT.md)+- [Community Guidelines](docs/community.md)+- [Contributors](CONTRIBUTORS.md)++### Development++- [Architecture](docs/architecture.md)+- [Governance](docs/governance.md)+- [Roadmap](README.md#roadmap)++## FAQ++See our [FAQ](docs/faq.md) for answers to common questions.++## Still Need Help?++If you've tried the above and still need help:++1. **Ask in GitHub Discussions** - Community members are happy to help+2. **Join Discord** - Real-time support+3. **Open an issue** - For bugs or feature requests+4. **Email** - For private matters or enterprise support++---++**We're here to help!** Don't hesitate to reach out. π+diff --git a/docs/architecture.md b/docs/architecture.mdnew file mode 100644index 00000000..28a0d0f1--- /dev/null+++ b/docs/architecture.md@@ -0,0 +1,377 @@+# Architecture++This document describes the architecture of the Semantica framework.++## Overview++Semantica is built as a modular, extensible framework for semantic intelligence and knowledge engineering. The architecture is designed to be:++- **Modular**: Independent, reusable components+- **Extensible**: Easy to add new functionality+- **Scalable**: Handle large-scale data processing+- **Maintainable**: Clear separation of concerns++## System Architecture++```+βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ+β SEMANTICA FRAMEWORK β+βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€+β β+β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β+β β DATA INGESTION LAYER β β+β β ββββββββ¬βββββββ¬βββββββ¬βββββββ¬βββββββ¬βββββββββββ β β+β β βFiles β Web βFeeds β APIs βStreamβ Archives β β β+β β ββββββββ΄βββββββ΄βββββββ΄βββββββ΄βββββββ΄βββββββββββ β β+β β 50+ Formats β’ Real-time β’ Multi-modal β β+β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β+β β β+β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β+β β SEMANTIC PROCESSING LAYER β β+β β ββββββββββββ¬βββββββββββββ¬βββββββββββββ¬βββββββββββ β β+β β β Parse β Normalize β Extract β Build β β β+β β β β β Semantics β Graph β β β+β β ββββββββββββ΄βββββββββββββ΄βββββββββββββ΄βββββββββββ β β+β β NLP β’ Embeddings β’ Ontologies β’ Quality Assuranceβ β β+β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β+β β β+β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β+β β APPLICATION LAYER β β+β β ββββββββββββ¬βββββββββββββ¬βββββββββββββ¬βββββββββββ β β+β β β GraphRAG β AI Agents βMulti-Agent βAnalytics β β β+β β β β β Systems β Copilots β β β+β β ββββββββββββ΄βββββββββββββ΄βββββββββββββ΄βββββββββββ β β+β β Hybrid Retrieval β’ Context β’ Reasoning β β β+β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β+β β+βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ+```++## Module Architecture++### Core Modules++#### `semantica.core`++The core orchestration module that coordinates all framework components.++**Key Components**:+- `Semantica`: Main framework class+- `Orchestrator`: Pipeline coordination+- `ConfigManager`: Configuration management+- `PluginRegistry`: Plugin system+- `LifecycleManager`: System lifecycle++**Responsibilities**:+- Initialize and configure components+- Coordinate data flow between modules+- Manage plugin system+- Handle errors and recovery++#### `semantica.pipeline`++Pipeline management and execution.++**Key Components**:+- `PipelineBuilder`: Pipeline construction DSL+- `ExecutionEngine`: Pipeline execution+- `PipelineValidator`: Validation+- `ParallelismManager`: Parallel execution+- `ResourceScheduler`: Resource allocation++**Responsibilities**:+- Define processing pipelines+- Execute pipelines with parallelism+- Manage resources+- Handle failures++### Data Processing Modules++#### `semantica.ingest`++Universal data ingestion from multiple sources.++**Supported Sources**:+- Files (50+ formats)+- Web (scraping, APIs)+- Databases (SQL, NoSQL)+- Streams (Kafka, RabbitMQ)+- Archives (ZIP, TAR, etc.)++**Key Components**:+- `FileIngestor`: File processing+- `WebIngestor`: Web scraping+- `DBIngestor`: Database access+- `StreamIngestor`: Real-time streams++#### `semantica.parse`++Document parsing and extraction.++**Key Components**:+- `DocumentParser`: PDF, DOCX, etc.+- `WebParser`: HTML, XML+- `StructuredDataParser`: JSON, CSV+- `EmailParser`: Email formats++#### `semantica.normalize`++Data normalization and cleaning.++**Key Components**:+- `TextNormalizer`: Text normalization+- `EntityNormalizer`: Entity name normalization+- `DateNormalizer`: Date format normalization+- `EncodingHandler`: Character encoding++### Semantic Intelligence Modules++#### `semantica.semantic_extract`++Entity and relationship extraction.++**Key Components**:+- `NamedEntityRecognizer`: NER+- `RelationExtractor`: Relationship extraction+- `EventDetector`: Event detection+- `CoreferenceResolver`: Coreference resolution+- `TripleExtractor`: RDF triple extraction++#### `semantica.embeddings`++Vector embedding generation.++**Key Components**:+- `EmbeddingGenerator`: Main generator+- `TextEmbedder`: Text embeddings+- `MultiModalEmbedder`: Multi-modal embeddings+- `ProviderAdapters`: Provider-specific adapters++#### `semantica.ontology`++Ontology generation and management.++**Key Components**:+- `OntologyGenerator`: 6-stage generation pipeline+- `ClassInferrer`: Class discovery+- `PropertyGenerator`: Property inference+- `OntologyValidator`: Validation++### Knowledge Graph Modules++#### `semantica.kg`++Knowledge graph construction and analysis.++**Key Components**:+- `GraphBuilder`: Graph construction+- `EntityResolver`: Entity resolution+- `GraphAnalyzer`: Graph analytics+- `TemporalGraphQuery`: Time-aware queries++#### `semantica.vector_store`++Vector storage and search.++**Key Components**:+- `VectorStore`: Main interface+- `PineconeAdapter`: Pinecone integration+- `WeaviateAdapter`: Weaviate integration+- `FAISSAdapter`: FAISS integration++#### `semantica.triple_store`++RDF triple storage.++**Key Components**:+- `TripleManager`: Triple management+- `QueryEngine`: SPARQL queries+- `JenaAdapter`: Apache Jena+- `BlazegraphAdapter`: Blazegraph++### Quality Assurance Modules++#### `semantica.deduplication`++Entity deduplication.++**Key Components**:+- `DuplicateDetector`: Duplicate detection+- `EntityMerger`: Entity merging+- `SimilarityCalculator`: Similarity calculation++#### `semantica.conflicts`++Conflict detection and resolution.++**Key Components**:+- `ConflictDetector`: Conflict detection+- `ConflictResolver`: Conflict resolution+- `ConflictAnalyzer`: Conflict analysis++#### `semantica.kg_qa`++Knowledge graph quality assessment.++**Key Components**:+- `QualityAssessor`: Quality assessment+- Quality metrics calculation+- Validation rules++## Data Flow++### Typical Processing Flow++```+1. Ingestion+ ββ> Raw data from various sources++2. Parsing+ ββ> Structured content extraction++3. Normalization+ ββ> Cleaned and normalized data++4. Semantic Extraction+ ββ> Entity extraction+ ββ> Relationship extraction+ ββ> Event detection++5. Knowledge Graph Construction+ ββ> Entity resolution+ ββ> Conflict resolution+ ββ> Graph building++6. Quality Assurance+ ββ> Deduplication+ ββ> Conflict detection+ ββ> Quality assessment++7. Storage+ ββ> Knowledge graph storage+ ββ> Vector embeddings+ ββ> Triple store++8. Application+ ββ> GraphRAG queries+ ββ> AI agent context+ ββ> Analytics+```++## Design Decisions++### Modularity++**Decision**: Modular architecture with independent components++**Rationale**:+- Easy to understand and maintain+- Components can be used independently+- Easy to test in isolation+- Simple to extend++### Plugin System++**Decision**: Plugin-based architecture for extensibility++**Rationale**:+- Users can add custom functionality+- Community can contribute plugins+- Core remains stable+- Easy to integrate third-party tools++### Configuration Management++**Decision**: Centralized configuration with environment variable support++**Rationale**:+- Consistent configuration across modules+- Easy to override for different environments+- Supports both programmatic and file-based config+- Secure handling of sensitive data++### Error Handling++**Decision**: Comprehensive error handling with recovery++**Rationale**:+- Production-ready reliability+- Graceful degradation+- Detailed error reporting+- Recovery mechanisms++## Extension Points++### Custom Ingestors++```python+from semantica.ingest import BaseIngestor++class CustomIngestor(BaseIngestor):+ def ingest(self, source):+ # Custom ingestion logic+ pass+```++### Custom Extractors++```python+from semantica.semantic_extract import BaseExtractor++class CustomExtractor(BaseExtractor):+ def extract(self, text):+ # Custom extraction logic+ pass+```++### Custom Validators++```python+from semantica.kg_qa import BaseValidator++class CustomValidator(BaseValidator):+ def validate(self, graph):+ # Custom validation logic+ pass+```++## Performance Considerations++### Scalability++- Parallel processing support+- Streaming for large datasets+- Efficient memory usage+- Caching strategies++### Optimization++- Lazy loading where possible+- Batch processing+- Connection pooling+- Query optimization++## Security++### Data Security++- Secure credential handling+- Input validation+- Output sanitization+- Audit logging++### Access Control++- Authentication support+- Authorization mechanisms+- API key management+- Role-based access++## Future Enhancements++- Distributed processing+- Real-time streaming improvements+- Advanced reasoning+- Multi-modal expansion+- Enhanced visualization+diff --git a/docs/community.md b/docs/community.mdnew file mode 100644index 00000000..59c97fde--- /dev/null+++ b/docs/community.md@@ -0,0 +1,299 @@+# Community++Welcome to the Semantica community! This guide will help you get involved and make the most of our community.++## Community Values++Our community is built on:++- **Respect**: Treat everyone with respect and kindness+- **Inclusion**: Welcome people of all backgrounds and experience levels+- **Collaboration**: Work together to build something great+- **Learning**: Share knowledge and help others learn+- **Openness**: Transparent communication and decision-making++## Communication Channels++### GitHub Discussions++**Purpose**: General questions, feature discussions, and community chat++**Best for**:+- Asking questions+- Discussing ideas+- Sharing use cases+- Getting help++**Link**: [GitHub Discussions](https://github.com/Hawksight-AI/semantica/discussions)++### Discord++**Purpose**: Real-time chat and community support++**Best for**:+- Quick questions+- Real-time help+- Community showcases+- Casual conversation++**Link**: [Join Discord](https://discord.gg/semantica)++### GitHub Issues++**Purpose**: Bug reports and feature requests++**Best for**:+- Reporting bugs+- Requesting features+- Documentation issues+- Security vulnerabilities (use private reporting)++**Link**: [GitHub Issues](https://github.com/Hawksight-AI/semantica/issues)+++**Purpose**: Security issues and private communication++**Best for**:+- Security vulnerabilities+- Private matters+- Maintainer contact++**Email**: [email protected]++## Code of Conduct++We have a [Code of Conduct](../CODE_OF_CONDUCT.md) that all community members are expected to follow. It ensures a welcoming and inclusive environment for everyone.++### Key Points++- Be respectful and inclusive+- Welcome newcomers+- Give constructive feedback+- Focus on what's best for the community++### Reporting Issues++If you experience or witness unacceptable behavior:++1. **Document**: Note what happened, when, and who was involved+2. **Report**: Contact maintainers at [email protected]+3. **Response**: We'll investigate and respond appropriately++## Getting Help++### Before Asking++1. **Check Documentation**: Review the docs and cookbook+2. **Search**: Search GitHub issues and discussions+3. **Review Examples**: Check the cookbook for examples+4. **Read FAQ**: Check the [FAQ](faq.md)++### Asking Good Questions++When asking for help:++- **Be specific**: Describe your problem clearly+- **Provide context**: Include environment details+- **Show your work**: Share what you've tried+- **Include code**: Provide minimal reproducible examples+- **Be patient**: Community members are volunteers++### Where to Ask++- **Quick questions**: Discord+- **Technical questions**: GitHub Discussions+- **Bug reports**: GitHub Issues+- **Feature requests**: GitHub Issues++## Giving Feedback++We value your feedback! Here's how to share it:++### Feature Requests++- Use the [feature request template](https://github.com/Hawksight-AI/semantica/issues/new?template=feature_request.md)+- Describe the problem and proposed solution+- Include use cases++### Bug Reports++- Use the [bug report template](https://github.com/Hawksight-AI/semantica/issues/new?template=bug_report.md)+- Include steps to reproduce+- Provide environment details++### Documentation Feedback++- Use the [documentation issue template](https://github.com/Hawksight-AI/semantica/issues/new?template=documentation_issue.md)+- Describe what's unclear or missing+- Suggest improvements++## Recognition Programs++### Contributors++All contributors are recognized in:++- [CONTRIBUTORS.md](../CONTRIBUTORS.md)+- GitHub contributors page+- Release notes for significant contributions++### Contribution Types++We recognize many types of contributions:++- π» Code+- π Documentation+- π Bug reports+- π‘ Ideas+- π¨ Design+- π Examples+- π Testing+- π¬ Answering questions+- π Translation+- And more!++### Special Recognition++- **Top Contributors**: Featured in release notes+- **Hall of Fame**: Exceptional contributors+- **Monthly Spotlight**: Featured contributors++## Community Projects++We love seeing what the community builds with Semantica!++### Showcase Your Project++1. Create a PR or issue+2. Include:+ - Project description+ - Use case+ - Code examples+ - Screenshots or demos+ - Link to your project++See [Community Projects](community-projects.md) for more details.++### Featured Projects++We feature community projects in:++- Documentation+- Blog posts+- Release notes+- Social media++## Events and Activities++### Community Events++- **Monthly Community Calls**: (Coming soon)+- **Hackathons**: (Coming soon)+- **Workshops**: (Coming soon)++### Contributing Events++- **Hacktoberfest**: October+- **24 Pull Requests**: December+- **Google Summer of Code**: (If applicable)++## Learning Resources++### Documentation++- [Getting Started](getting-started.md)+- [Concepts](concepts.md)+- [API Reference](reference/core.md)+- [Cookbook](cookbook.md)++### Examples++- [Code Examples](examples.md)+- [Use Cases](use-cases.md)+- [Cookbook Tutorials](cookbook.md)++### External Resources++- Blog posts+- Video tutorials+- Community tutorials++## Ways to Contribute++### Code++- Fix bugs+- Add features+- Improve performance+- Refactor code++See [Contributing Guide](../CONTRIBUTING.md) for details.++### Documentation++- Fix typos+- Improve clarity+- Add examples+- Create tutorials+- Translate docs++### Community++- Answer questions+- Help with issues+- Review PRs+- Share use cases+- Organize events++### Testing++- Write tests+- Improve coverage+- Report bugs+- Test new features++## Getting Started as a Contributor++1. **Read**: [Contributing Guide](../CONTRIBUTING.md)+2. **Set up**: Development environment+3. **Find**: Good first issue (labeled `good-first-issue`)+4. **Ask**: Questions in Discussions or Discord+5. **Contribute**: Submit your first PR!++## Community Guidelines++### Do++- β Be respectful and inclusive+- β Help newcomers+- β Give constructive feedback+- β Follow the code of conduct+- β Credit others' work++### Don't++- β Be rude or disrespectful+- β Spam or self-promote excessively+- β Share private information+- β Harass or discriminate+- β Violate the code of conduct++## Resources++- [Contributing Guide](../CONTRIBUTING.md)+- [Code of Conduct](../CODE_OF_CONDUCT.md)+- [Security Policy](../SECURITY.md)+- [Governance](governance.md)+- [Community Projects](community-projects.md)++## Contact++- **Discord**: [Join our server](https://discord.gg/semantica)+- **GitHub**: [Discussions](https://github.com/Hawksight-AI/semantica/discussions)+- **Email**: [email protected]++---++**Thank you for being part of the Semantica community!** π+diff --git a/docs/contributing.md b/docs/contributing.mdnew file mode 100644index 00000000..cbb74239--- /dev/null+++ b/docs/contributing.md@@ -0,0 +1,198 @@+# Contributing to Semantica++Thank you for your interest in contributing to Semantica! This guide provides detailed information about contributing to the project.++## Quick Links++- [Contributing Guide](../CONTRIBUTING.md) - Main contributing guide+- [Code of Conduct](../CODE_OF_CONDUCT.md) - Community standards+- [Security Policy](../SECURITY.md) - Security reporting+- [GitHub Discussions](https://github.com/Hawksight-AI/semantica/discussions) - Community discussions++## Documentation-Specific Guidelines++### Writing Documentation++When contributing documentation, please follow these guidelines:++#### Style Guide++- Use clear, concise language+- Write for a technical audience but explain complex concepts+- Include code examples where helpful+- Use proper markdown formatting+- Follow the existing documentation structure++#### Code Examples++- Always include working code examples+- Test examples before submitting+- Use realistic scenarios+- Include expected output when relevant+- Add comments for clarity++#### API Documentation++When documenting APIs:++- Include function/class signatures with type hints+- Document all parameters and return values+- Provide usage examples+- Note any exceptions that may be raised+- Include performance considerations if relevant++Example:++```python+def extract_entities(+ text: str,+ model: str = "transformer",+ confidence_threshold: float = 0.7+) -> List[Entity]:+ """Extract named entities from text.++ Args:+ text: Input text to process+ model: NER model to use (default: "transformer")+ confidence_threshold: Minimum confidence score (default: 0.7)++ Returns:+ List of extracted Entity objects++ Raises:+ ValueError: If text is empty or model is invalid++ Example:+ >>> from semantica.semantic_extract import NamedEntityRecognizer+ >>> ner = NamedEntityRecognizer()+ >>> entities = ner.extract("Apple Inc. was founded in 1976.")+ >>> len(entities)+ 2+ """+```++### Documentation Structure++The documentation is organized as follows:++```+docs/+βββ index.md # Homepage+βββ getting-started.md # Getting started guide+βββ concepts.md # Core concepts+βββ modules.md # Module overview+βββ use-cases.md # Use case examples+βββ examples.md # Code examples+βββ learning-more.md # Additional resources+βββ cookbook/ # Interactive tutorials+β βββ introduction/ # Beginner tutorials+β βββ advanced/ # Advanced tutorials+β βββ use_cases/ # Domain-specific examples+βββ reference/ # API reference+ βββ core.md+ βββ ingest.md+ βββ ...+```++### Adding New Documentation++1. **Choose the right location**:+ - Concepts β `concepts.md`+ - Tutorials β `cookbook/`+ - API docs β `reference/`+ - Examples β `examples.md` or `cookbook/`++2. **Follow naming conventions**:+ - Use lowercase with hyphens: `my-new-doc.md`+ - Be descriptive but concise++3. **Update navigation**:+ - Add to `mkdocs.yml` in the appropriate section++4. **Add to index if needed**:+ - Update `docs/index.md` if it's a major new section++### Code Review Process++Documentation PRs go through the same review process as code:++1. **Automated checks**:+ - Markdown linting+ - Link checking+ - Build verification++2. **Manual review**:+ - Accuracy and clarity+ - Code example correctness+ - Consistency with existing docs++3. **Feedback**:+ - Reviewers provide constructive feedback+ - Address all comments before merging++### Example Contributions++#### Fixing Typos++```markdown+# Before+Semantica is a knowlege graph framework.++# After+Semantica is a knowledge graph framework.+```++#### Improving Clarity++```markdown+# Before+The function does entity extraction.++# After+The function extracts named entities (people, organizations, locations, etc.) from text using advanced NLP models.+```++#### Adding Examples++```markdown+## Example++Here's how to extract entities from text:++```python+from semantica.semantic_extract import NamedEntityRecognizer++ner = NamedEntityRecognizer()+entities = ner.extract("Apple Inc. was founded by Steve Jobs.")+print(f"Found {len(entities)} entities")+```+```++### Translation++We welcome translations of the documentation! If you'd like to translate:++1. Create a new directory: `docs/i18n/<language>/`+2. Translate the markdown files+3. Update `mkdocs.yml` to include the new language+4. Maintain the same structure as the English version++### Documentation Tools++We use:++- **MkDocs**: Documentation generator+- **Material for MkDocs**: Theme+- **mkdocstrings**: API documentation from docstrings+- **Mermaid**: Diagrams++### Getting Help++If you need help with documentation:++- Ask in [GitHub Discussions](https://github.com/Hawksight-AI/semantica/discussions)+- Check existing documentation for examples+- Review other contributors' PRs++Thank you for helping improve Semantica's documentation! π+diff --git a/docs/governance.md b/docs/governance.mdnew file mode 100644index 00000000..4be491a4--- /dev/null+++ b/docs/governance.md@@ -0,0 +1,246 @@+# Governance++This document describes the governance model for the Semantica project.++## Project Structure++Semantica is an open-source project maintained by Hawksight AI with community contributions.++### Roles++#### Maintainers++Maintainers are responsible for:++- Reviewing and merging pull requests+- Managing releases+- Maintaining code quality+- Resolving conflicts+- Community management+- Project direction++**Current Maintainers**:+- Hawksight AI team++#### Contributors++Contributors are community members who:++- Submit code contributions+- Improve documentation+- Report bugs+- Suggest features+- Help with issues+- Review pull requests++**Recognition**: All contributors are recognized in [CONTRIBUTORS.md](../CONTRIBUTORS.md)++#### Community Members++Community members:++- Use Semantica+- Provide feedback+- Answer questions+- Share use cases+- Participate in discussions++## Decision-Making Process++### Code Changes++1. **Proposal**: Feature requests or bug reports via GitHub Issues+2. **Discussion**: Community discussion in Issues or Discussions+3. **Implementation**: Contributor creates PR+4. **Review**: Maintainers review PR+5. **Approval**: At least one maintainer approval required+6. **Merge**: PR merged after approval and CI checks pass++### Major Decisions++For major decisions (breaking changes, architecture changes, etc.):++1. **RFC Process**: Request for Comments in GitHub Discussions+2. **Community Input**: Open discussion period (minimum 1 week)+3. **Decision**: Maintainers make final decision based on:+ - Community feedback+ - Technical feasibility+ - Project goals+ - Maintenance burden++### Release Process++1. **Planning**: Roadmap planning in GitHub Projects+2. **Development**: Feature development in feature branches+3. **Testing**: Comprehensive testing and CI checks+4. **Release Candidate**: RC for major releases+5. **Release**: Tagged release with changelog+6. **Documentation**: Updated documentation++## Release Process++### Versioning++We follow [Semantic Versioning](https://semver.org/):++- **MAJOR**: Breaking changes+- **MINOR**: New features (backward compatible)+- **PATCH**: Bug fixes (backward compatible)++### Release Schedule++- **Major Releases**: Quarterly or as needed+- **Minor Releases**: Monthly or as features are ready+- **Patch Releases**: As bugs are fixed++### Release Checklist++- [ ] All tests pass+- [ ] Documentation updated+- [ ] Changelog updated+- [ ] Version bumped+- [ ] Release notes prepared+- [ ] Tagged release created+- [ ] Announcement posted++## Roadmap Planning++### Planning Process++1. **Community Input**: Gather feature requests and feedback+2. **Prioritization**: Maintainers prioritize based on:+ - Community demand+ - Technical feasibility+ - Project goals+ - Resource availability+3. **Roadmap Publication**: Roadmap published in README and docs+4. **Regular Updates**: Roadmap updated quarterly++### Roadmap Categories++- **Short-term** (1-3 months): Current sprint+- **Medium-term** (3-6 months): Next quarter+- **Long-term** (6+ months): Future vision++## Code Review Process++### Review Criteria++PRs are reviewed for:++- **Functionality**: Does it work as intended?+- **Code Quality**: Follows style guidelines?+- **Tests**: Adequate test coverage?+- **Documentation**: Documentation updated?+- **Performance**: No performance regressions?+- **Security**: No security issues?++### Review Timeline++- **Initial Review**: Within 48 hours+- **Follow-up**: Within 7 days+- **Resolution**: Depends on complexity++### Review Guidelines++**For Reviewers**:+- Be constructive and respectful+- Explain reasoning for suggestions+- Approve when criteria are met+- Request changes when needed++**For Contributors**:+- Address all review comments+- Ask questions if unclear+- Be open to feedback+- Update PR based on feedback++## Conflict Resolution++### Code Conflicts++- Technical disagreements: Discuss in PR comments+- Unresolved: Escalate to maintainers+- Final decision: Maintainers++### Community Conflicts++- Follow [Code of Conduct](../CODE_OF_CONDUCT.md)+- Report violations to maintainers+- Maintainers handle enforcement++## Communication Channels++### GitHub++- **Issues**: Bug reports and feature requests+- **Discussions**: Questions and general discussion+- **Pull Requests**: Code contributions+- **Releases**: Release announcements++### Discord++- Real-time community chat+- Quick questions+- Community support+- Showcases+++- Security issues: [email protected]+- General inquiries: GitHub Discussions preferred++## Contribution Guidelines++See [CONTRIBUTING.md](../CONTRIBUTING.md) for detailed contribution guidelines.++### Types of Contributions++- Code contributions+- Documentation improvements+- Bug reports+- Feature suggestions+- Code reviews+- Community support++### Recognition++All contributors are recognized in:+- [CONTRIBUTORS.md](../CONTRIBUTORS.md)+- GitHub contributors page+- Release notes for significant contributions++## Project Goals++### Primary Goals++1. **Usability**: Easy to use and understand+2. **Reliability**: Production-ready quality+3. **Performance**: Efficient and scalable+4. **Extensibility**: Easy to extend and customize+5. **Community**: Welcoming and inclusive++### Success Metrics++- Contributor engagement+- Issue resolution time+- Code quality metrics+- Community growth+- User satisfaction++## License++Semantica is licensed under the MIT License. See [LICENSE](../LICENSE) for details.++## Contact++For governance questions or concerns:++- **GitHub Discussions**: General questions+- **Email**: [email protected]+- **Discord**: Community chat++---++**Last Updated**: 2024-01-XX+diff --git a/mkdocs.yml b/mkdocs.ymlindex fe2ebbd9..a3937261 100644--- a/mkdocs.yml+++ b/mkdocs.yml@@ -103,14 +103,7 @@ nav:- Overview: getting-started.md- installation.md- quickstart.md- - Guides:- - concepts.md- - modules.md- - use-cases.md- - examples.md- - learning-more.md- - Cookbook: cookbook.md- - Reference:+ - Docs:- Core: reference/core.md- Ingest: reference/ingest.md- Parse: reference/parse.md@@ -126,8 +119,19 @@ nav:- Export: reference/export.md- Visualization: reference/visualization.md- Utils: reference/utils.md+ - Guides:+ - concepts.md+ - modules.md+ - use-cases.md+ - examples.md+ - learning-more.md+ - Cookbook: cookbook.md- Resources:- community-projects.md+ - community.md+ - contributing.md+ - architecture.md+ - governance.md- citation.md- faq.md- license.mddiff --git a/pyproject.toml b/pyproject.tomlindex 00d6db33..fe219ce6 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -14,11 +14,7 @@ authors = [maintainers = [{name = "Hawksight AI", email = "[email protected]"}]-keywords = [- "semantic-layer", "knowledge-engineering", "nlp", "knowledge-graph",- "embeddings", "entity-extraction", "relationship-extraction", "rdf",- "ontology", "semantic-analysis", "ai", "machine-learning"-]+requires-python = ">=3.8"classifiers = ["Development Status :: 3 - Alpha","Intended Audience :: Developers",@@ -37,7 +33,18 @@ classifiers = ["Topic :: Database :: Database Engines/Servers","Topic :: Internet :: WWW/HTTP :: Indexing/Search"]-requires-python = ">=3.8"+keywords = [+ "semantic-layer", "knowledge-engineering", "nlp", "knowledge-graph",+ "embeddings", "entity-extraction", "relationship-extraction", "rdf",+ "ontology", "semantic-analysis", "ai", "machine-learning"+]+[project.urls]+Homepage = "https://github.com/Hawksight-AI/semantica"+Documentation = "https://semantica.readthedocs.io"+Repository = "https://github.com/Hawksight-AI/semantica"+"Bug Tracker" = "https://github.com/Hawksight-AI/semantica/issues"+Discussions = "https://github.com/Hawksight-AI/semantica/discussions"+Discord = "https://discord.gg/semantica"dependencies = ["numpy>=1.21.0","pandas>=1.3.0",diff --git a/remove_mkdocstrings.ps1 b/remove_mkdocstrings.ps1deleted file mode 100644index 3a629b63..00000000--- a/remove_mkdocstrings.ps1+++ /dev/null@@ -1,19 +0,0 @@-# Remove all mkdocstrings directives from reference docs-# These are causing griffe alias resolution errors--$files = Get-ChildItem "c:\Users\Mohd Kaif\semantica\docs\reference\*.md"--foreach ($file in $files) {- $content = Get-Content $file.FullName -Raw-- # Remove mkdocstrings directives (:::semantica.module.Class blocks)- $content = $content -replace '(?m)^::: semantica\.[^\r\n]+\r?\n(?: options:\r?\n(?: [^\r\n]+\r?\n)*)?', ''-- # Clean up extra blank lines- $content = $content -replace '(\r?\n){4,}', "`r`n`r`n`r`n"-- Set-Content -Path $file.FullName -Value $content -NoNewline- Write-Host "Processed: $($file.Name)"-}--Write-Host "`nDone! All mkdocstrings directives removed."diff --git a/scripts/check-code.sh b/scripts/check-code.shnew file mode 100644index 00000000..3f57fa0a--- /dev/null+++ b/scripts/check-code.sh@@ -0,0 +1,31 @@+#!/bin/bash+# Code quality check script for Semantica++set -e++echo "π Running code quality checks..."++# Activate virtual environment if it exists+if [ -d "venv" ]; then+ source venv/bin/activate+fi++# Check formatting+echo "Checking code formatting (black)..."+black --check semantica/ tests/ || { echo "β Code formatting issues found. Run: black semantica/ tests/"; exit 1; }++# Check import sorting+echo "Checking import sorting (isort)..."+isort --check-only semantica/ tests/ || { echo "β Import sorting issues found. Run: isort semantica/ tests/"; exit 1; }++# Lint with flake8+echo "Linting with flake8..."+flake8 semantica/ tests/ || { echo "β Linting issues found."; exit 1; }++# Type check with mypy+echo "Type checking with mypy..."+mypy semantica/ || { echo "β οΈ Type checking issues found (non-blocking)."; }++echo ""+echo "β All code quality checks passed!"+diff --git a/scripts/format-code.sh b/scripts/format-code.shnew file mode 100644index 00000000..2827580c--- /dev/null+++ b/scripts/format-code.sh@@ -0,0 +1,23 @@+#!/bin/bash+# Code formatting script for Semantica++set -e++echo "π¨ Formatting Semantica code..."++# Activate virtual environment if it exists+if [ -d "venv" ]; then+ source venv/bin/activate+fi++# Format with black+echo "Formatting with black..."+black semantica/ tests/++# Sort imports with isort+echo "Sorting imports with isort..."+isort semantica/ tests/++echo ""+echo "β Code formatting complete!"+diff --git a/scripts/run-tests.sh b/scripts/run-tests.shnew file mode 100644index 00000000..7d3d6682--- /dev/null+++ b/scripts/run-tests.sh@@ -0,0 +1,20 @@+#!/bin/bash+# Test runner script for Semantica++set -e++echo "π§ͺ Running Semantica tests..."++# Activate virtual environment if it exists+if [ -d "venv" ]; then+ source venv/bin/activate+fi++# Run tests with coverage+echo "Running pytest with coverage..."+pytest --cov=semantica --cov-report=html --cov-report=term-missing -v++echo ""+echo "β Tests complete!"+echo "π Coverage report generated in htmlcov/index.html"+diff --git a/scripts/setup-dev.ps1 b/scripts/setup-dev.ps1new file mode 100644index 00000000..1307a415--- /dev/null+++ b/scripts/setup-dev.ps1@@ -0,0 +1,50 @@+# Development environment setup script for Semantica (PowerShell)++Write-Host "π Setting up Semantica development environment..." -ForegroundColor Cyan++# Check Python version+$pythonVersion = python --version 2>&1+Write-Host "π¦ $pythonVersion" -ForegroundColor Green++# Create virtual environment if it doesn't exist+if (-not (Test-Path "venv")) {+ Write-Host "π¦ Creating virtual environment..." -ForegroundColor Yellow+ python -m venv venv+}++# Activate virtual environment+Write-Host "π Activating virtual environment..." -ForegroundColor Yellow+& .\venv\Scripts\Activate.ps1++# Upgrade pip+Write-Host "β¬οΈ Upgrading pip..." -ForegroundColor Yellow+python -m pip install --upgrade pip++# Install project in editable mode with dev dependencies+Write-Host "π₯ Installing Semantica with dev dependencies..." -ForegroundColor Yellow+pip install -e ".[dev]"++# Install pre-commit hooks+Write-Host "πͺ Installing pre-commit hooks..." -ForegroundColor Yellow+pre-commit install++# Verify installation+Write-Host "β Verifying installation..." -ForegroundColor Yellow+python -c "import semantica; print(f'Semantica version: {semantica.__version__}')"++Write-Host ""+Write-Host "β¨ Development environment setup complete!" -ForegroundColor Green+Write-Host ""+Write-Host "To activate the virtual environment in the future, run:" -ForegroundColor Cyan+Write-Host " .\venv\Scripts\Activate.ps1" -ForegroundColor White+Write-Host ""+Write-Host "To run tests:" -ForegroundColor Cyan+Write-Host " pytest" -ForegroundColor White+Write-Host ""+Write-Host "To format code:" -ForegroundColor Cyan+Write-Host " black semantica/ tests/" -ForegroundColor White+Write-Host " isort semantica/ tests/" -ForegroundColor White+Write-Host ""+Write-Host "To run all checks:" -ForegroundColor Cyan+Write-Host " pre-commit run --all-files" -ForegroundColor White+diff --git a/scripts/setup-dev.sh b/scripts/setup-dev.shnew file mode 100644index 00000000..934405ff--- /dev/null+++ b/scripts/setup-dev.sh@@ -0,0 +1,53 @@+#!/bin/bash+# Development environment setup script for Semantica++set -e++echo "π Setting up Semantica development environment..."++# Check Python version+python_version=$(python3 --version 2>&1 | awk '{print $2}')+echo "π¦ Python version: $python_version"++# Create virtual environment if it doesn't exist+if [ ! -d "venv" ]; then+ echo "π¦ Creating virtual environment..."+ python3 -m venv venv+fi++# Activate virtual environment+echo "π Activating virtual environment..."+source venv/bin/activate++# Upgrade pip+echo "β¬οΈ Upgrading pip..."+pip install --upgrade pip++# Install project in editable mode with dev dependencies+echo "π₯ Installing Semantica with dev dependencies..."+pip install -e ".[dev]"++# Install pre-commit hooks+echo "πͺ Installing pre-commit hooks..."+pre-commit install++# Verify installation+echo "β Verifying installation..."+python -c "import semantica; print(f'Semantica version: {semantica.__version__}')"++echo ""+echo "β¨ Development environment setup complete!"+echo ""+echo "To activate the virtual environment in the future, run:"+echo " source venv/bin/activate"+echo ""+echo "To run tests:"+echo " pytest"+echo ""+echo "To format code:"+echo " black semantica/ tests/"+echo " isort semantica/ tests/"+echo ""+echo "To run all checks:"+echo " pre-commit run --all-files"+diff --git a/test-docs.py b/test-docs.pydeleted file mode 100644index 1ef9ebea..00000000--- a/test-docs.py+++ /dev/null@@ -1,63 +0,0 @@-#!/usr/bin/env python3-"""-Simple HTTP server to test documentation locally-Run: python test-docs.py-Then visit: http://localhost:8000/preview.html-"""--import http.server-import socketserver-import os-import webbrowser-from pathlib import Path--PORT = 8000--class DocsHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):- def end_headers(self):- # Add CORS headers for local testing- self.send_header('Access-Control-Allow-Origin', '*')- self.send_header('Access-Control-Allow-Methods', 'GET')- super().end_headers()--def main():- # Change to project root directory- os.chdir(Path(__file__).parent)-- Handler = DocsHTTPRequestHandler-- with socketserver.TCPServer(("", PORT), Handler) as httpd:- print(f"""-βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ-β Semantica Documentation Test Server β-β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£-β β-β Server running at: β-β http://localhost:{PORT} β-β β-β Available pages: β-β β’ http://localhost:{PORT}/preview.html β-β β’ http://localhost:{PORT}/docs/index.md β-β β’ http://localhost:{PORT}/docs/installation.md β-β β’ http://localhost:{PORT}/docs/quickstart.md β-β β’ http://localhost:{PORT}/docs/api.md β-β β’ http://localhost:{PORT}/docs/examples.md β-β β-β Press Ctrl+C to stop the server β-βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ- """)-- # Open browser automatically- try:- webbrowser.open(f'http://localhost:{PORT}/docs/preview.html')- except:- pass-- try:- httpd.serve_forever()- except KeyboardInterrupt:- print("\n\nServer stopped. Goodbye!")--if __name__ == "__main__":- main()-