Skip to content
Merged
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
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Description
Brief description of the changes in this PR.

## Type of Change
- [ ] 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
- [ ] Performance improvement
- [ ] Code refactoring

## Testing
- [ ] Tests pass locally
- [ ] New tests added for new functionality
- [ ] All existing tests pass
- [ ] Manual testing completed

## Checklist
- [ ] Code follows the project's coding standards
- [ ] Self-review of the code completed
- [ ] Code is properly commented
- [ ] Documentation updated (if applicable)
- [ ] No new warnings or errors introduced

## Related Issues
Closes #(issue number)

## Additional Notes
Any additional information that reviewers should know.
27 changes: 27 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 10
reviewers: []
assignees: []
commit-message:
prefix: "chore"
include: "scope"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 5
reviewers: []
assignees: []
commit-message:
prefix: "chore"
include: "scope"
39 changes: 39 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Performance Benchmarks

on:
push:
branches: [ main ]
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday
workflow_dispatch:

jobs:
benchmark:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest-benchmark memory-profiler

- name: Run benchmarks
run: |
pytest tests/benchmarks/ -v --benchmark-only --benchmark-save=benchmark
python scripts/run_benchmarks.py

- name: Upload benchmark results
uses: actions/upload-artifact@v3
with:
name: benchmark-results
path: |
.benchmarks/
benchmark_results/
41 changes: 41 additions & 0 deletions .github/workflows/dependency-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Dependency Updates

on:
schedule:
- cron: '0 0 * * 1' # Weekly on Monday
workflow_dispatch:

jobs:
update-dependencies:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pip-tools

- name: Update requirements
run: |
pip-compile requirements.in --upgrade
pip-compile requirements-dev.in --upgrade

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore: update dependencies'
title: 'Automated dependency updates'
body: |
This PR contains automated dependency updates.

Please review the changes and test before merging.
branch: dependency-updates
delete-branch: true
86 changes: 25 additions & 61 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,77 +1,41 @@
name: Build and Deploy Documentation
name: Documentation

on:
push:
branches: [ develop ]
branches: [ main, develop ]
pull_request:
branches: [ develop ]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Use a unique concurrency group to avoid conflicts
concurrency:
group: "sphinx-docs-${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
branches: [ main, develop ]

jobs:
build-docs:
name: Build Sphinx Documentation
docs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[docs]
# Also install the main package dependencies
pip install -e .

pip install -r requirements.txt
pip install sphinx sphinx-rtd-theme sphinx-autodoc-typehints

- name: Build documentation
run: |
echo "Starting documentation build..."
cd docs
echo "Current directory: $(pwd)"
echo "Contents of source directory:"
ls -la source/
make clean
echo "Building Sphinx documentation..."
sphinx-build -b html source build/html
echo "Creating .nojekyll file..."
touch build/html/.nojekyll
echo "Documentation build complete!"
echo "Contents of build directory:"
ls -la build/html/

- name: Setup Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
uses: actions/configure-pages@v5

- name: Upload artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
uses: actions/upload-pages-artifact@v3
cd docs/
sphinx-build -b html . _build/html

- name: Check for broken links
run: |
pip install linkchecker
linkchecker docs/_build/html/ --check-extern

- name: Upload documentation
uses: actions/upload-artifact@v3
with:
path: './docs/build/html'

deploy-docs:
name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
needs: build-docs
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
name: documentation
path: docs/_build/html/
40 changes: 40 additions & 0 deletions .github/workflows/gpu-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: GPU Tests

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:

jobs:
gpu-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install CUDA dependencies
run: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-0

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov

- name: Run GPU tests
run: |
python -c "import torch; print(f'CUDA available: {torch.cuda.is_available()}')"
pytest tests/test_gpu/ -v --tb=short
env:
CUDA_VISIBLE_DEVICES: 0
44 changes: 44 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Code Quality

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install black isort flake8 mypy pre-commit

- name: Run black (code formatting)
run: black --check --diff src/ tests/ scripts/

- name: Run isort (import sorting)
run: isort --check-only --diff src/ tests/ scripts/

- name: Run flake8 (linting)
run: flake8 src/ tests/ scripts/ --max-line-length=100 --ignore=E203,W503

- name: Run mypy (type checking)
run: mypy src/alignment/ --ignore-missing-imports --no-strict-optional

- name: Check for TODO/FIXME comments
run: |
if grep -r "TODO\|FIXME" src/ tests/; then
echo "Found TODO/FIXME comments. Please address them."
exit 1
fi
27 changes: 27 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Pre-commit

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
pre-commit:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install pre-commit
run: |
python -m pip install --upgrade pip
pip install pre-commit

- name: Run pre-commit
uses: pre-commit/action@v3.0.0
Loading
Loading