From 436b2bbccf3c1d674224bb9a02dfc9fdf8625e8f Mon Sep 17 00:00:00 2001 From: mrava87 Date: Thu, 5 Oct 2023 21:38:29 +0300 Subject: [PATCH 1/2] build: fixed setup to allow correct versioning --- .github/workflows/build.yaml | 6 ++++- pyproject.toml | 50 ++++++++++++++++++++++++++++++++++-- setup.cfg | 50 ------------------------------------ 3 files changed, 53 insertions(+), 53 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6f53f1e..d2f0ed3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,13 +12,17 @@ jobs: runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 + - name: Get history and tags for SCM versioning to work + run: | + git fetch --prune --unshallow + git fetch --depth=1 origin +refs/tags/*:refs/tags/* - 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 + python -m pip install --upgrade pip setuptools pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements-dev.txt; fi - name: Install pyproximal diff --git a/pyproject.toml b/pyproject.toml index 586db74..e7da209 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,49 @@ [build-system] -requires = ["setuptools", "setuptools-scm"] -build-backend = "setuptools.build_meta" \ No newline at end of file +requires = [ + "setuptools >= 65", + "setuptools_scm[toml]", + "wheel", +] +build-backend = "setuptools.build_meta" + +[project] +name = "pyproximal" +description = "Python library implementing proximal operators to solve non-smooth, constrained convex problems with proximal algorithms" +readme = "README.md" +authors = [ + {name = "Matteo Ravasi", email = "matteoravasi@gmail.com"}, +] +license = {file = "LICENSE.md"} +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", +] +dependencies = [ + "numpy >= 1.15.0", + "scipy >= 1.8.0", + "pylops >= 2.0.0", +] +dynamic = ["version"] + +[project.optional-dependencies] +advanced = [ + "llvmlite", + "numba", +] + +[tool.setuptools.packages.find] +exclude = ["pytests"] + +[tool.setuptools_scm] +version_file = "pyproximal/version.py" diff --git a/setup.cfg b/setup.cfg index 33c2c53..efc2cf4 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,53 +1,3 @@ -[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 From 80d249ea0e532ffea61d3b833416582cc6f3fc01 Mon Sep 17 00:00:00 2001 From: mrava87 Date: Thu, 5 Oct 2023 21:49:43 +0300 Subject: [PATCH 2/2] minor: changed versions of runs in GA build --- .github/workflows/build.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d2f0ed3..e093052 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,13 +11,13 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Get history and tags for SCM versioning to work run: | git fetch --prune --unshallow git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -27,6 +27,7 @@ jobs: if [ -f requirements.txt ]; then pip install -r requirements-dev.txt; fi - name: Install pyproximal run: | + python -m setuptools_scm pip install . - name: Test with pytest run: |