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
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ jobs:
ruff check src/ tests/
continue-on-error: true

- name: Type check with ty (non-blocking)
run: |
ty check src/
continue-on-error: true

security:
name: Security Scan
runs-on: ubuntu-latest
Expand Down Expand Up @@ -229,3 +234,32 @@ jobs:
sarif_file: bandit-report.sarif
category: bandit
continue-on-error: true

docs-reference-sync:
name: API Reference In Sync
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
cache-dependency-glob: "pyproject.toml"

- name: Regenerate the quartodoc API reference
run: |
uv run python docs/quartodoc_build.py
uv run quartodoc interlinks

- name: Fail if committed docs/reference is stale
run: |
if ! git diff --exit-code -- docs/reference/; then
echo "::error::docs/reference is out of sync with quartodoc. Run 'uv run python docs/quartodoc_build.py && uv run quartodoc interlinks' locally and commit the result."
exit 1
fi
12 changes: 3 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,9 @@ repos:
- id: ruff
args: [--fix]

# Type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies:
- types-all
args: [--no-error-summary]
exclude: ^(tests/|docs/)
# Type checking now runs in CI via Astral `ty` (non-blocking); the heavy
# mypy + types-all pre-commit hook was removed during the tooling-baseline
# convergence (roadmap #6).

# YAML validation
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
2 changes: 1 addition & 1 deletion REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SPDX-PackageSupplier = "bartzbeielstein <32470350+bartzbeielstein@users.noreply.
SPDX-PackageDownloadLocation = "https://github.com/sequential-parameter-optimization/spotforecast2-safe"

[[annotations]]
path = [".flake8", ".gitignore", ".python-version", ".releaserc.json", ".semantic-release-init", "mkdocs.yml", "pyproject.toml", "uv.lock", "junit.xml"]
path = [".gitignore", ".python-version", ".releaserc.json", ".semantic-release-init", "mkdocs.yml", "pyproject.toml", "uv.lock", "junit.xml"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 bartzbeielstein"
SPDX-License-Identifier = "AGPL-3.0-or-later"
Expand Down
29 changes: 25 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ requires-python = ">=3.13"
dependencies = [
"astral>=3.2,<4.0",
"feature-engine>=1.9.3,<2.0",
"flake8>=7.3.0,<8.0",
"holidays>=0.90,<1.0",
"lightgbm>=4.6.0,<5.0",
"numba>=0.63.1,<1.0",
Expand Down Expand Up @@ -58,8 +57,8 @@ dev = [
# ── Security scanning ────────────────────────────────────────────────────
"safety>=3.0.0,<4.0",
"bandit>=1.8.0,<2.0",
# ── Type checking ────────────────────────────────────────────────────────
"mypy>=1.8.0,<3.0",
# ── Type checking (Astral ty; non-blocking in CI) ────────────────────────
"ty>=0.0.29",
]

[project.optional-dependencies]
Expand All @@ -76,7 +75,7 @@ dev = [
"nbformat>=5.10.4",
"safety>=3.0.0,<4.0",
"bandit>=1.8.0,<2.0",
"mypy>=1.8.0,<3.0",
"ty>=0.0.29",
]

[project.scripts]
Expand Down Expand Up @@ -116,3 +115,25 @@ target-version = ["py313"]
# explicit profile keeps the two formatters in agreement regardless of version.
[tool.isort]
profile = "black"

# Ruff config (replaces the removed legacy .flake8). Line length matches black;
# the default rule set (pyflakes + pycodestyle E/F) is kept. CI runs
# `ruff check` non-blocking (see .github/workflows/ci.yml).
[tool.ruff]
line-length = 88
target-version = "py313"

[tool.coverage.run]
branch = true
source = ["src/spotforecast2_safe"]

[tool.coverage.report]
# Ratchet: lock in the current ~71% coverage (measured locally) so it cannot
# regress; 68 leaves a small margin for platform variance on CI. Raise
# deliberately as coverage improves. CI runs pytest with --cov, enforcing this.
fail_under = 68

# Astral `ty` type checker. Run non-blocking in CI (continue-on-error) so it
# surfaces type debt without failing the build; tighten to a gate later.
[tool.ty.environment]
python-version = "3.13"
Loading