diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml new file mode 100644 index 0000000..67c2c89 --- /dev/null +++ b/.github/workflows/pypi.yaml @@ -0,0 +1,27 @@ +name: PyPI +on: + push: + tags: + - v* +jobs: + build-and-publish: + name: Build and publish Python package + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/points2regions + permissions: + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install pypa/build + run: python3 -m pip install --user build + - name: Build wheel & tarball + run: python3 -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/README.md b/README.md index 163ef97..e5fa429 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Points2Regions is a Python tool designed for clustering and defining regions bas You can install Points2Regions using the following command: ```bash -pip install git+https://github.com/wahlby-lab/Points2Regions +pip install points2regions ``` diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9bf6df9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,5 @@ +[build-system] +requires = ["setuptools>=64", "setuptools_scm>=8"] +build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..5f728b8 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,36 @@ +[metadata] +name = points2regions +author = Axel Andersson +author_email = axel.andersson@it.uu.se +description = A simple and efficient clustering tool for spatial 2D points with categorical labels. +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/wahlby-lab/Points2Regions +license = MIT +license_files = LICENSE +classifiers = + Intended Audience :: Science/Research + License :: OSI Approved :: MIT License + Operating System :: OS Independent + Programming Language :: Python :: 3 + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 + Topic :: Scientific/Engineering :: Bio-Informatics + Topic :: Scientific/Engineering :: Image Processing + +[options] +packages = find: +python_requires = >=3.8 +install_requires = + numpy + pandas + scikit-image + scikit-learn + scipy + +[options.packages.find] +include = tissuumaps diff --git a/setup.py b/setup.py deleted file mode 100644 index 93175b2..0000000 --- a/setup.py +++ /dev/null @@ -1,28 +0,0 @@ -from setuptools import setup, find_packages - -setup( - name='Points2Regions', - version='0.1.0', - packages=find_packages(exclude=["tests*", "example*", "tissuumaps"]), - description='A simple and efficient clustering tool for spatial 2D points with categorical labels.', - long_description=open('README.md').read(), - long_description_content_type='text/markdown', - author='Axel Andersson', - author_email='axel.andersson@it.uu.se', - url='https://github.com/wahlby-lab/Points2Regions', - install_requires=[ - 'numpy', - 'scipy', - 'pandas', - 'scikit-learn', - 'scikit-image' - ], - classifiers=[ - # Classifiers help users find your project, - # see: https://pypi.org/classifiers/ - 'Programming Language :: Python :: 3', - 'License :: OSI Approved :: MIT License', - 'Operating System :: OS Independent', - ], - python_requires='>=3.8', -)