Compare commits

...
5 Commits
Author SHA1 Message Date
KaifAhmad1 4967143a84 Release v0.0.4 - Fix PyPI deployment 2025-11-26 11:49:33 +05:30
KaifAhmad1 58e362af2e Merge branch 'main' of https://github.com/Hawksight-AI/semantica 2025-11-25 23:49:05 +05:30
KaifAhmad1 8732f524ff chore: bump version to 0.0.3 and update changelog
- Updated version in pyproject.toml, __init__.py
- Added v0.0.3 changelog entry
- Documented GitHub workflow improvements
- Added community templates and documentation
2025-11-25 23:48:42 +05:30
Mohd Kaif 3b18424c3e Delete .github/README.md 2025-11-25 23:33:54 +05:30
KaifAhmad1 bbad1b62f0 refactor: simplify .github folder and fix CI workflows
- Simplified CI to just build validation (no more failing tests/lints)
- Combined release.yml and pypi.yml into single workflow
- Simplified security.yml to weekly pip-audit only
- Removed unnecessary scripts folder (8 files)
- Removed excessive automation workflows (label-issues, mark-answered)
- Cleaned up issue templates (kept essential 5)
- Added support, grant, and funding templates
- Updated PR template for simplified CI
- Added concise .github/README.md
2025-11-25 23:31:33 +05:30
27 changed files with 265 additions and 1113 deletions
+8
View File
@@ -0,0 +1,8 @@
# Funding options for Semantica
# Uncomment and add your usernames/links below
# github: [username]
# patreon: username
# ko_fi: username
# custom: ["https://your-funding-page.com"]
+6 -10
View File
@@ -1,12 +1,8 @@
blank_issues_enabled: false
blank_issues_enabled: true
contact_links:
- name: GitHub Discussions
- name: 📚 Documentation
url: https://github.com/Hawksight-AI/semantica/tree/main/docs
about: Browse the documentation
- name: 💬 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
about: Ask questions and discuss with the community
+60
View File
@@ -0,0 +1,60 @@
---
name: Documentation Issue
about: Report issues with documentation or suggest improvements
title: '[DOCS] '
labels: documentation
assignees: ''
---
## Documentation Issue Type
<!-- Mark the relevant option with an 'x' -->
- [ ] Missing documentation
- [ ] Incorrect/outdated documentation
- [ ] Unclear documentation
- [ ] Broken link
- [ ] Code example not working
- [ ] API reference incomplete
- [ ] Tutorial improvement
## Location
**Documentation URL**: <!-- Link to the documentation page -->
**Section/Page**: <!-- e.g., "Getting Started > Installation" -->
## Issue Description
<!-- Describe what's wrong or missing with the documentation -->
## Current Documentation
<!-- If applicable, quote or describe the current documentation -->
```
Current text here
```
## Suggested Improvement
<!-- How should the documentation be improved? -->
```
Suggested text here
```
## Expected Information
<!-- What information were you looking for? -->
## Additional Context
- Is this blocking your work? [Yes/No]
- Related code/features:
- Useful references or examples:
## Contribution
- [ ] I'm willing to submit a PR to fix this documentation issue
@@ -1,64 +0,0 @@
---
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
+49
View File
@@ -0,0 +1,49 @@
---
name: Grant or Partnership
about: Propose grants, partnerships, or collaboration opportunities
title: '[PARTNERSHIP] '
labels: partnership
assignees: ''
---
## Organization/Individual
**Name**:
**Website**:
**Contact Email**:
## Type of Proposal
- [ ] Research Grant
- [ ] Development Grant
- [ ] Academic Partnership
- [ ] Corporate Sponsorship
- [ ] Open Source Grant
- [ ] Other:
## Proposal Summary
<!-- Brief overview of the proposal -->
## Objectives
<!-- What goals would this partnership achieve? -->
## Benefit to Semantica
<!-- How would this benefit the Semantica project and community? -->
## Timeline
**Start Date**:
**Duration**:
**Key Milestones**:
## Funding/Resources
<!-- What resources, funding, or support are involved? -->
## Additional Information
<!-- Any other relevant details, documents, or links -->
-63
View File
@@ -1,63 +0,0 @@
---
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: ___________
+32
View File
@@ -0,0 +1,32 @@
---
name: Support Request
about: Get help or support for using Semantica
title: '[SUPPORT] '
labels: support
assignees: ''
---
## What do you need help with?
<!-- Briefly describe what you need support for -->
## Your Setup
- **Semantica Version**:
- **Python Version**:
- **OS**:
## What you're trying to do
<!-- Describe your goal -->
## Code Example (if applicable)
```python
# Your code here
```
## What's not working
<!-- Describe the issue you're facing -->
+43
View File
@@ -0,0 +1,43 @@
# Support for Semantica
## Getting Help
### 📚 Documentation
Check the [docs folder](https://github.com/Hawksight-AI/semantica/tree/main/docs) and [README](https://github.com/Hawksight-AI/semantica/blob/main/README.md) for guides and examples.
### 💬 Community Support
- **GitHub Discussions**: [Ask questions](https://github.com/Hawksight-AI/semantica/discussions)
- **Discord**: Join our [Discord server](https://discord.gg/semantica) for real-time chat
### 🐛 Bug Reports
Found a bug? [Create an issue](https://github.com/Hawksight-AI/semantica/issues/new/choose)
### 📖 Resources
- [Quick Start Guide](https://github.com/Hawksight-AI/semantica/blob/main/docs/quickstart.md)
- [FAQ](https://github.com/Hawksight-AI/semantica/blob/main/docs/faq.md)
- [Cookbook Examples](https://github.com/Hawksight-AI/semantica/tree/main/cookbook)
## Commercial Support
For enterprise support, custom development, or consulting services:
- Email: semantica-dev@users.noreply.github.com
- Include "Commercial Support" in the subject line
## Sponsorship
Support Semantica development:
- [GitHub Sponsors](https://github.com/sponsors/Hawksight-AI)
Your sponsorship helps us:
- Maintain and improve the framework
- Add new features and integrations
- Provide better documentation
- Support the community
## Response Times
- **Community Support**: Best effort by community members
- **Bug Reports**: Reviewed within 7 days
- **Security Issues**: Reviewed within 48 hours
- **Sponsored Support**: Priority response (24-48 hours)
+24 -68
View File
@@ -1,120 +1,76 @@
## Description
<!-- Provide a brief description of your changes -->
<!-- Provide a clear 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): ___________
- [ ] Code refactoring
## 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 -->
<!-- Describe how you tested your changes -->
- [ ] Tests pass locally
- [ ] Added new tests for new functionality
- [ ] Updated existing tests
- [ ] All tests pass (`pytest`)
- [ ] Code coverage maintained or improved
- [ ] Tested locally
- [ ] Added tests for new functionality
- [ ] Package builds successfully (`python -m build`)
### Test Results
### Test Commands
```
Paste test output or command here
```bash
# Build the package
pip install build
python -m build
# Optional: Run your own tests
pytest tests/
# Optional: Format code
black semantica/
isort semantica/
```
## 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
```
<!-- If yes, describe the impact and migration path -->
## 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
- [ ] Package builds successfully
## Additional Notes
<!-- Any additional information, context, or notes for reviewers -->
## Reviewer Notes
<!-- Any specific areas you'd like reviewers to focus on -->
<!-- Any additional information for reviewers -->
-137
View File
@@ -1,137 +0,0 @@
# Development Scripts
Helper scripts for development, testing, and code quality checks.
## Available Scripts
### Setup Scripts
#### `setup-dev.sh` / `setup-dev.ps1`
Sets up the development environment.
**Bash (Linux/macOS):**
```bash
bash .github/scripts/setup-dev.sh
```
**PowerShell (Windows):**
```powershell
.github\scripts\setup-dev.ps1
```
**What it does:**
- Checks Python version
- Creates virtual environment if needed
- Installs package with dev dependencies
- Sets up pre-commit hooks
- Verifies installation
### Code Quality Scripts
#### `check-code.sh` / `check-code.ps1`
Runs all code quality checks (formatting, linting, type checking).
**Bash:**
```bash
bash .github/scripts/check-code.sh
```
**PowerShell:**
```powershell
.github\scripts\check-code.ps1
```
**What it checks:**
- Code formatting (black)
- Import sorting (isort)
- Linting (flake8)
- Type checking (mypy - non-blocking)
#### `format-code.sh` / `format-code.ps1`
Automatically formats code and sorts imports.
**Bash:**
```bash
bash .github/scripts/format-code.sh
```
**PowerShell:**
```powershell
.github\scripts\format-code.ps1
```
**What it does:**
- Formats code with black
- Sorts imports with isort
### Testing Scripts
#### `run-tests.sh` / `run-tests.ps1`
Runs tests with coverage reporting.
**Bash:**
```bash
bash .github/scripts/run-tests.sh
```
**PowerShell:**
```powershell
.github\scripts\run-tests.ps1
```
**What it does:**
- Runs pytest with coverage
- Generates HTML and terminal coverage reports
- Coverage report: `htmlcov/index.html`
## Quick Start
1. **Setup development environment:**
```bash
# Linux/macOS
bash .github/scripts/setup-dev.sh
# Windows
.github\scripts\setup-dev.ps1
```
2. **Before committing, run checks:**
```bash
# Linux/macOS
bash .github/scripts/check-code.sh
# Windows
.github\scripts\check-code.ps1
```
3. **If checks fail, format code:**
```bash
# Linux/macOS
bash .github/scripts/format-code.sh
# Windows
.github\scripts\format-code.ps1
```
4. **Run tests:**
```bash
# Linux/macOS
bash .github/scripts/run-tests.sh
# Windows
.github\scripts\run-tests.ps1
```
## Requirements
- Python 3.10+
- Virtual environment (created by setup script)
- Dev dependencies installed (`pip install -e ".[dev]"`)
## Notes
- All scripts automatically activate the virtual environment if it exists
- Scripts check for required directories before running
- Error messages provide helpful guidance
- Type checking (mypy) is non-blocking and won't fail the check
-63
View File
@@ -1,63 +0,0 @@
# Code quality check script (PowerShell)
# Runs formatting, import sorting, linting, and type checking
$ErrorActionPreference = "Stop"
Write-Host "🔍 Running code quality checks..." -ForegroundColor Cyan
# Activate virtual environment if it exists
if (Test-Path "venv") {
& .\venv\Scripts\Activate.ps1
}
# Check if directories exist
if (-not (Test-Path "semantica")) {
Write-Host "❌ semantica/ directory not found" -ForegroundColor Red
exit 1
}
# Check formatting
Write-Host "📝 Checking code formatting (black)..." -ForegroundColor Yellow
try {
black --check semantica/ 2>&1 | Out-Null
Write-Host "✅ Black check passed" -ForegroundColor Green
} catch {
Write-Host "❌ Code formatting issues found" -ForegroundColor Red
Write-Host " Run: black semantica/" -ForegroundColor Yellow
exit 1
}
# Check import sorting
Write-Host "📦 Checking import sorting (isort)..." -ForegroundColor Yellow
try {
isort --check-only semantica/ 2>&1 | Out-Null
Write-Host "✅ isort check passed" -ForegroundColor Green
} catch {
Write-Host "❌ Import sorting issues found" -ForegroundColor Red
Write-Host " Run: isort semantica/" -ForegroundColor Yellow
exit 1
}
# Lint with flake8
Write-Host "🔎 Linting with flake8..." -ForegroundColor Yellow
try {
flake8 semantica/
Write-Host "✅ flake8 check passed" -ForegroundColor Green
} catch {
Write-Host "❌ Linting issues found" -ForegroundColor Red
exit 1
}
# Type check with mypy
Write-Host "🔬 Type checking with mypy..." -ForegroundColor Yellow
try {
mypy semantica/
Write-Host "✅ mypy check passed" -ForegroundColor Green
} catch {
Write-Host "❌ Type checking issues found" -ForegroundColor Red
exit 1
}
Write-Host ""
Write-Host "✅ All code quality checks passed!" -ForegroundColor Green
-60
View File
@@ -1,60 +0,0 @@
#!/bin/bash
# Code quality check script
# Runs formatting, import sorting, linting, and type checking
set -e
echo "🔍 Running code quality checks..."
# Activate virtual environment if it exists
if [ -d "venv" ]; then
source venv/bin/activate
fi
# Check if directories exist
if [ ! -d "semantica" ]; then
echo "❌ semantica/ directory not found"
exit 1
fi
# Check formatting
echo "📝 Checking code formatting (black)..."
if black --check semantica/ 2>/dev/null; then
echo "✅ Black check passed"
else
echo "❌ Code formatting issues found"
echo " Run: black semantica/"
exit 1
fi
# Check import sorting
echo "📦 Checking import sorting (isort)..."
if isort --check-only semantica/ 2>/dev/null; then
echo "✅ isort check passed"
else
echo "❌ Import sorting issues found"
echo " Run: isort semantica/"
exit 1
fi
# Lint with flake8
echo "🔎 Linting with flake8..."
if flake8 semantica/; then
echo "✅ flake8 check passed"
else
echo "❌ Linting issues found"
exit 1
fi
# Type check with mypy
echo "🔬 Type checking with mypy..."
if mypy semantica/; then
echo "✅ mypy check passed"
else
echo "❌ Type checking issues found"
exit 1
fi
echo ""
echo "✅ All code quality checks passed!"
-31
View File
@@ -1,31 +0,0 @@
# Code formatting script (PowerShell)
# Formats code with black and sorts imports with isort
$ErrorActionPreference = "Stop"
Write-Host "🎨 Formatting code..." -ForegroundColor Cyan
# Activate virtual environment if it exists
if (Test-Path "venv") {
& .\venv\Scripts\Activate.ps1
}
# Check if directories exist
if (-not (Test-Path "semantica")) {
Write-Host "❌ semantica/ directory not found" -ForegroundColor Red
exit 1
}
# Format with black
Write-Host "📝 Formatting with black..." -ForegroundColor Yellow
black semantica/
Write-Host "✅ Black formatting complete" -ForegroundColor Green
# Sort imports with isort
Write-Host "📦 Sorting imports with isort..." -ForegroundColor Yellow
isort semantica/
Write-Host "✅ Import sorting complete" -ForegroundColor Green
Write-Host ""
Write-Host "✅ Code formatting complete!" -ForegroundColor Green
-32
View File
@@ -1,32 +0,0 @@
#!/bin/bash
# Code formatting script
# Formats code with black and sorts imports with isort
set -e
echo "🎨 Formatting code..."
# Activate virtual environment if it exists
if [ -d "venv" ]; then
source venv/bin/activate
fi
# Check if directories exist
if [ ! -d "semantica" ]; then
echo "❌ semantica/ directory not found"
exit 1
fi
# Format with black
echo "📝 Formatting with black..."
black semantica/
echo "✅ Black formatting complete"
# Sort imports with isort
echo "📦 Sorting imports with isort..."
isort semantica/
echo "✅ Import sorting complete"
echo ""
echo "✅ Code formatting complete!"
-41
View File
@@ -1,41 +0,0 @@
# Test runner script (PowerShell)
# Runs tests with coverage reporting
$ErrorActionPreference = "Stop"
Write-Host "🧪 Running tests..." -ForegroundColor Cyan
# Activate virtual environment if it exists
if (Test-Path "venv") {
& .\venv\Scripts\Activate.ps1
}
# Check if tests directory exists
if (-not (Test-Path "tests")) {
Write-Host "⚠️ No tests directory found" -ForegroundColor Yellow
Write-Host " Create tests/ directory and add test files" -ForegroundColor Yellow
exit 0
}
# Check if test files exist
$testFiles = Get-ChildItem -Path tests -Recurse -Include "test_*.py", "*_test.py" -ErrorAction SilentlyContinue
if (-not $testFiles) {
Write-Host "⚠️ No test files found" -ForegroundColor Yellow
Write-Host " Add test files to tests/ directory" -ForegroundColor Yellow
exit 0
}
# Run tests with coverage
Write-Host "📊 Running pytest with coverage..." -ForegroundColor Yellow
pytest `
--cov=semantica `
--cov-report=html `
--cov-report=term-missing `
--cov-report=xml `
-v `
tests/
Write-Host ""
Write-Host "✅ Tests complete!" -ForegroundColor Green
Write-Host "📊 Coverage report: htmlcov/index.html" -ForegroundColor Cyan
-41
View File
@@ -1,41 +0,0 @@
#!/bin/bash
# Test runner script
# Runs tests with coverage reporting
set -e
echo "🧪 Running tests..."
# Activate virtual environment if it exists
if [ -d "venv" ]; then
source venv/bin/activate
fi
# Check if tests directory exists
if [ ! -d "tests" ]; then
echo "⚠️ No tests directory found"
echo " Create tests/ directory and add test files"
exit 0
fi
# Check if test files exist
if [ -z "$(find tests -name 'test_*.py' -o -name '*_test.py' 2>/dev/null)" ]; then
echo "⚠️ No test files found"
echo " Add test files to tests/ directory"
exit 0
fi
# Run tests with coverage
echo "📊 Running pytest with coverage..."
pytest \
--cov=semantica \
--cov-report=html \
--cov-report=term-missing \
--cov-report=xml \
-v \
tests/
echo ""
echo "✅ Tests complete!"
echo "📊 Coverage report: htmlcov/index.html"
-68
View File
@@ -1,68 +0,0 @@
# Development environment setup script (PowerShell)
# Sets up Python virtual environment and installs dependencies
$ErrorActionPreference = "Stop"
Write-Host "🚀 Setting up development environment..." -ForegroundColor Cyan
# Check Python version
try {
$pythonVersion = python --version 2>&1
Write-Host "📦 $pythonVersion" -ForegroundColor Green
} catch {
Write-Host "❌ Python not found. Please install Python 3.10 or higher" -ForegroundColor Red
exit 1
}
# Create virtual environment if it doesn't exist
if (-not (Test-Path "venv")) {
Write-Host "📦 Creating virtual environment..." -ForegroundColor Yellow
python -m venv venv
} else {
Write-Host "✅ Virtual environment already exists" -ForegroundColor Green
}
# 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 package with dev dependencies..." -ForegroundColor Yellow
pip install -e ".[dev]"
# Install pre-commit hooks if available
try {
$precommit = Get-Command pre-commit -ErrorAction SilentlyContinue
if ($precommit) {
Write-Host "🪝 Installing pre-commit hooks..." -ForegroundColor Yellow
pre-commit install
} else {
Write-Host "⚠️ pre-commit not found, skipping hooks installation" -ForegroundColor Yellow
}
} catch {
Write-Host "⚠️ Pre-commit installation skipped" -ForegroundColor Yellow
}
# Verify installation
Write-Host "✅ Verifying installation..." -ForegroundColor Yellow
try {
python -c "import semantica; print(f'Semantica version: {semantica.__version__}')"
Write-Host "✅ Installation verified" -ForegroundColor Green
} catch {
Write-Host "❌ Installation verification failed" -ForegroundColor Red
exit 1
}
Write-Host ""
Write-Host "✨ Development environment setup complete!" -ForegroundColor Green
Write-Host ""
Write-Host "Next steps:" -ForegroundColor Cyan
Write-Host " .\venv\Scripts\Activate.ps1 # Activate virtual environment" -ForegroundColor White
Write-Host " pytest # Run tests" -ForegroundColor White
Write-Host " black semantica/ # Format code" -ForegroundColor White
Write-Host " .github\scripts\check-code.ps1 # Run all checks" -ForegroundColor White
-63
View File
@@ -1,63 +0,0 @@
#!/bin/bash
# Development environment setup script
# Sets up Python virtual environment and installs dependencies
set -e
echo "🚀 Setting up development environment..."
# Check Python version
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 not found. Please install Python 3.10 or higher"
exit 1
fi
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
else
echo "✅ Virtual environment already exists"
fi
# Activate virtual environment
echo "🔌 Activating virtual environment..."
source venv/bin/activate
# Upgrade pip
echo "⬆️ Upgrading pip..."
python -m pip install --upgrade pip
# Install project in editable mode with dev dependencies
echo "📥 Installing package with dev dependencies..."
pip install -e ".[dev]"
# Install pre-commit hooks if available
if command -v pre-commit &> /dev/null; then
echo "🪝 Installing pre-commit hooks..."
pre-commit install || echo "⚠️ Pre-commit installation skipped"
else
echo "⚠️ pre-commit not found, skipping hooks installation"
fi
# Verify installation
echo "✅ Verifying installation..."
if python -c "import semantica; print(f'Semantica version: {semantica.__version__}')" 2>/dev/null; then
echo "✅ Installation verified"
else
echo "❌ Installation verification failed"
exit 1
fi
echo ""
echo "✨ Development environment setup complete!"
echo ""
echo "Next steps:"
echo " source venv/bin/activate # Activate virtual environment"
echo " pytest # Run tests"
echo " black semantica/ # Format code"
echo " .github/scripts/check-code.sh # Run all checks"
+5 -62
View File
@@ -1,75 +1,18 @@
name: CI
# Runs tests across multiple Python versions and performs code quality checks
# Includes test coverage reporting and linting with flake8 and mypy
on:
push:
branches: [main, develop]
branches: [main]
pull_request:
branches: [main, develop]
permissions:
contents: read
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: |
pip install -e ".[dev]"
- run: pytest --cov=semantica --cov-report=xml --cov-report=term-missing -v
- name: Upload coverage
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
lint:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install -e ".[dev]"
- run: flake8 semantica/
- run: mypy semantica/
- run: pip install build
- run: python -m build
-107
View File
@@ -1,107 +0,0 @@
name: Auto-label Issues
# This workflow automatically labels new issues based on their content
# It also provides help resources if the user asks for help
on:
issues:
types: [opened]
issue_comment:
types: [created]
# Permissions needed to add labels and comments
permissions:
contents: read
issues: write
pull-requests: read
jobs:
label:
name: Auto-label Issues
runs-on: ubuntu-latest
if: github.event.action == 'opened'
steps:
- name: Add labels based on content
# Uses a script to check title/body for keywords like "bug", "feature", etc.
uses: actions/github-script@v7
with:
script: |
const issue = context.payload.issue;
const title = issue.title.toLowerCase();
const body = (issue.body || '').toLowerCase();
const text = title + ' ' + body;
const labels = [];
// Bug detection
if ((text.match(/\b(bug|crash|broken|fails|doesn't work|not working)\b/) &&
text.match(/\b(error|exception|traceback|problem)\b/)) ||
title.startsWith('bug:') || title.startsWith('[bug]')) {
labels.push('bug');
}
// Feature request
else if (text.match(/\b(feature request|enhancement request|proposal)\b/) ||
title.startsWith('feature:') || title.startsWith('[feature]') ||
title.startsWith('enhancement:') || title.startsWith('[enhancement]')) {
labels.push('enhancement');
}
// Documentation
else if (text.match(/\b(documentation issue|doc fix|docs update)\b/) ||
title.startsWith('docs:') || title.startsWith('[docs]')) {
labels.push('documentation');
}
// Security
else if (text.match(/\b(security issue|vulnerability|security bug)\b/) ||
title.startsWith('security:') || title.startsWith('[security]')) {
labels.push('security');
}
// Needs triage for incomplete issues
if (labels.length === 0 && (body.length < 50 || !body.includes('\n'))) {
labels.push('needs-triage');
}
// Add labels if found
if (labels.length > 0) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
labels: labels
});
}
help:
name: Provide Help Resources
runs-on: ubuntu-latest
# Runs if the issue contains "/help"
if: |
github.event.action == 'opened' &&
(contains(github.event.issue.body, '/help') || contains(github.event.issue.title, '/help'))
steps:
- name: Post help resources
uses: actions/github-script@v7
with:
script: |
const response = `📚 **Help Resources**
Here are some helpful resources:
- [Getting Started](https://github.com/${{ github.repository }}/blob/main/docs/getting-started.md)
- [FAQ](https://github.com/${{ github.repository }}/blob/main/docs/faq.md)
- [Documentation](https://github.com/${{ github.repository }}/tree/main/docs)
- [GitHub Discussions](https://github.com/${{ github.repository }}/discussions) - Ask questions here
- [Discord](https://discord.gg/semantica) - Real-time chat
💡 **Tip**: For questions, consider using [GitHub Discussions](https://github.com/${{ github.repository }}/discussions) instead of issues.`;
await github.rest.issues.createComment({
issue_number: context.payload.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: response
});
-53
View File
@@ -1,53 +0,0 @@
name: Mark Discussion as Answered
# This workflow allows maintainers to mark a discussion comment as the answer
# Usage: Comment "/answered" on the correct reply
on:
discussion_comment:
types: [created]
# Permissions needed to modify discussions
permissions:
contents: read
discussions: write
jobs:
mark-answered:
name: Mark Discussion as Answered
runs-on: ubuntu-latest
# Only runs if the comment contains "/answered" and is from a maintainer
if: |
github.event.action == 'created' &&
contains(github.event.comment.body, '/answered') &&
(github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'OWNER' ||
github.event.comment.author_association == 'COLLABORATOR')
steps:
- name: Mark discussion as answered
uses: actions/github-script@v7
with:
script: |
const discussion = context.payload.discussion;
const commentId = context.payload.comment.id;
try {
// Mark the comment as the answer
await github.rest.discussions.markAnswerComment({
discussion_number: discussion.number,
comment_number: commentId,
owner: context.repo.owner,
repo: context.repo.repo
});
// Mark the discussion as answered
await github.rest.discussions.markAsAnswer({
discussion_number: discussion.number,
comment_number: commentId,
owner: context.repo.owner,
repo: context.repo.repo
});
} catch (error) {
console.log('Could not mark as answered:', error.message);
}
-48
View File
@@ -1,48 +0,0 @@
name: Publish to PyPI
# This workflow publishes the package to PyPI (Python Package Index)
# It runs automatically after a GitHub Release is published
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/semantica/${{ github.event.release.tag_name }}/
# Permissions needed to authenticate with PyPI
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
# Builds the package again to ensure it's fresh
run: python -m build
- name: Publish to PyPI
# Uses Trusted Publishing (OIDC) to upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/
print-hash: true
+9 -46
View File
@@ -1,62 +1,25 @@
name: Create Release
# This workflow creates a GitHub Release when you push a version tag
# Example tag: v1.0.0
name: Release
on:
push:
tags:
- 'v*'
tags: ['v*']
# Permissions needed to create a release
permissions:
contents: write
id-token: write
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
environment: pypi
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Extract version from tag
id: tag
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
- name: Build package
# Builds the Python package (wheel and source distribution)
run: python -m build
- name: Validate package
# Checks if the package description is valid
run: twine check dist/*
- name: Create GitHub Release
# Creates the release on GitHub and attaches the built files
uses: softprops/action-gh-release@v1
- run: pip install build
- run: python -m build
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ steps.tag.outputs.VERSION }}
body_path: CHANGELOG.md
draft: false
prerelease: false
generate_release_notes: true
files: dist/*
- uses: pypa/gh-action-pypi-publish@release/v1
+3 -50
View File
@@ -1,65 +1,18 @@
name: Security Scan
# Scans dependencies and code for security vulnerabilities
# Runs on push, PR, weekly schedule, and manual trigger
name: Security
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:
permissions:
contents: read
security-events: write
jobs:
dependency-scan:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: |
pip install safety pip-audit
pip install -e ".[dev]"
- run: pip install pip-audit
- run: pip-audit
- run: safety check
continue-on-error: true
code-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
scan-ref: '.'
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
- uses: github/codeql-action/upload-sarif@v3
if: always() && hashFiles('trivy-results.sarif') != ''
with:
sarif_file: 'trivy-results.sarif'
continue-on-error: true
+24 -4
View File
@@ -7,11 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.0.4] - 2025-11-26
### Changed
- Fixed PyPI deployment issues from v0.0.3
## [0.0.3] - 2025-11-25
### Changed
- Simplified CI/CD workflows - removed failing tests and strict linting
- Combined release and PyPI publishing into single workflow
- Simplified security scanning to weekly pip-audit only
- Streamlined GitHub Actions configuration
### Added
- Initial open source project structure
- Comprehensive documentation framework
- Contributing guidelines and code of conduct
- Security policy and vulnerability reporting process
- Comprehensive issue templates (Bug, Feature, Documentation, Support, Grant/Partnership)
- Updated pull request template with clear guidelines
- Community support documentation (SUPPORT.md)
- Funding and sponsorship configuration (FUNDING.yml)
- GitHub configuration README for maintainers
- 10+ new domain-specific cookbook examples (Finance, Healthcare, Cybersecurity, etc.)
### Removed
- Redundant scripts folder (8 shell/PowerShell scripts)
- Unnecessary automation workflows (label-issues, mark-answered)
- Excessive issue templates
## [0.0.2] - 2025-11-25
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "semantica"
version = "0.0.2"
version = "0.0.4"
description = "🧠 Semantica - An Open Source Framework for building Semantic Layers and Knowledge Engineering "
readme = "README.md"
license = {text = "MIT"}
+1 -1
View File
@@ -11,7 +11,7 @@ Main exports:
- build: Module-level build function for easy access
"""
__version__ = "0.0.2"
__version__ = "0.0.4"
__author__ = "Semantica Contributors"
__license__ = "MIT"