Skip to content

Migrate seeded package to official NNS-python identity - #1

Merged
OVVO-Financial merged 1 commit into
mainfrom
codex/migrate-seeded-package-to-official-nns-python-identity
Jun 12, 2026
Merged

Migrate seeded package to official NNS-python identity#1
OVVO-Financial merged 1 commit into
mainfrom
codex/migrate-seeded-package-to-official-nns-python-identity

Conversation

@OVVO-Financial

Copy link
Copy Markdown
Owner

Motivation

  • Finalize the repository identity migration from the seeded parity prototype into the official NNS Python package (seeded from the parity-hardened pyNNS-core-backed main after PR PyPI release pipeline + official ovvo-nns package name #10).
  • Provide a stable distribution identity and build/install behavior so the native extension installs as nns._nnscore and the published package metadata targets the official name.
  • Preserve all existing parity evidence, cache fixtures, and original R-test adoption while shifting documentation and CI to the new identity.
  • Support a safe environment-variable migration that prefers NNS_R_CACHE_ONLY while continuing to accept the legacy PYNNS_R_CACHE_ONLY toggles during the transition.

Description

  • Renamed the Python package layout and public imports from pynnsnns by moving src/pynnssrc/nns, updating __init__ exports and all internal imports and tests to use nns (public import package: nns).
  • Updated packaging metadata in pyproject.toml to name = "NNS", version = "1.0.0a0", and to build/install from src/nns (wheel packages and sdist includes updated).
  • Reworked native build and install paths: CMakeLists.txt and the nanobind binding source are pointed at src/nns/_nnscore_bindings.cpp and the extension is installed into nns so the runtime module is nns._nnscore; runtime discovery changed in src/nns/_native.py.
  • Migrated CI, docs, examples, and scripts: .github/workflows/native-backend-ci.yml now imports nns._nnscore and uses NNS_R_CACHE_ONLY, tests/_r.py and scripts/regenerate_r_cache.py accept both NNS_* and PYNNS_* environment toggles, and README/docs were updated to reference the distribution NNS, import nns, native extension nns._nnscore, cache-backed CI behavior, and parity scope/caveats.
  • Preserved parity evidence and fixtures by adding them to sdist include and leaving the original files in place, including docs/parity_results.md, docs/parity_status.md, docs/parity_plan.md, docs/original_tests_adoption.md, docs/plot_parity_policy.md, docs/native_original_src_coverage.md, tests/_r_cache.json, tests/fixtures/original_tests_expected.json, and original_tests/.

Testing

  • Ran python -m pytest -q tests/invariants (installed editable in the local venv) and observed 314 passed.
  • Ran cache-only parity NNS_R_CACHE_ONLY=1 python -m pytest -q tests/parity and observed 1778 passed, 11 skipped (the 11 skips are intentional live-R-only practical examples).
  • Ran the original-tests subset NNS_R_CACHE_ONLY=1 python -m pytest -q tests/parity/test_original_* and observed 12 passed.
  • Confirmed legacy migration support by running PYNNS_R_CACHE_ONLY=1 python -m pytest -q tests/parity which produced the same 1778 passed, 11 skipped result.
  • Static checks passed: ruff check . and mypy both reported no issues.
  • Packaging/build: python -m build could not be executed in this restricted environment due to a missing build module / network fetch limits, but an offline build via the repo build driver (uv build) succeeded and produced dist/nns-1.0.0a0.tar.gz and dist/nns-1.0.0a0-*.whl with the native nns._nnscore shared module installed into the nns/ package.

No PyPI publication, release tagging, or changes to the vendored NNS-core behavior are included in this PR.


Codex Task

@OVVO-Financial
OVVO-Financial merged commit a506098 into main Jun 12, 2026
4 checks passed
@OVVO-Financial
OVVO-Financial deleted the codex/migrate-seeded-package-to-official-nns-python-identity branch June 12, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant