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
2 changes: 1 addition & 1 deletion .github/.git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Migrate code style to Black
c2e17898e9b907384b4e8669828e1efbc9efdc77
c2e17898e9b907384b4e8669828e1efbc9efdc77
10 changes: 5 additions & 5 deletions .github/workflows/benchmark.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ on:
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 -e .
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@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/black.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--line-length 150"
options: "--line-length 150"
12 changes: 6 additions & 6 deletions .github/workflows/dependency-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ on:
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 --output-file requirements.txt

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
Expand All @@ -34,7 +34,7 @@ jobs:
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
10 changes: 5 additions & 5 deletions .github/workflows/deploy-docs.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- 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 mkdocs mkdocs-material pymdown-extensions

- name: Prepare documentation
run: |
chmod +x prepare_docs.sh
./prepare_docs.sh

- name: Deploy documentation
run: mkdocs gh-deploy --force
run: mkdocs gh-deploy --force
12 changes: 6 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@ jobs:
docs:
runs-on: ubuntu-latest
timeout-minutes: 20

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 -e .
pip install sphinx sphinx-rtd-theme sphinx-autodoc-typehints myst-parser sphinx-copybutton

- name: Build documentation
run: |
cd docs/
make html

- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/_build/html/
path: docs/_build/html/
10 changes: 5 additions & 5 deletions .github/workflows/gpu-test.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@ on:
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 -e .
pip install pytest pytest-cov

- name: Run GPU tests
run: |
python -c "import torch; print(f'CUDA available: {torch.cuda.is_available()}')"
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 15

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 -e .
pip install "black==25.9.0" isort flake8 mypy ruff

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

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

- name: Run flake8 (linting)
run: flake8 src/alignment/ tests/ scripts/ --max-line-length=100 --ignore=E203,W503 || echo "Flake8 has warnings"

- name: Run mypy (type checking)
run: mypy src/alignment/ --ignore-missing-imports --no-strict-optional || echo "Type checking has warnings"
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
path: './docs/build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
10 changes: 5 additions & 5 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
timeout-minutes: 15

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: Cache pre-commit
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Run pre-commit
uses: pre-commit/action@v3.0.0
continue-on-error: true
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,38 @@ on:
jobs:
release:
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 build twine

- name: Build package
run: python -m build

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

- name: Upload to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
body: |
## Installation

```bash
pip install alignment-framework
```
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,30 @@ jobs:
security:
runs-on: ubuntu-latest
timeout-minutes: 20

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 -e .
pip install bandit safety semgrep

- name: Run bandit (security linting)
run: bandit -r src/ -f json -o bandit-report.json || true

- name: Run safety (dependency vulnerability check)
run: safety check --json --output safety-report.json || true

- name: Run semgrep (static analysis)
run: semgrep --config=auto src/ --json --output=semgrep-report.json || true

- name: Upload security reports
uses: actions/upload-artifact@v4
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Cache pip dependencies
uses: actions/cache@v4
with:
Expand All @@ -31,18 +31,18 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-

- name: Install system dependencies
run: |
sudo apt-get update || true
sudo apt-get install -y libgl1-mesa-glx libglib2.0-0 || true

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov pytest-xdist
pip install -e .

- name: Run tests
run: |
pytest tests/ -v --cov=src/alignment --cov-report=xml --cov-report=html --cov-report=term-missing --tb=short -ra
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,4 @@ benchmark_results/

# Documentation
docs/_build/
docs/build/
docs/build/
Loading
Loading