Skip to content
Open

malik #1268

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
19 changes: 19 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# AgentOps Development Environment Variables
# Copy this file to .env and fill in your actual API keys

# AgentOps Configuration
AGENTOPS_API_KEY=your_agentops_api_key_here

# LLM Provider API Keys (for testing)
OPENAI_API_KEY=your_openai_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here
COHERE_API_KEY=your_cohere_api_key_here
MISTRAL_API_KEY=your_mistral_api_key_here

# Optional: Additional Provider Keys
# GOOGLE_API_KEY=your_google_api_key_here
# HUGGINGFACE_API_KEY=your_huggingface_api_key_here

# Development Settings
# AGENTOPS_ENV=development
# AGENTOPS_DEBUG=true
93 changes: 93 additions & 0 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Sample workflow for building and deploying a Next.js site to GitHub Pages
#
# To get started with Next.js see: https://nextjs.org/docs/getting-started
#
name: Deploy Next.js site to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Setup Pages
uses: actions/configure-pages@v5
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
- name: Restore cache
uses: actions/cache@v4
with:
path: |
.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./out

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
144 changes: 144 additions & 0 deletions GENSPARK_SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# GenSpark AI Developer Setup

This document describes the setup and workflow for the GenSpark AI Developer branch.

## Branch Information

- **Branch Name**: `genspark_ai_developer`
- **Purpose**: AI-assisted development and enhancements for AgentOps
- **Base Branch**: `main`

## Setup Completed

### ✅ Environment Configuration

1. **Branch Created**: `genspark_ai_developer` branch has been created and checked out
2. **Python Version**: Python 3.12.11
3. **Package Manager**: pip 25.0.1
4. **Pre-commit Hooks**: Installed and configured with ruff linter

### ✅ Dependencies Installed

The following dependency groups have been installed:

- **Core Dependencies**: All required packages from `pyproject.toml`
- **Development Tools**: pytest, ruff, mypy, and other dev tools
- **OpenTelemetry Stack**: Full observability stack for monitoring
- **Pre-commit**: Code quality enforcement tools

## Development Workflow

### Making Changes

1. **Make your code changes** in the appropriate files
2. **Test your changes** locally:
```bash
pytest tests/
```

3. **MANDATORY: Commit immediately after changes**:
```bash
git add .
git commit -m "type(scope): description"
```

4. **Sync with remote before PR**:
```bash
git fetch origin main
git rebase origin/main
# Resolve any conflicts, prioritizing remote code
```

5. **Squash all commits into one**:
```bash
# Count your commits first
git log --oneline
# Squash N commits (replace N with your number)
git reset --soft HEAD~N
git commit -m "comprehensive commit message describing all changes"
```

6. **Push to remote**:
```bash
git push -f origin genspark_ai_developer
```

7. **Create or Update Pull Request**:
- Create PR from `genspark_ai_developer` to `main`
- Include comprehensive description
- Share PR link with team

### Commit Message Format

Use conventional commit format:
```
type(scope): description

Examples:
- feat(llms): add support for new LLM provider
- fix(client): resolve connection timeout issue
- docs(readme): update installation instructions
- test(integration): add tests for new feature
```

### Code Quality

Pre-commit hooks will automatically:
- Run ruff linter with auto-fix
- Format code with ruff-format
- Ensure code quality before each commit

## Repository Structure

```
agentops/
├── agentops/ # Main SDK package
│ ├── llms/ # LLM provider integrations
│ ├── sdk/ # Core SDK functionality
│ └── ...
├── app/ # Dashboard application
├── tests/ # Test suite
├── examples/ # Usage examples
├── docs/ # Documentation
└── pyproject.toml # Project configuration
```

## Testing

Run tests with:
```bash
# All tests
pytest tests/

# Specific test file
pytest tests/llms/test_anthropic.py -v

# With coverage
coverage run -m pytest
coverage report
```

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed contribution guidelines.

## Important Notes

- **NO UNCOMMITTED CHANGES**: Every code change must be committed
- **SYNC BEFORE PR**: Always fetch and merge latest remote changes before creating PR
- **SQUASH COMMITS**: Combine all commits into one comprehensive commit
- **RESOLVE CONFLICTS**: Prioritize remote code when resolving conflicts
- **SHARE PR LINK**: Always provide the PR URL after creation/update

## Resources

- [Main README](README.md)
- [Contributing Guide](CONTRIBUTING.md)
- [AgentOps Documentation](https://docs.agentops.ai)
- [Discord Community](https://discord.gg/FagdcwwXRR)

## Setup Date

- **Created**: 2025-10-19
- **Python Version**: 3.12.11
- **Branch Status**: Clean, ready for development
Loading