Skip to content
Merged
14 changes: 10 additions & 4 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,25 @@ env:

jobs:
integration-tests:
name: Integration Tests (${{ matrix.python-version }})
runs-on: ubuntu-latest
timeout-minutes: 8
# Run integration tests for all target branches
# Required to pass for staging/main, optional for weekly
continue-on-error: ${{ github.base_ref == 'weekly' || (github.event_name == 'push' && github.ref_name == 'weekly') }}
# Run integration tests for both supported versions.
# Python 3.12 remains visible-but-optional during the migration window.
# Weekly branch integration failures remain non-blocking as before.
continue-on-error: ${{ matrix.python-version == '3.12' || github.base_ref == 'weekly' || (github.event_name == 'push' && github.ref_name == 'weekly') }}
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12']
env:
ENV: testing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
python -m pip install --upgrade pip
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/sanity-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,20 @@ env:

jobs:
sanity-check:
name: Sanity Check (${{ matrix.python-version }})
runs-on: ubuntu-latest
timeout-minutes: 2
continue-on-error: ${{ matrix.python-version == '3.12' }}
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
python -m pip install --upgrade pip
Expand All @@ -29,4 +35,4 @@ jobs:
- name: Install Campus Suite
run: poetry install --no-root
- name: Run Sanity Checks
run: poetry run tests/run_tests.py sanity
run: poetry run python tests/run_tests.py sanity
8 changes: 7 additions & 1 deletion .github/workflows/type-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,22 @@ on:

jobs:
type-check:
name: Type Check (${{ matrix.python-version }})
runs-on: ubuntu-latest
timeout-minutes: 3
continue-on-error: ${{ matrix.python-version == '3.12' }}
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12']
env:
ENV: testing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
python -m pip install --upgrade pip
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,22 @@ env:

jobs:
unit-tests:
name: Unit Tests (${{ matrix.python-version }})
runs-on: ubuntu-latest
timeout-minutes: 3
continue-on-error: ${{ matrix.python-version == '3.12' }}
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12']
env:
ENV: testing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
python -m pip install --upgrade pip
Expand Down
13 changes: 8 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ Essential reminders for working on the Campus codebase. This guide applies to bo
Campus uses pyenv for Python version management and pipx for Poetry installation.

**Prerequisites:**
- pyenv with Python 3.11 installed
- pyenv with Python 3.11 and/or 3.12 installed
- pipx with Poetry installed
- `~/.local/bin` and pyenv shims in PATH (configured in `~/.bashrc`)

**Installation:**
```bash
# Install pyenv (via package manager)
# Install Python 3.11
# Install supported Python versions
pyenv install 3.11.11
pyenv local 3.11.11
pyenv install 3.12.0

# Install Poetry via pipx (user-level, isolated)
pipx install --python python3.11 poetry
# Prefer 3.12 for new setups; 3.11 remains supported
pyenv local 3.12.0

# Install Poetry via pipx using the active interpreter
pipx install poetry
```

### 2. Running Python Commands
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Campus

[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
[![Python 3.11 | 3.12](https://img.shields.io/badge/python-3.11%20%7C%203.12-blue.svg)](https://www.python.org/downloads/)
[![Flask 3.0+](https://img.shields.io/badge/flask-3.0+-green.svg)](https://flask.palletsprojects.com/)
[![Poetry](https://img.shields.io/badge/dependency%20management-poetry-blue.svg)](https://python-poetry.org/)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
Expand All @@ -23,7 +23,7 @@ Campus is a comprehensive educational management platform that provides:

### Prerequisites

- Python 3.11 or higher
- Python 3.11 or 3.12
- Poetry for dependency management
- PostgreSQL and MongoDB
(for vault and storage services; extensible to support other storage backends)
Expand Down
15 changes: 9 additions & 6 deletions docs/GETTING-STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ For those deploying or using Campus:

### Prerequisites
- **pyenv** for Python version management
- **Python 3.11** (managed via pyenv)
- **Python 3.11 or 3.12** (managed via pyenv; prefer 3.12 for new setups)
- **pipx** for installing Poetry
- **Poetry** for dependency management (installed via pipx)
- PostgreSQL (for auth service database)
Expand All @@ -43,14 +43,17 @@ For those deploying or using Campus:

```bash
# 1. Install pyenv (Arch: pacman -S python-pyenv)
# 2. Install Python 3.11
# 2. Install supported Python versions
pyenv install 3.11.11
pyenv local 3.11.11
pyenv install 3.12.0

# 3. Install Poetry via pipx (user-level, isolated)
pipx install --python python3.11 poetry
# 3. Select the interpreter for this repo (3.12 preferred; 3.11 also supported)
pyenv local 3.12.0

# 4. Configure PATH in ~/.bashrc:
# 4. Install Poetry via pipx (user-level, isolated)
pipx install poetry

# 5. Configure PATH in ~/.bashrc:
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/shims:$PATH" # pyenv shims first
export PATH="$HOME/.local/bin:$PATH" # pipx binaries
Expand Down
2 changes: 1 addition & 1 deletion tests/sanity_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def test_python_version_matches_requirements(self):
"Could not find python requirement in pyproject.toml"
)

# Parse version constraint (e.g., ">=3.11.0,<3.12")
# Parse version constraint (e.g., ">=3.11.0,<3.13")
runtime_version = sys.version_info
runtime_version_str = f"{runtime_version.major}.{runtime_version.minor}.{runtime_version.micro}"

Expand Down
Loading