Skip to content

chore: linting, src layout, and sphinx docs#1

Draft
HugoHakem wants to merge 12 commits into
Virtual-Cell-Research-Community:mainfrom
HugoHakem:main
Draft

chore: linting, src layout, and sphinx docs#1
HugoHakem wants to merge 12 commits into
Virtual-Cell-Research-Community:mainfrom
HugoHakem:main

Conversation

@HugoHakem

Copy link
Copy Markdown

Summary

  • Migrated package to standard src/ layout
  • Added linting stack (ruff, mypy, pyright) with config in pyproject.toml;
    applied auto-fix and auto-format passes
  • Fixed requires-python to >=3.11 (illico requires 3.11+)
  • Added Sphinx documentation setup inspired by scverse: ReadTheDocs config,
    docs/conf.py, API reference, contributing guide, changelog
  • Added test dependency-group with pytest in pyproject.toml

Status / still in progress

  • README — trimming it down; the bulk of the content (building blocks,
    protocols, scoring) will move into the Sphinx docs instead
  • Notebooks — usage examples to add: CLI walkthrough, Python package API,
    and extending the tool (new protocols, spaces, sources); loosely inspired by
    the figure notebooks in scPertEval-figures but scoped to onboarding
  • CI/CD — GitHub Actions workflows + pre-commit hooks still to set up
    (ruff, mypy/pyright, pyproject-fmt)
  • ReadTheDocs — account and project hookup pending

Test plan

  • pip install -e . works from the new src/ layout
  • ruff check and mypy pass clean
  • Sphinx build succeeds (sphinx-autobuild docs docs/_build)

HugoHakem and others added 12 commits June 15, 2026 09:45
- auto fix using vscode markdown lint operation.
- vscode settings.json (gitignored):
"MD033": {
    "allowed_elements": ["details", "summary", "code"]
},
"MD060": false,
"MD032": false,
- missing \ in the table (broken table):
<<
per-gene `|score|` ranking (for a prediction) |
>>
per-gene `\|score\|` ranking (for a prediction) |
mypy / pyright were firing on small stuff, where the logic
present was already preventing any issue.
Add small type annotation & type ignore.
additionally applied RUF005: replace with iterable unpacking
<<
key = (seed,) + tuple(zlib.crc32(str(t).encode()) for t in tags)
>>
key = (seed, *(zlib.crc32(str(t).encode()) for t in tags))
- README.md: use t-test_overestim_var in help text, restore ```txt fence
- pyproject.toml: keep local ruff/mypy/pyright config; add test dependency-group (pytest) replacing project.optional-dependencies
- README trimmed to install + quick start + sample datasets pointer;
  full content moved to sphinx docs
- user-guide/ folder with usage, scoring, protocols, building-blocks
- installation.md with dev setup (moved from contributing)
- tutorials.md placeholder
- index.md: citation block, grid cards, toctree reorganization
- references.bib: add Miller 2025 and Vollenweider 2026 entries
- conf.py: show_navbar_depth for stable sidebar
Rename scoring.md → calibration.md and move it first in the user guide
toctree, so readers encounter the conceptual framing (what a protocol is,
what DRF and BDS measure) before the CLI usage page. Expand the page with
proper math formalism: introduces s_bench notation, the two empirical
controls, and the DRF/BDS formulas with inline interpretation. Add a
single orienting sentence to user-guide/index.md. Update the cross-link
in docs/index.md. Also include a pre-existing conf.py fix
(bibtex_reference_style).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add Attributes sections to all five dataclasses (RunConfig, Protocol,
  Calibrator, DEResult, Param) so Sphinx tables are populated
- Add full Parameters/Returns to run_protocol, moments, bh, ttest_from_moments,
  top_space, pca_space, degs_space, register_de_space
- Add {cite} Vollenweider_2026 to bh
- Add attribute docstrings with usage examples to DE_METHODS and SPACES
- Add docstring example to Registry class; one-liners for __getitem__/meta/names
- Document Context class (Parameters + Attributes) as light public API
- Fix weighted_mse ctx description: uses ctx.wmse_weights, was marked unused
- Add de_ttest, de_ttest_overestim, de_mwu to api.md autosummary
- Add Context section to api.md
- Add protocol_table.py Sphinx extension
- Simplify class.rst template: drop attribute/method summary tables and the
  redundant Attributes block; keep only inline Methods section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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