Harden and tidy the analysis template#10
Merged
Conversation
Review-driven improvements across security, environment/CI, the demo notebook, onboarding, and repo hygiene. Security: - Remove the local .env (held real API keys); add a tracked .env.example with placeholders and document the secrets workflow in the README. Environment & CI: - Isolate the GPU stack (rapids-singlecell + CUDA JAX) in a `gpu` pixi feature/environment; the default environment is now CPU-only, so CI and CPU machines no longer resolve unusable CUDA wheels. - Fix the rapids-singlecell extra (`rapids12` -> `rapids-cu12`), which otherwise installs rapids without GPU libs and silently runs on CPU. - Provide CPU JAX in the default env on both platforms. - Pin pixi-version and use `frozen: true` in both workflows; regenerate pixi.lock. Notebook: - Rename the demo to follow the [INITIALS]-[DATE] convention. - Make CellTypist's expected input scale explicit by rebuilding log1p(1e4) from the raw counts layer instead of trusting adata.X. Onboarding: - Add scripts/rename_package.py (+ `pixi run rename`) to rename the placeholder package/project in one shot; rewrite README Step 3. Source & tests: - _constants.py: marker-based root detection, a DatasetPaths accessor (raw/processed/resources/results) with create(), Path-friendly API. - plotting.py: accept str | Path for `save`, use fig.tight_layout(). - Refresh the example tests to demonstrate the patterns. Docs & hygiene: - Fix the dataset README (add `resources`), the bug-report template leftover, and the inverted PR-template comments. - Drop vestigial .cruft.json references and a stray personal prompt file. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review-driven pass over the template covering security, the GPU/CI story, the demo notebook, onboarding, and repo hygiene. All tests and pre-commit hooks pass;
pixi.lockregenerated; notebooks are output-clean.Changes
rapids-singlecell+ CUDA JAX) now lives in a dedicatedgpupixi feature/environment. The default environment is CPU-only, so CI and CPU-only machines no longer resolve unusable CUDA wheels. CPU JAX is available by default on both platforms. Activate GPU explicitly withpixi install -e gpu(documented in the README).pixi-version: v0.60.0and usefrozen: truein both workflows.scripts/rename_package.py(+pixi run rename) to rename the placeholder package/project in one shot; rewrite README Step 3 with a complete checklist. Add a documented.env.exampleand a secrets section._constants.pygains marker-based root detection and aDatasetPathsaccessor (raw/processed/resources/results) withcreate();plotting.qc_violinacceptsstr | Pathforsaveand usesfig.tight_layout().resources), the bug-report template leftover (tradeseq→session_info2), and the inverted PR-template comments.Bug fixes
rapids-singlecellextrarapids12→rapids-cu12— the old extra doesn't exist on current versions, so rapids installed without GPU libs and silently fell back to CPU.log1p(normalize_total(1e4))from the rawcountslayer instead of trustingadata.X, preventing silently wrong annotations ifXis later scaled/subset.version("myanalysis")is now updated by the rename script (would otherwise raisePackageNotFoundErrorafter renaming).New
scripts/rename_package.py— stdlib-only, runnable beforepixi install.DatasetPathsaccessor andFilePaths.dataset()helper..env.example.Notes for reviewers
.envheld real OpenAI/Gemini/Anthropic keys — these should be rotated in their dashboards (the file is removed, not in git history)..cruft.jsonreferences and a stray personal prompt file (there's no cookiecutter/cruft sync here — the new init script replaces that need).demo_scRNA_workflow.ipynb→ML-2026-01-27_demo_scRNA_workflow.ipynb.Related issues
N/A