Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"

Expand All @@ -27,7 +27,7 @@ jobs:
pip install build
python -m build --sdist

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v5
with:
name: sdist
path: dist/*.tar.gz
Expand All @@ -38,29 +38,30 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, macos-14]
os: [ubuntu-latest, macos-14]
# ubuntu-latest = Linux x86_64
# macos-13 = macOS x86_64 (Intel)
# macos-14 = macOS arm64 (Apple Silicon)

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive

- name: Build wheels
uses: pypa/cibuildwheel@v2.21
env:
# Build for Python 3.10 - 3.13
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-*"
# Build for Python 3.11 - 3.13
CIBW_BUILD: "cp311-* cp312-* cp313-*"

# Skip 32-bit and musl (Alpine) builds
CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux*"

# Linux: install build tools inside the manylinux container
# Use manylinux_2_28 (usearch only ships wheels for this platform)
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28"

# Linux: install build tools inside the container
CIBW_BEFORE_ALL_LINUX: >
yum install -y cmake3 gcc-c++ make &&
ln -sf /usr/bin/cmake3 /usr/bin/cmake || true
dnf install -y cmake gcc-c++ make openblas-devel || true

# macOS: cmake is pre-installed on GitHub runners
CIBW_BEFORE_ALL_MACOS: >
Expand All @@ -74,7 +75,7 @@ jobs:
CIBW_ARCHS_MACOS: "native"
CIBW_ARCHS_LINUX: "x86_64"

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v5
with:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl
Expand All @@ -88,7 +89,7 @@ jobs:
id-token: write # trusted publishing (no API token needed)

steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
with:
path: dist
merge-multiple: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.12"]
python-version: ["3.11", "3.12"]
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand All @@ -42,15 +42,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.12"]
python-version: ["3.11", "3.12"]
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Tests](https://github.com/afloresep/TMAP/actions/workflows/tests.yml/badge.svg)](https://github.com/afloresep/TMAP/actions/workflows/tests.yml)
[![PyPI](https://img.shields.io/pypi/v/tmap2)](https://pypi.org/project/tmap2/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)

# TMAP2

Expand Down
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version = "0.1.0"
description = "Tree-based visualization for high-dimensional data"
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.10"
requires-python = ">=3.11"
authors = [
{ name = "Alejandro Flores", email = "afloresep01@gmail.com" }
]
Expand All @@ -20,7 +20,6 @@ classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
Expand All @@ -36,7 +35,6 @@ dependencies = [
"matplotlib>=3.7",
"pandas>=2.2",
"usearch>=2.16,<3",
"typing_extensions>=4.0; python_version < '3.11'",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -75,7 +73,7 @@ sdist.exclude = [

[tool.ruff]
line-length = 100
target-version = "py310"
target-version = "py311"
exclude = ["extern/", "*.ipynb"]

[tool.ruff.lint]
Expand Down
8 changes: 1 addition & 7 deletions src/tmap/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@

import math
import pickle
import sys
import warnings
from pathlib import Path
from typing import TYPE_CHECKING, Any

if sys.version_info >= (3, 11):
from typing import Self
else:
from typing_extensions import Self
from typing import TYPE_CHECKING, Any, Self

import numpy as np
from numpy.typing import NDArray
Expand Down