From 8a22cb8ffd86c85c9a696be54539b6de94b453a2 Mon Sep 17 00:00:00 2001 From: afloresep Date: Thu, 30 Apr 2026 12:35:11 +0200 Subject: [PATCH 1/2] bump version to 0.2.1 --- pyproject.toml | 2 +- src/tmap/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 208b39f..7cd3cc8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "scikit_build_core.build" [project] name = "tmap2" -version = "0.2.0" +version = "0.2.1" description = "Tree-based visualization for high-dimensional data" readme = "README.md" license = {text = "MIT"} diff --git a/src/tmap/__init__.py b/src/tmap/__init__.py index f1f7bb1..47821c6 100644 --- a/src/tmap/__init__.py +++ b/src/tmap/__init__.py @@ -50,7 +50,7 @@ def _extend_package_path_for_extensions() -> None: subset_anndata, ) -__version__ = "0.2.0" +__version__ = "0.2.1" __all__ = [ "__version__", From ac68d694da9f79c14e5916b354996b24b53bf4c7 Mon Sep 17 00:00:00 2001 From: afloresep Date: Thu, 30 Apr 2026 12:43:53 +0200 Subject: [PATCH 2/2] fix CI: format chemistry.py and seed flaky weighted minhash test --- src/tmap/utils/chemistry.py | 4 +--- tests/test_minhash.py | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/tmap/utils/chemistry.py b/src/tmap/utils/chemistry.py index 9320aa2..f28cd02 100644 --- a/src/tmap/utils/chemistry.py +++ b/src/tmap/utils/chemistry.py @@ -267,9 +267,7 @@ def _nrings(m): _sum(p_mols, lambda m: m.GetNumHeavyAtoms()) - _sum(r_mols, lambda m: m.GetNumHeavyAtoms()) ), - "delta_rings": ( - _sum(p_mols, _nrings) - _sum(r_mols, _nrings) - ), + "delta_rings": (_sum(p_mols, _nrings) - _sum(r_mols, _nrings)), "delta_aromatic_rings": ( _sum(p_mols, rdMolDescriptors.CalcNumAromaticRings) - _sum(r_mols, rdMolDescriptors.CalcNumAromaticRings) diff --git a/tests/test_minhash.py b/tests/test_minhash.py index 3518fe8..bf3e0c1 100644 --- a/tests/test_minhash.py +++ b/tests/test_minhash.py @@ -562,9 +562,10 @@ def test_count_vector_workflow(self): wmh = WeightedMinHash(dim=100, num_perm=128, seed=42) # Simulate two documents with word counts - doc1 = np.random.uniform(0.1, 10, size=100) + rng = np.random.default_rng(42) + doc1 = rng.uniform(0.1, 10, size=100) doc2 = doc1.copy() - doc2[:10] = np.random.uniform(0.1, 10, size=10) # Modify first 10 words + doc2[:10] = rng.uniform(0.1, 10, size=10) # Modify first 10 words sig1 = wmh.from_weight_array(doc1) sig2 = wmh.from_weight_array(doc2)