diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 0000000..ad92a5e --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,36 @@ +name: testing + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: ['3.9', '3.10', '3.11'] + os: [ubuntu-latest, macOS-latest, windows-latest] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + - name: Install package + run: | + python -m pip install .[tests] + - name: Lint with flake8 + run: | + flake8 examples tests pypermut + - name: Test with pytest + run: | + pytest diff --git a/README.md b/README.md index 3ac6cd3..9635584 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # P*y*ꟼ*ermut* -[![Code PythonVersion](https://img.shields.io/badge/python-3.8+-blue)](https://img.shields.io/badge/python-3.8+-blue) +[![Code PythonVersion](https://img.shields.io/badge/python-3.9+-blue)](https://img.shields.io/badge/python-3.9+-blue) +[![Tests](https://github.com/qbarthelemy/PyPermut/workflows/testing/badge.svg?branch=main&event=push)](https://github.com/qbarthelemy/pypermut/actions) [![License](https://img.shields.io/badge/licence-BSD--3--Clause-green)](https://img.shields.io/badge/license-BSD--3--Clause-green) [![Country](https://img.shields.io/badge/made%20in-France-blue)](https://img.shields.io/badge/made%20in-France-blue) diff --git a/pyproject.toml b/pyproject.toml index ac04a7d..95a9d31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,18 @@ -[tool.poetry] +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" + +[project] name = "pypermut" version = "0.2.2" description = "PyPermut is a Python package implementing permutation tests" -authors = ["Quentin Barthelemy", "Anonymous", "Louis Mayaud"] +authors = [ + { name = "Quentin Barthelemy" }, + { name = "Anonymous" }, + { name = "Louis Mayaud" }, +] license = "BSD-3-Clause" readme = "README.md" -homepage = "https://github.com/qbarthelemy/PyPermut" classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only", @@ -14,19 +21,13 @@ classifiers = [ "Topic :: Statistics", "Topic :: Machine Learning", ] -packages = [ - { include = "pypermut" }, +requires-python = ">=3.9" +dependencies = [ + "numpy >= 1.16.5", + "scipy >= 1.6.0", + "matplotlib >= 3.0.1", ] -[tool.poetry.dependencies] -python = "^3.8" -numpy = "^1.16.5" -scipy = "^1.6.0" -matplotlib = "^3.0.0" - -[tool.poetry.dev-dependencies] -pytest = "^3.0" - -[build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +[project.optional-dependencies] +docs = ["sphinx", "sphinx-gallery", "numpydoc", "scikit-learn"] +tests = ["flake8", "pytest"] diff --git a/setup.py b/setup.py index 3102a9c..db8f99d 100644 --- a/setup.py +++ b/setup.py @@ -8,13 +8,25 @@ 'author': 'Quentin Barthelemy', 'url': 'https://github.com/qbarthelemy/PyPermut', 'packages': ['pypermut'], + 'platforms': 'any', + 'python_requires': '>=3.9,<4.0', 'install_requires': [ 'matplotlib>=3.0.0', 'numpy>=1.16.5', 'scipy>=1.6.0,<1.17.0', - 'setuptools>=52.0.0' ], - 'python_requires': '>=3.7,<4.0', + 'extras_require': { + 'docs': [ + 'sphinx', + 'sphinx-gallery', + 'numpydoc', + 'scikit-learn', + ], + 'tests': [ + 'flake8', + 'pytest', + ], + }, }