From 4a564b0b69b4a8e98d1daa8073d2bcb2f313d1cd Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Mon, 13 Feb 2023 17:24:24 +0300 Subject: [PATCH 1/4] Add the links to the GitHub repo into package metadata. --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index 78b0b72..9492075 100755 --- a/setup.py +++ b/setup.py @@ -9,6 +9,10 @@ packages = ['optunity', 'optunity.tests', 'optunity.solvers'], scripts = [], url = 'http://www.optunity.net', + project_urls = { + "Source Code": "https://github.com/claesenm/optunity", + "Bug Tracker": "https://github.com/claesenm/optunity/issues", + }, license = 'LICENSE.txt', description = 'Optimization routines for hyperparameter tuning.', long_description = open('README.rst').read(), From df894b5a81bf0d1e5808ac53fbc9eda9a5b8ad4b Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Mon, 13 Feb 2023 17:31:33 +0300 Subject: [PATCH 2/4] Move the metadata into `setup.cfg`. Add `pyproject.toml` according to `PEP 517`. --- pyproject.toml | 3 +++ setup.cfg | 45 +++++++++++++++++++++++++++++++++++++++++++++ setup.py | 41 +++-------------------------------------- 3 files changed, 51 insertions(+), 38 deletions(-) create mode 100644 pyproject.toml create mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b464d1d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=42.2"] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..3762275 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,45 @@ +[metadata] +name = Optunity +version = 1.1.1 +author = Marc Claesen +author_email = marc.claesen@esat.kuleuven.be +license = LICENSE.txt +description = Optimization routines for hyperparameter tuning. +keywords = + machine learning + parameter tuning + hyperparameter optimization + meta-optimization + direct search + model selection + particle swarm optimization +url = http://www.optunity.net +long_description = file: README.rst +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + Intended Audience :: Education + Intended Audience :: Science/Research + Programming Language :: Python + License :: OSI Approved :: BSD License + Topic :: Scientific/Engineering + Topic :: Scientific/Engineering :: Artificial Intelligence + Topic :: Scientific/Engineering :: Information Analysis + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.2 + Programming Language :: Python :: 3.3 + Programming Language :: Python :: 3.4 +platforms = any +project_urls = + Source Code = https://github.com/claesenm/optunity + Bug Tracker = https://github.com/claesenm/optunity/issues + +[options] +packages = + optunity + optunity.tests + optunity.solvers + +[bdist_wheel] +universal = 1 diff --git a/setup.py b/setup.py index 9492075..7f1a176 100755 --- a/setup.py +++ b/setup.py @@ -1,39 +1,4 @@ -from distutils.core import setup -import setuptools +from setuptools import setup -setup( - name = 'Optunity', - version = '1.1.1', - author = 'Marc Claesen', - author_email = 'marc.claesen@esat.kuleuven.be', - packages = ['optunity', 'optunity.tests', 'optunity.solvers'], - scripts = [], - url = 'http://www.optunity.net', - project_urls = { - "Source Code": "https://github.com/claesenm/optunity", - "Bug Tracker": "https://github.com/claesenm/optunity/issues", - }, - license = 'LICENSE.txt', - description = 'Optimization routines for hyperparameter tuning.', - long_description = open('README.rst').read(), - classifiers = ['Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'Intended Audience :: Education', - 'Intended Audience :: Science/Research', - 'Programming Language :: Python', - 'License :: OSI Approved :: BSD License', - 'Topic :: Scientific/Engineering', - 'Topic :: Scientific/Engineering :: Artificial Intelligence', - 'Topic :: Scientific/Engineering :: Information Analysis', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.2', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4' - ], - platforms = ['any'], - keywords = ['machine learning', 'parameter tuning', - 'hyperparameter optimization', 'meta-optimization', - 'direct search', 'model selection', 'particle swarm optimization' - ], -) +if __name__ == "__main__": + setup() From 17480aa85fb2bc3dd19c984aa59522365b832aa5 Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Mon, 13 Feb 2023 17:36:49 +0300 Subject: [PATCH 3/4] A little modernization of the makefile. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 6064a7d..88b0d44 100644 --- a/Makefile +++ b/Makefile @@ -23,10 +23,10 @@ sphinx-notebooks: cp -r notebooks/*_files docs/notebooks/notebooks/ wheel: - python setup.py bdist_wheel --universal + python -m build -w sdist: - python setup.py sdist + python -m build -s -upload: - python setup.py sdist bdist_wheel upload +upload: wheel sdist + twine upload ./dist/* From 74fcffd417f5050b2bfd43bbf5539c2164ead289 Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Mon, 13 Feb 2023 17:38:09 +0300 Subject: [PATCH 4/4] Migrate the metadata into `PEP 621`-compliant `pyproject.toml`. --- pyproject.toml | 52 +++++++++++++++++++++++++++++++++++++++++++++++++- setup.cfg | 45 ------------------------------------------- 2 files changed, 51 insertions(+), 46 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index b464d1d..238d19a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,53 @@ [build-system] -requires = ["setuptools>=42.2"] +requires = ["setuptools>=61.2"] build-backend = "setuptools.build_meta" + +[project] +name = "Optunity" +version = "1.1.1" +authors = [{name = "Marc Claesen", email = "marc.claesen@esat.kuleuven.be"}] +license = {text = "LICENSE.txt"} +description = "Optimization routines for hyperparameter tuning." +keywords = [ + "machine learning", + "parameter tuning", + "hyperparameter optimization", + "meta-optimization", + "direct search", + "model selection", + "particle swarm optimization", +] +readme = "README.rst" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "License :: OSI Approved :: BSD License", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Scientific/Engineering :: Information Analysis", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.2", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", +] + +[project.urls] +Homepage = "http://www.optunity.net" +"Source Code" = "https://github.com/claesenm/optunity" +"Bug Tracker" = "https://github.com/claesenm/optunity/issues" + +[tool.setuptools] +packages = [ + "optunity", + "optunity.tests", + "optunity.solvers", +] +platforms = ["any"] +include-package-data = false + +[tool.distutils.bdist_wheel] +universal = 1 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 3762275..0000000 --- a/setup.cfg +++ /dev/null @@ -1,45 +0,0 @@ -[metadata] -name = Optunity -version = 1.1.1 -author = Marc Claesen -author_email = marc.claesen@esat.kuleuven.be -license = LICENSE.txt -description = Optimization routines for hyperparameter tuning. -keywords = - machine learning - parameter tuning - hyperparameter optimization - meta-optimization - direct search - model selection - particle swarm optimization -url = http://www.optunity.net -long_description = file: README.rst -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - Intended Audience :: Education - Intended Audience :: Science/Research - Programming Language :: Python - License :: OSI Approved :: BSD License - Topic :: Scientific/Engineering - Topic :: Scientific/Engineering :: Artificial Intelligence - Topic :: Scientific/Engineering :: Information Analysis - Programming Language :: Python :: 2.7 - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.2 - Programming Language :: Python :: 3.3 - Programming Language :: Python :: 3.4 -platforms = any -project_urls = - Source Code = https://github.com/claesenm/optunity - Bug Tracker = https://github.com/claesenm/optunity/issues - -[options] -packages = - optunity - optunity.tests - optunity.solvers - -[bdist_wheel] -universal = 1