Thank you for your interest in contributing to AUP Learning Cloud! This document provides guidelines and setup instructions for developers.
- Python: 3.10+
- Node.js: 20+
- pnpm: 9+
- Git: 2.30+
-
Clone the repository
git clone https://github.com/AMDResearch/aup-learning-cloud.git cd aup-learning-cloud -
Install Python dependencies
pip install ruff pre-commit yamllint
-
Install frontend dependencies
cd runtime/hub/frontend pnpm install cd -
-
Install pre-commit hooks (optional but recommended)
pre-commit install
This will automatically run lint checks before each commit.
We use the following tools to maintain code quality:
- Linter: Checks code style and potential bugs
- Formatter: Auto-formats code to match project style
- Config:
pyproject.toml
Run checks:
# Lint check
ruff check .
# Format check
ruff format --check .
# Auto-fix issues
ruff check --fix .
ruff format .- ESLint: JavaScript/TypeScript/Vue linter
- Prettier: Code formatter
- TypeScript: Type checking
- Config:
runtime/hub/frontend/eslint.config.js,.prettierrc
Run checks:
cd runtime/hub/frontend
# Lint
pnpm run lint
# Format check
pnpm run format:check
# Type check
pnpm run type-check
# Auto-fix
pnpm run lint:fix
pnpm run format- Config:
.yamllint.yaml
Run checks:
yamllint .- Config:
.shellcheckrc
Run checks:
# Install on Ubuntu/Debian
sudo apt-get install shellcheck
# Run
find . -name "*.sh" -o -name "*.bash" | \
grep -v node_modules | \
grep -v .git | \
xargs -r shellcheck-
Install recommended extensions (prompt will appear automatically):
- Ruff
- Python
- Prettier
- ESLint
- Vue - Official (Volar)
- YAML
- ShellCheck
- EditorConfig
- GitLens
-
Settings are pre-configured in
.vscode/settings.json:- Format on save enabled
- Auto-organize imports
- Use project-specific formatters
- EditorConfig configuration:
.editorconfig - Use plugins for Ruff, ESLint, and Prettier in your editor
-
Run all lint checks locally:
# Python ruff check . ruff format --check . # YAML yamllint . # Frontend (from runtime/hub/frontend) pnpm run lint pnpm run format:check pnpm run type-check
-
Ensure all checks pass:
- CI will automatically run these checks on your PR
- PRs with failing lint checks cannot be merged
-
Commit message format:
- Use clear, descriptive commit messages
- Start with a verb (Add, Fix, Update, Refactor, etc.)
- Keep the first line under 72 characters
Teaching notebooks in projects/ have relaxed lint rules:
- Imports don't need to be at the top
import *is allowed for teaching purposes- Single-letter variables (e.g.,
x,y,l) are permitted - Unused variables are allowed (exploratory code)
- Lambda assignments are acceptable (teaching patterns)
Standard production code rules apply to:
runtime/hub/core/jupyterhub_config.pyscripts/- All other Python files
- All files use LF (Unix-style) line endings
- All files must end with a newline
- Git is configured to automatically normalize line endings (
.gitattributes) - If you're on Windows, configure Git:
git config --global core.autocrlf input
| Prefix | Use Case | Example |
|---|---|---|
| feature/ | Developing new features or enhancements | feature/user-login |
| bugfix/ | Fixing bugs in development or staging | bugfix/sidebar-display |
| hotfix/ | Urgent fixes for critical issues in Production | hotfix/payment-gateway-crash |
| refactor/ | Code restructuring without changing functionality | refactor/api-response-handler |
| docs/ | Documentation updates only | docs/update-readme |
| chore/ | Routine tasks, dependency updates, build config | chore/update-dependencies |
| test/ | Adding or correcting test cases | test/add-unit-tests |
| perf/ | Performance optimizations | perf/database-query-tuning |
| style/ | Code formatting, linting (no logic change) | style/fix-lint-errors |
| ci/ | CI/CD configuration and scripts | ci/github-actions-setup |
AUP Learning Cloud uses a multi-layer attribution system to ensure the platform identity remains visible to end users regardless of how the codebase is modified.
When contributing, please preserve all four layers:
| Layer | File | What |
|---|---|---|
| HTTP header | runtime/hub/core/jupyterhub_config.py |
X-Powered-By: AUP Learning Cloud |
| API endpoint | runtime/hub/core/handlers.py |
PlatformInfoHandler at /api/platform |
| HTML footer | runtime/hub/frontend/templates/page.html |
#auplc-powered-by-footer |
| Frontend constants | runtime/hub/frontend/packages/shared/src/branding.ts |
PLATFORM_NAME etc. |
When adding new UI pages or React apps, import PLATFORM_NAME from @auplc/shared
rather than hardcoding the string "AUP Learning Cloud".
For AI agent guidance, see AGENTS.md.
- Open an issue for bugs or feature requests
- Check existing documentation at https://amdresearch.github.io/aup-learning-cloud/
Thank you for contributing!