Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Publish to PyPI

on:
release:
types: [published]
workflow_dispatch:
inputs:
package:
Expand Down Expand Up @@ -47,19 +45,7 @@ jobs:
- name: Determine packages to publish
id: packages
run: |
if [[ "${{ github.event_name }}" == "release" ]]; then
# Determine from tag
TAG="${{ github.event.release.tag_name }}"
if [[ $TAG == sai-* ]]; then
echo "packages=sai" >> $GITHUB_OUTPUT
elif [[ $TAG == saigen-* ]]; then
echo "packages=saigen" >> $GITHUB_OUTPUT
else
echo "packages=both" >> $GITHUB_OUTPUT
fi
else
echo "packages=${{ github.event.inputs.package }}" >> $GITHUB_OUTPUT
fi
echo "packages=${{ github.event.inputs.package }}" >> $GITHUB_OUTPUT

- name: Build SAI package
if: steps.packages.outputs.packages == 'sai' || steps.packages.outputs.packages == 'both'
Expand Down Expand Up @@ -90,13 +76,13 @@ jobs:
packages-dir: saigen/dist/

- name: Publish SAI to PyPI
if: (steps.packages.outputs.packages == 'sai' || steps.packages.outputs.packages == 'both') && (github.event.inputs.environment == 'pypi' || github.event_name == 'release')
if: (steps.packages.outputs.packages == 'sai' || steps.packages.outputs.packages == 'both') && github.event.inputs.environment == 'pypi'
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: sai/dist/

- name: Publish SAIGEN to PyPI
if: (steps.packages.outputs.packages == 'saigen' || steps.packages.outputs.packages == 'both') && (github.event.inputs.environment == 'pypi' || github.event_name == 'release')
if: (steps.packages.outputs.packages == 'saigen' || steps.packages.outputs.packages == 'both') && github.event.inputs.environment == 'pypi'
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: saigen/dist/
15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev,test]"
pip install -e "./saigen[dev,test]" -e "./sai[dev,test]"

- name: Run tests
run: |
Expand Down Expand Up @@ -56,16 +56,17 @@ jobs:
python -m pip install --upgrade pip
pip install build twine

- name: Build package
- name: Build packages
run: |
python -m build
python -m build saigen --outdir dist
python -m build sai --outdir dist

- name: Check package
run: |
twine check dist/*

- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
Expand All @@ -76,7 +77,7 @@ jobs:
environment: release
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
Expand All @@ -95,7 +96,7 @@ jobs:
fetch-depth: 0

- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
Expand Down Expand Up @@ -185,4 +186,4 @@ jobs:
if: needs.create-release.result == 'failure'
run: |
echo "❌ Release v${{ steps.version.outputs.version }} failed!"
exit 1
exit 1
19 changes: 7 additions & 12 deletions MONOREPO.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sai-suite/
## Package Independence

Each package can be:
- **Installed independently**: `pip install sai` or `pip install saigen`
- **Installed separately**: `pip install sai` installs SAIGEN as a runtime dependency; `pip install saigen` installs SAIGEN alone
- **Built separately**: Each has its own `pyproject.toml`
- **Versioned independently**: Separate version numbers
- **Published separately**: Independent PyPI releases
Expand All @@ -36,15 +36,12 @@ Each package can be:
### For End Users

```bash
# Install SAI only (lightweight, for execution)
# Install SAI for execution (includes SAIGEN)
pip install sai

# Install SAIGEN only (for metadata generation)
pip install saigen

# Install SAI with generation support
pip install sai[generation]

# Install SAIGEN with all features
pip install saigen[all]
```
Expand Down Expand Up @@ -153,19 +150,17 @@ pytest

## Dependency Management

### SAI Dependencies (Minimal)
- Core execution libraries only
- No AI/ML dependencies
- Lightweight for production use
### SAI Dependencies
- Core execution libraries and SAIGEN, whose saidata model SAI imports
- SAIGEN's AI/ML providers remain optional

### SAIGEN Dependencies (Comprehensive)
- All SAI dependencies
### SAIGEN Dependencies
- Shared data and generation libraries
- AI/ML libraries (optional)
- Repository integration tools
- Generation and validation tools

### Optional Dependencies
- `sai[generation]`: Adds SAIGEN as dependency
- `saigen[llm]`: Adds LLM providers
- `saigen[rag]`: Adds RAG capabilities
- `saigen[all]`: All features
Expand Down
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

## 📦 Two Packages, One Repository

This repository provides **separate pip packages** that can be installed independently or together:
This repository provides **separate pip packages**. Installing SAI also installs SAIGEN because SAI imports its saidata model:

### 🔧 SAI - Software Action Interface

Expand All @@ -47,7 +47,7 @@ pip install sai
- **Scripts**: Execute installation scripts with security validation
- Enhanced template functions for flexible configuration
- **Package name distinction**: Separate logical names (`name`) from actual package names (`package_name`)
- Minimal dependencies for production use
- SAIGEN is a required runtime dependency; its AI/ML integrations remain optional
- Dry-run mode for safe testing
- Works with existing saidata from the [saidata repository](https://github.com/example42/saidata)

Expand Down Expand Up @@ -105,15 +105,12 @@ saigen --version

**Future PyPI Installation (coming soon):**
```bash
# Install SAI only (lightweight, for execution)
# Install SAI for execution (includes SAIGEN)
pip install sai

# Install SAIGEN only (for metadata generation)
pip install saigen

# Install SAI with generation support
pip install sai[generation]

# Install SAIGEN with all features (LLM + RAG)
pip install saigen[all]
```
Expand Down Expand Up @@ -704,7 +701,7 @@ SAI includes specialized providers for security, debugging, and analysis:

## 📄 License

MIT License - see [LICENSE](LICENSE) file for details.
Apache License 2.0 - see [LICENSE](LICENSE) file for details.

---

Expand All @@ -724,4 +721,4 @@ MIT License - see [LICENSE](LICENSE) file for details.

**Made with ❤️ by the SAI team**

*Star ⭐ this repository if you find it useful!*
*Star ⭐ this repository if you find it useful!*
7 changes: 3 additions & 4 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ This installs the SAIGEN tool with all generation capabilities.
If you need both execution and generation capabilities:

```bash
pip install sai[generation]
pip install sai
```

This installs SAI with SAIGEN included as an optional dependency.
This installs SAI and its required SAIGEN dependency.

**Use this when:**
- You need both execution and generation in one environment
Expand All @@ -70,9 +70,8 @@ pip install saigen[all]

| Package | Size | Dependencies | Use Case |
|---------|------|--------------|----------|
| `sai` | Small | Minimal | Production execution |
| `sai` | Medium | SAIGEN plus execution libraries | Production execution |
| `saigen` | Medium | Standard | Metadata generation |
| `sai[generation]` | Medium | Standard | Development & testing |
| `saigen[llm]` | Large | +AI providers | AI-powered generation |
| `saigen[rag]` | Large | +ML libraries | Advanced RAG features |
| `saigen[all]` | Largest | Everything | Full development suite |
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ addopts = [
"--cov-fail-under=80",
]
testpaths = ["tests"]
norecursedirs = ["tests/archive"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
Expand Down
Loading
Loading