diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 128375b..6f53f1e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,12 +4,12 @@ on: [push, pull_request] jobs: build: - - runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8] + platform: [ ubuntu-latest, macos-latest ] + python-version: ["3.8", "3.9", "3.10"] + runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/.readthedocs.yaml b/.readthedocs.yaml index bcd7bc1..2bd1400 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -21,5 +21,5 @@ sphinx: python: install: - requirements: requirements-dev.txt - - method: setuptools + - method: pip path: . \ No newline at end of file diff --git a/Makefile b/Makefile index f1b6e83..644e6bb 100755 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ dev-install_conda: tests: make pythoncheck - $(PYTHON) setup.py test + pytest doc: cd docs && rm -rf source/api/generated && rm -rf source/gallery &&\ diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 33cacc7..5e7d229 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -64,7 +64,7 @@ jobs: displayName: 'Install prerequisites and library' - script: | - python setup.py test + pytest condition: succeededOrFailed() displayName: 'Run tests' @@ -93,7 +93,7 @@ jobs: displayName: 'Install prerequisites and library' - script: | - python setup.py test + pytest condition: succeededOrFailed() displayName: 'Run tests' diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..586db74 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools", "setuptools-scm"] +build-backend = "setuptools.build_meta" \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 6811fdc..33c2c53 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,56 @@ +[metadata] +name = pyproximal +fullname = PyProximal +description = Python library implementing proximal operators to solve non-smooth, constrained convex problems with proximal algorithms +long_description = file: README.md +long_description_content_type = text/markdown +author = The PyLops Development Team +author_email = matteoravasi@gmail.com +maintainer = "Matteo Ravasi" +maintainer_email = matteoravasi@gmail.com +license = LGPL-3.0 License +license_file = LICENSE.md +platform = any +keywords = algebra, inverse problems, proximal, convex optimization, large-scale optimization +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + Intended Audience :: Science/Research + Intended Audience :: Education + License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3), + Natural Language :: English + Operating System :: OS Independent + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Topic :: Scientific/Engineering : Mathematics +url = https://github.com/pylops/pyproximal + +project_urls = + Documentation = https://pyproximal.readthedocs.io/ + Release Notes = https://github.com/pylops/pyproximal/releases + Bug Tracker = https://github.com/pylops/pyproximal/issues + Source Code = https://github.com/pylops/pyproximal + +[options] +zip_safe = True +include_package_data = True +packages = find: +python_requires = >=3.8 +install_requires = + numpy >= 1.15.0 + scipy >= 1.8.0 + pylops >= 2.0.0 + +[options.extras_require] +advanced = + llvmlite + numba + [aliases] test=pytest [tool:pytest] addopts = --verbose -python_files = pytests/*.py \ No newline at end of file +python_files = pytests/*.py diff --git a/setup.py b/setup.py deleted file mode 100644 index d3d6375..0000000 --- a/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -import os -from setuptools import setup, find_packages - -def src(pth): - return os.path.join(os.path.dirname(__file__), pth) - -# Project description -descr = 'Python library implementing proximal operators to allow solving ' \ - 'non-smooth, constrained convex problems with proximal algorithms.' - -# Setup -setup( - name='pyproximal', - description=descr, - long_description=open(src('README.md')).read(), - long_description_content_type='text/markdown', - keywords=['algebra', - 'inverse problems', - 'proximal', - 'convex optimization', - 'large-scale optimization'], - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)', - 'Natural Language :: English', - 'Programming Language :: Python :: 3.8', - 'Topic :: Scientific/Engineering :: Mathematics' - ], - author='mrava', - author_email='matteoravasi@gmail.com', - install_requires=['numpy >= 1.15.0', 'scipy >= 1.8.0', 'pylops >= 2.0.0'], - extras_require={'advanced': ['llvmlite', 'numba']}, - packages=find_packages(exclude=['pytests']), - use_scm_version=dict(root='.', - relative_to=__file__, - write_to=src('pyproximal/version.py')), - setup_requires=['pytest-runner', 'setuptools_scm'], - test_suite='pytests', - tests_require=['pytest'], - zip_safe=True) \ No newline at end of file