From 879b5f6057ffd87935042edaaede7ebddfbc481a Mon Sep 17 00:00:00 2001 From: Aaron Meyer Date: Sun, 4 Oct 2026 11:26:56 -0700 Subject: [PATCH] Remove legacy setup.py; complete pyproject metadata; tidy makefile and CI setup.py duplicated pyproject.toml with stale dependency lists. pyproject now declares readme, license file and URLs. CI workflow renamed to test.yml, uses actions/checkout@v6 and the make targets. --- .github/workflows/pytest.yml | 15 --------------- .github/workflows/test.yml | 18 ++++++++++++++++++ makefile | 9 ++++++--- pyproject.toml | 6 ++++++ setup.py | 12 ------------ 5 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/pytest.yml create mode 100644 .github/workflows/test.yml delete mode 100644 setup.py diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml deleted file mode 100644 index 68122f7..0000000 --- a/.github/workflows/pytest.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Test - -on: [push] - -jobs: - build: - runs-on: self-hosted - steps: - - uses: actions/checkout@v2 - - name: Install uv - uses: astral-sh/setup-uv@v10.0.1 - - name: Install dependencies - run: uv sync - - name: Test with pytest - run: make test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..9dd4bf6 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,18 @@ +name: Test + +on: [push] + +jobs: + test: + runs-on: self-hosted + steps: + - name: Check out repository + uses: actions/checkout@v6 + - name: Install uv + uses: astral-sh/setup-uv@v10.0.1 + - name: Setup environment + run: make .venv + - name: Run tests + run: | + make coverage.xml + uv run coverage report --format=markdown >> $GITHUB_STEP_SUMMARY diff --git a/makefile b/makefile index 5b29cad..1a04fdd 100644 --- a/makefile +++ b/makefile @@ -2,11 +2,14 @@ all: test -test: +test: .venv uv run pytest -s -v -x -coverage.xml: +.venv: + uv sync + +coverage.xml: .venv uv run pytest --junitxml=junit.xml --cov=tensorpack --cov-report xml:coverage.xml clean: - rm -rf coverage.xml + rm -rf coverage.xml junit.xml .coverage diff --git a/pyproject.toml b/pyproject.toml index 52a182a..ee38d04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,9 @@ name = "tensorpack" version = "0.1.2" description = "A collection of tensor methods from the Meyer lab." authors = [{ name = "Cyrillus Tan", email = "cyztan@gmail.com" }] +readme = "README.md" license = "MIT" +license-files = ["LICENSE"] requires-python = ">=3.11,<3.13" dependencies = [ "numpy>=1.21", @@ -16,6 +18,10 @@ dependencies = [ "scikit-learn>=1.1.2", ] +[project.urls] +Homepage = "https://github.com/meyer-lab/tensorpack" +Repository = "https://github.com/meyer-lab/tensorpack" + [dependency-groups] dev = [ "pytest>=7.0", diff --git a/setup.py b/setup.py deleted file mode 100644 index 78668fe..0000000 --- a/setup.py +++ /dev/null @@ -1,12 +0,0 @@ -try: - from setuptools import setup, find_packages -except ImportError: - from distutils.core import setup, find_packages - -setup(name='tensorpack', - version='0.1.2', - description='A collection of tensor methods from the Meyer lab.', - url='https://github.com/meyer-lab/tensorpack', - license='MIT', - packages=find_packages(exclude=['doc']), - install_requires=['numpy', 'tensorly', 'scikit-learn'])