From 439e3b60af860d5d68b4969f32e094a65fe696a5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Oct 2026 16:36:15 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.16.2 → v0.16.10](https://github.com/astral-sh/ruff-pre-commit/compare/v0.16.2...v0.16.10) - [github.com/PyCQA/bandit: 1.7.9 → 1.9.4](https://github.com/PyCQA/bandit/compare/1.7.9...1.9.4) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index af3eb03..93daa98 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.16.2 + rev: v0.16.10 hooks: # Run the linter. - id: ruff-check @@ -55,7 +55,7 @@ repos: # - id: codespell - repo: https://github.com/PyCQA/bandit - rev: 1.7.9 + rev: 1.9.4 hooks: - id: bandit args: ["-c", "pyproject.toml"] From 9b028648ea629e43b455efb6c1636299248e20cf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Oct 2026 16:38:16 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.md | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index ffc3143..81a7582 100644 --- a/README.md +++ b/README.md @@ -51,36 +51,38 @@ ncols = 500 # Number of spots/cells counts = np.random.rand(nrows, ncols) # Create feature annotations -row_data = BiocFrame({ - "gene_ids": [f"gene_{i}" for i in range(nrows)], - "gene_names": [f"Gene_{i}" for i in range(nrows)] -}) +row_data = BiocFrame( + {"gene_ids": [f"gene_{i}" for i in range(nrows)], "gene_names": [f"Gene_{i}" for i in range(nrows)]} +) # Create spot/cell annotations -col_data = BiocFrame({ - "n_genes": [50, 200] * int(ncols / 2), - "condition": ["healthy", "tumor"] * int(ncols / 2), - "cell_id": [f"spot_{i}" for i in range(ncols)], - "sample_id": ["sample_1"] * int(ncols / 2) + ["sample_2"] * int(ncols / 2), -}) +col_data = BiocFrame( + { + "n_genes": [50, 200] * int(ncols / 2), + "condition": ["healthy", "tumor"] * int(ncols / 2), + "cell_id": [f"spot_{i}" for i in range(ncols)], + "sample_id": ["sample_1"] * int(ncols / 2) + ["sample_2"] * int(ncols / 2), + } +) # Generate spatial coordinates -spatial_coords = BiocFrame({ - "x": np.random.uniform(low=0.0, high=100.0, size=ncols), - "y": np.random.uniform(low=0.0, high=100.0, size=ncols) -}) +spatial_coords = BiocFrame( + {"x": np.random.uniform(low=0.0, high=100.0, size=ncols), "y": np.random.uniform(low=0.0, high=100.0, size=ncols)} +) # Create image data -img_data = BiocFrame({ - "sample_id": ["sample_1", "sample_1", "sample_2"], - "image_id": ["aurora", "dice", "desert"], - "data": [ - construct_spatial_image_class("tests/images/sample_image1.jpg"), - construct_spatial_image_class("tests/images/sample_image2.png"), - construct_spatial_image_class("tests/images/sample_image3.jpg"), - ], - "scale_factor": [1, 1, 1], -}) +img_data = BiocFrame( + { + "sample_id": ["sample_1", "sample_1", "sample_2"], + "image_id": ["aurora", "dice", "desert"], + "data": [ + construct_spatial_image_class("tests/images/sample_image1.jpg"), + construct_spatial_image_class("tests/images/sample_image2.png"), + construct_spatial_image_class("tests/images/sample_image3.jpg"), + ], + "scale_factor": [1, 1, 1], + } +) # Create SpatialExperiment object spe = SpatialExperiment(