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
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ jobs:
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Ruff (lint + format check)
if: matrix.python-version == '3.13'
run: |
ruff format --check FasterAPI tests benchmarks
ruff check FasterAPI tests benchmarks

- name: Mypy (strict on library)
if: matrix.python-version == '3.13'
run: mypy FasterAPI tests

- name: Run tests with coverage
run: |
pytest --cov=FasterAPI --cov-report=xml --cov-report=term-missing --cov-fail-under=85
Expand Down
26 changes: 23 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
# Deploy static site to GitHub Pages (repo Settings → Pages → Source: GitHub Actions).
name: Docs

on:
push:
branches: [master]
workflow_dispatch:

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

concurrency:
group: github-pages
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4

Expand All @@ -25,5 +36,14 @@ jobs:
- name: Build MkDocs (strict)
run: mkdocs build --strict

- name: Deploy to GitHub Pages
run: mkdocs gh-deploy --force
- name: Disable Jekyll (avoid 404 on paths with _)
run: touch site/.nojekyll

- uses: actions/configure-pages@v4

- uses: actions/upload-pages-artifact@v3
with:
path: site

- id: deployment
uses: actions/deploy-pages@v4
10 changes: 9 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@ source .venv/bin/activate
pip install -e ".[dev]"

# Run tests
pytest --cov=FasterAPI
pytest --cov=FasterAPI --cov-fail-under=85

# Lint and types (matches CI on Python 3.13)
ruff format --check FasterAPI tests benchmarks
ruff check FasterAPI tests benchmarks
mypy FasterAPI tests

# Multi-version tests (requires Python 3.11–3.13 on PATH)
tox

# Run benchmarks locally
pip install -e ".[benchmark]"
Expand Down
4 changes: 2 additions & 2 deletions FasterAPI/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from __future__ import annotations

from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any

from ._version import get_version

Expand Down Expand Up @@ -94,7 +94,7 @@
]


def __getattr__(name: str):
def __getattr__(name: str) -> Any:
if name == "TestClient":
try:
from .testclient import TestClient as _TestClient
Expand Down
Loading
Loading