From f4502283ef39499253d5a0826eeb8804977ec9e8 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 17 Jun 2026 20:02:04 +0000 Subject: [PATCH 1/2] Align status messaging to Stable and extend CI to Python 3.13/3.14 Resolve the alpha-vs-stable contradiction: pyproject and README already declare the public API Stable, so update docs/api_status.md and docs/conventions.md to drop the remaining "alpha" wording and describe the public API as stable and parity-focused. Extend the native backend PR CI matrix from {3.11, 3.12} to {3.11, 3.12, 3.13, 3.14} to match the support matrix declared in pyproject.toml classifiers and cibuildwheel. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01BwFx145eq6LfzZFFMvp8BD --- .github/workflows/native-backend-ci.yml | 2 +- docs/api_status.md | 7 ++++--- docs/conventions.md | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/native-backend-ci.yml b/.github/workflows/native-backend-ci.yml index c7414763..67f09d6f 100644 --- a/.github/workflows/native-backend-ci.yml +++ b/.github/workflows/native-backend-ci.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.11", "3.12"] + python-version: ["3.11", "3.12", "3.13", "3.14"] steps: - name: Check out repo diff --git a/docs/api_status.md b/docs/api_status.md index 6f316217..24ab0292 100644 --- a/docs/api_status.md +++ b/docs/api_status.md @@ -3,7 +3,7 @@ This page summarizes the public NNS Python API surface, known gaps, guarded paths, and design boundaries. -NNS Python is an alpha, parity-focused Python port of installed R NNS 13.0, +NNS Python is a stable, parity-focused Python port of installed R NNS 13.0, implemented natively in Python on top of NumPy and SciPy. It does not wrap R, call the R package at runtime, or depend on compiled R/C++ shims. The goal is public input/output compatibility where R behavior is stable, @@ -81,7 +81,7 @@ invariant, and property coverage. - Stochastic exact stream parity is not expected. Stochastic paths use NumPy RNG and are tested structurally/statistically. - Plotting side effects from R APIs are generally ignored; NNS Python returns data. -- Stochastic-dominance performance work stays pure NumPy for alpha. The current +- Stochastic-dominance performance work stays pure NumPy for now. The current implementation mirrors R's sorted-column/prefix-sum algorithm and adds Python-specific guard pruning, kept-only active-set scans for degree 2/3 and degree-1 continuous calls, and an exact order-statistic matrix for large @@ -115,7 +115,8 @@ examples include: ## Release-Relevant Caveats -- NNS Python is alpha. The public API is parity-focused but not declared stable. +- The public API is stable and parity-focused. Behavior is not expected to break + across minor releases. - This is not full R parity yet. - `dy_d` scalar and vectorized point/distribution modes are covered on focused fixtures. Multi-row mixed derivative point matrices intentionally use diff --git a/docs/conventions.md b/docs/conventions.md index 614ff772..5bef216b 100644 --- a/docs/conventions.md +++ b/docs/conventions.md @@ -90,7 +90,7 @@ data-frame grouping or filtering. R remains faster on some large finance fixtures because its C++ path walks merged sorted thresholds in tight parallel loops with minimal temporaries; NNS Python instead uses NumPy order-statistic blocks, `searchsorted`, contiguous column storage, and early-exit scans to stay -dependency-light and pure Python for alpha. +dependency-light and pure Python. `nns_cdf` maps to R's `NNS.CDF` deterministic non-plotting paths. It is a partial-moment distribution wrapper rather than a textbook ECDF: `degree = 0` From 0e12ff4416d20c211d8325036116b024c5f696c6 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 17 Jun 2026 20:59:39 +0000 Subject: [PATCH 2/2] Fix stale "native scaffolding removed" claim in conventions.md The Build section claimed NNS Python is a pure-Python port whose native extension scaffolding was removed. That contradicts README (which describes optional private `nns._nnscore` kernels and scikit-build-core / nanobind source builds) and CMakeLists.txt (which still builds and installs `_nnscore`). Reframe the section to describe the optional native acceleration accurately while keeping native code a private, fallback- backed implementation detail. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01BwFx145eq6LfzZFFMvp8BD --- docs/conventions.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/conventions.md b/docs/conventions.md index 5bef216b..4f15d64e 100644 --- a/docs/conventions.md +++ b/docs/conventions.md @@ -2,10 +2,12 @@ ## Build -NNS Python is currently a pure-Python/NumPy/SciPy port. The earlier native extension -scaffolding was removed after the core port demonstrated pure NumPy/SciPy parity -and competitive performance. Reintroduce native code only as a deliberate future -change backed by benchmarks. +NNS Python is a Python-native NumPy/SciPy port with optional private native +acceleration through `nns._nnscore` where available. Source builds use +`scikit-build-core` and `nanobind` to compile the extension; published wheels +should be preferred when available. Public APIs keep Python implementations and +explicit fallback behavior, so native code remains a deliberate, +benchmark-backed implementation detail rather than a public API. ## Degree-Zero Boundary