Skip to content

[docs+build]: P-value docs, autodoc, metadata + dependency/arch modernization (improve-docs + upgrade-dependencies) - #37

Merged
haoyu-zc merged 3 commits into
refacotring-07-16-2026from
pr-e-docs-deps
Jul 17, 2026
Merged

[docs+build]: P-value docs, autodoc, metadata + dependency/arch modernization (improve-docs + upgrade-dependencies)#37
haoyu-zc merged 3 commits into
refacotring-07-16-2026from
pr-e-docs-deps

Conversation

@haoyu-zc

@haoyu-zc haoyu-zc commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Implements upgrade-dependencies (proposal 7) + improve-docs (proposal 6). Two commits.

⚠️ Please confirm: LICENSE

The LICENSE file is BSD-2-Clause Plus Patent, but CITATION.cff said MIT. Treating the LICENSE file as authoritative, this PR aligns CITATION.cff, the README badge/text, and the pyproject license to BSD-2-Clause-Patent. If MIT was intended, say so and I'll flip it the other way instead.

upgrade-dependencies

  • Aligns declared config with the tested modern stack: drop setuptools/wheel from build-system, add scikit-build-core>=0.10, pin pybind11>=2.13,<4, single CMake floor 3.26...4.0.
  • CUDA architectures 75 → 75;80;86;89;90 — native SASS for Turing…Hopper (verified via cuobjdump); resolves the README-vs-wheel CC contradiction. .so is 7.8 MB.
  • Extras [project.optional-dependencies] (plots/research/test); replaced the private seaborn._freedman_diaconis_bins import in plots.py with a public reimplementation.
  • environment-gpu.yml is now the real single conda-lock source (py3.12/numpy2/CUDA12.x); folded stray env files into extras; environment/README.md documents the regen command. cibuildwheel toolkit 12.5→12.8, arch, Python range (correct-by-inspection; not run here). conda-lock not regenerated (best-effort; documented).

improve-docs

  • P-value docs (the reported gap): rewrote pvalue_n_perms in impl.py + impl_gpu.py — one-sided permutation test, estimator (count+1)/(n_perms+1), interpretation, min resolvable p, return shapes, and a 2D cost warning; fixed the typos (cm_vlaues, pvalue_n_permutations, …). Added a "Computing p-values" docs section + expanded README.
  • Polymorphic ccc() return annotations; version single-sourced to 0.2.4 (ccc.__version__ via importlib.metadata; conf.py + CITATION aligned).
  • Sphinx: autodoc API page (api.rst) renders ccc(); theme → sphinx_rtd_theme; filled bindings.rst; de-duped PUBLISHING; corrected the stale citation (Bioinformatics 2026, btag068); added a benchmarking.rst page for ccc-gpu-bench.
  • Reconciled install/CUDA/CC/Python claims across README & docs.

Note: version bump

A 0.3.0 bump is warranted before the next release because the wheel-slimming across this initiative is a BREAKING packaging change. Not released/tagged here — left to you.

Testing (ccc-gpu-dev, RTX 4090)

Multi-arch rebuild OK; ccc.__version__ == 0.2.4; CPU subset 139 passed, 4 skipped; GPU subset 79 passed; ccc-gpu-bench stdout pure JSONL; ruff/format clean; sphinx-build -W (mocked) rc=0, API page renders. cibuildwheel/RTD not executed locally.

Haoyu Zhang and others added 3 commits July 16, 2026 19:08
…encies)

OpenSpec change: upgrade-dependencies. Aligns declared pins/config with the
tested modern stack (numpy 2.x / numba / pandas 3 / pybind11 3 / py3.12 /
CUDA 12.x) and broadens GPU support.

- build-system: drop setuptools/wheel; add scikit-build-core>=0.10; pin
  pybind11>=2.13,<4 (verified building on 3.0.3).
- CUDA architectures 75 -> 75;80;86;89;90 (native SASS for Turing..Hopper;
  verified via cuobjdump). Reconciled a single CMake floor (3.26...4.0) across
  pyproject and CMakeLists.txt.
- Extras [project.optional-dependencies]: plots, research, test — so the core
  install stays lean and research modules install on demand.
- plots.py: replaced the private seaborn._freedman_diaconis_bins import with a
  public reimplementation (numerically identical).
- environment: environment-gpu.yml is now the real single lock source (py3.12/
  numpy2/numba/CUDA12.x); folded benchmark/toolchain env files into extras;
  new environment/README.md documents the conda-lock regen command.
- cibuildwheel: toolkit 12.5->12.8 (fixed the stale "12.9" comment), arch list,
  Python range 3.10-3.14.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
OpenSpec change: improve-docs.

- P-VALUE DOCS (the reported gap): rewrote the pvalue_n_perms docstring in
  impl.py and impl_gpu.py — one-sided permutation test, estimator
  (count+1)/(n_perms+1), interpretation, min resolvable p ~ 1/(n_perms+1),
  returned tuple shapes, and a cost warning for 2d inputs (a p-value per pair x
  n_perms extra evaluations). Fixed typos (cm_vlaues, pvalue_n_permutations,
  returns_parts, coordiates, maximimized). Added a "Computing p-values" section
  to usage.rst and expanded the README.
- Fixed ccc() return-type annotations to the real polymorphic return.
- Version single-sourcing: ccc.__version__ via importlib.metadata; conf.py reads
  package metadata; CITATION.cff -> 0.2.4. One version everywhere (0.2.4).
- LICENSE: aligned CITATION.cff (was MIT), README, and pyproject classifier to
  the authoritative LICENSE file (BSD-2-Clause-Patent). SEE PR NOTE — confirm.
- Sphinx: added an autodoc API page (api.rst) rendering ccc(); switched theme to
  sphinx_rtd_theme; filled the bindings.rst stub; de-duplicated PUBLISHING.md;
  added Marc Subirana-Granes to authors; corrected the stale citation in
  introduction.rst (Bioinformatics 2026, btag068).
- Added a benchmarking.rst page for the ccc-gpu-bench CLI + README pointer.
- Reconciled README/docs claims (real PyPI install, CUDA/CC floor, Python range).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…codex)

Addresses the two codex findings on PR E:

- [P1] conda-lock.yml still resolved Python 3.10 / NumPy 1.26 and referenced the
  removed environment-gpu-new.yml, so the documented `conda-lock install` built
  the OLD stack. Slimmed environment-gpu.yml to the reproducible build/test/docs
  env (Python 3.12, NumPy 2.x, numba, CUDA 12.5 toolkit, pybind11 3.x, sphinx),
  removing the research/analysis-only deps (minepy/seaborn/etc. — minepy has no
  modern-Python build and blocked the solve), and regenerated conda-lock.yml from
  scratch. The lock now matches the declared source.

- [P2] Removed the `plots` and `research` optional-dependency extras: the modules
  they target (ccc.plots/methods/giant) are intentionally excluded from the wheel
  (cleanup change), so `pip install cccgpu[plots]` could never provide them.
  Their deps are documented for source-checkout/analysis use instead. Kept `test`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@haoyu-zc

Copy link
Copy Markdown
Collaborator Author

Codex review returned two findings, both fixed in cf2f3b7:

  • [P1] conda-lock.yml still resolved Python 3.10/NumPy 1.26 → slimmed environment-gpu.yml to the reproducible build/test/docs stack (dropping research-only minepy/seaborn that blocked the solve) and regenerated the lock from scratch → Python 3.12.13 / NumPy 2.4.6, matching the declared source.
  • [P2] Removed the plots/research extras — the modules they target are excluded from the wheel, so those extras could never work from PyPI; their deps are documented for source-checkout analysis use. Kept test.

(Reminder: the LICENSE alignment to BSD-2-Clause-Patent is flagged in the PR description for your confirmation.)

@haoyu-zc
haoyu-zc merged commit 810970c into refacotring-07-16-2026 Jul 17, 2026
3 checks passed
@haoyu-zc
haoyu-zc deleted the pr-e-docs-deps branch July 17, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant