diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml deleted file mode 100644 index e005b21..0000000 --- a/.github/workflows/pytest.yml +++ /dev/null @@ -1,19 +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: Run ty check - run: make ty - - name: Run vulture - run: make vulture - - 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..015c0a3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,22 @@ +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 ty check + run: make ty + - name: Run vulture + run: make vulture + - name: Run tests + run: | + make coverage.xml + uv run coverage report --format=markdown >> $GITHUB_STEP_SUMMARY diff --git a/makefile b/makefile index 77bc7ca..e5b582e 100644 --- a/makefile +++ b/makefile @@ -2,17 +2,20 @@ all: test -test: +test: .venv uv run pytest -s -v -x -ty: +.venv: + uv sync + +ty: .venv uv run ty check -coverage.xml: +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 -vulture: +vulture: .venv uv run vulture diff --git a/pyproject.toml b/pyproject.toml index c1773b6..af7bc8d 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", @@ -15,6 +17,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'])