From 80929aac76202b256f1a5a7aab7d83a8628c3d5c Mon Sep 17 00:00:00 2001 From: Oleksandr Shchur Date: Fri, 7 Aug 2026 12:06:32 +0000 Subject: [PATCH 1/3] Migrate package metadata to [project] and enable uv project Adds [build-system] + [project] to pyproject.toml so uv recognizes a project (uv sync / uv lock now work). Static metadata (description, readme, license, classifiers, urls, entry point, requires-python) moves into [project]; version, dependencies, and optional-dependencies stay dynamic in setup.py so the RELEASE=1 -> clean version, else .dev0 logic is preserved. setup.py is trimmed to just the dynamic bits + version-file generation and package discovery. uv.lock is gitignored (library, not app). Matches the main autogluon repo's packaging: setuptools.build_meta backend, setuptools>=77 (needed for the PEP 639 SPDX license expression), and the description matches the GitHub repo tagline. --- .gitignore | 3 +++ pyproject.toml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 49 ------------------------------------------------- 3 files changed, 51 insertions(+), 49 deletions(-) diff --git a/.gitignore b/.gitignore index 0d577ce..0153f2a 100644 --- a/.gitignore +++ b/.gitignore @@ -101,6 +101,9 @@ celerybeat.pid # SageMath parsed files *.sage.py +# uv (library, not app — devs regenerate the lockfile locally) +uv.lock + # Environments .env .venv diff --git a/pyproject.toml b/pyproject.toml index 94cb964..a8a4061 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,51 @@ +[build-system] +requires = ["setuptools>=77", "wheel"] # >=77 for PEP 639 SPDX license expression support +build-backend = "setuptools.build_meta" + +[project] +name = "autogluon.cloud" +description = "Train and deploy ML models in the cloud" +readme = "README.md" +requires-python = ">=3.10,<3.14" +license = "Apache-2.0" +license-files = ["LICENSE", "NOTICE"] +authors = [{ name = "AutoGluon Community" }] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Education", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "Intended Audience :: Customer Service", + "Intended Audience :: Financial and Insurance Industry", + "Intended Audience :: Healthcare Industry", + "Intended Audience :: Telecommunications Industry", + "Operating System :: MacOS", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Operating System :: Unix", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Software Development", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Scientific/Engineering :: Information Analysis", + "Topic :: Scientific/Engineering :: Image Recognition", +] +# version / dependencies / optional-dependencies stay dynamic and are owned by setup.py +# (so the RELEASE=1 -> clean version, else .dev0 logic keeps working). +dynamic = ["version", "dependencies", "optional-dependencies"] + +[project.urls] +Documentation = "https://auto.gluon.ai/cloud" +"Bug Reports" = "https://github.com/autogluon/autogluon-cloud/issues" +Source = "https://github.com/autogluon/autogluon-cloud/" +"Contribute!" = "https://github.com/autogluon/autogluon-cloud/blob/master/CONTRIBUTING.md" + +[project.scripts] +autogluon-cloud = "autogluon.cloud.cli:main" + [tool.ruff] line-length = 119 target-version = "py310" diff --git a/setup.py b/setup.py index 5a93d6c..c545b45 100644 --- a/setup.py +++ b/setup.py @@ -5,8 +5,6 @@ AUTOGLUON = "autogluon" CLOUD = "cloud" -PYTHON_REQUIRES = ">=3.10, <3.14" - def create_version_file(*, version): print("-- Building version " + version) @@ -29,24 +27,12 @@ def update_version(version): def default_setup_args(*, version): from setuptools import find_namespace_packages - long_description = open("README.md").read() - name = f"{AUTOGLUON}.{CLOUD}" setup_args = dict( - name=name, version=version, - author="AutoGluon Community", - url="https://github.com/autogluon/autogluon-cloud", - description="Train and deploy AutoGluon backed models on the cloud", - long_description=long_description, - long_description_content_type="text/markdown", - license="Apache-2.0", - license_files=("LICENSE", "NOTICE"), - # Package info packages=find_namespace_packages("src"), package_dir={"": "src"}, zip_safe=True, include_package_data=True, - python_requires=PYTHON_REQUIRES, package_data={ "autogluon.cloud": [ "default_cluster_configs/*.yaml", @@ -54,36 +40,6 @@ def default_setup_args(*, version): "templates/*.yaml", ], }, - classifiers=[ - "Development Status :: 4 - Beta", - "Intended Audience :: Education", - "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "Intended Audience :: Customer Service", - "Intended Audience :: Financial and Insurance Industry", - "Intended Audience :: Healthcare Industry", - "Intended Audience :: Telecommunications Industry", - "License :: OSI Approved :: Apache Software License", - "Operating System :: MacOS", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "Operating System :: Unix", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Topic :: Software Development", - "Topic :: Scientific/Engineering :: Artificial Intelligence", - "Topic :: Scientific/Engineering :: Information Analysis", - "Topic :: Scientific/Engineering :: Image Recognition", - ], - project_urls={ - "Documentation": "https://auto.gluon.ai", - "Bug Reports": "https://github.com/autogluon/autogluon-cloud/issues", - "Source": "https://github.com/autogluon/autogluon-cloud/", - "Contribute!": "https://github.com/autogluon/autogluon-cloud/blob/master/CONTRIBUTING.md", - }, ) return setup_args @@ -129,10 +85,5 @@ def default_setup_args(*, version): setup( install_requires=install_requires, extras_require=extras_require, - entry_points={ - "console_scripts": [ - "autogluon-cloud=autogluon.cloud.cli:main", - ], - }, **setup_args, ) From 09f80188dec997c617fcfc27f5c7dd26e6d7b737 Mon Sep 17 00:00:00 2001 From: Oleksandr Shchur Date: Fri, 7 Aug 2026 12:38:07 +0000 Subject: [PATCH 2/3] Move dependencies and build config to pyproject; slim setup.py to version stamping --- pyproject.toml | 49 ++++++++++++++++++++++++++++++++++++--- setup.py | 63 +++----------------------------------------------- 2 files changed, 49 insertions(+), 63 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a8a4061..e9af281 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,9 +33,37 @@ classifiers = [ "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Scientific/Engineering :: Image Recognition", ] -# version / dependencies / optional-dependencies stay dynamic and are owned by setup.py -# (so the RELEASE=1 -> clean version, else .dev0 logic keeps working). -dynamic = ["version", "dependencies", "optional-dependencies"] +# version stays dynamic and is owned by setup.py (so the RELEASE=1 -> clean +# version, else .dev0 logic keeps working). +dynamic = ["version"] +dependencies = [ + # common module provides utils with stable api across minor version + "autogluon.common>=0.7,<1.6", + # <2 because unlikely to introduce breaking changes in minor releases. >=1.10 because 1.10 is 3 years old, no need to support older + "boto3>=1.10,<2", + "packaging>=23.0,<27", + "sagemaker>=2.126.0,<3", + "pyarrow>=19.0.1,<25", # lower bound to avoid https://github.com/apache/arrow/issues/45283 + "PyYAML~=6.0", + "Pillow>=10.2,<13", + "huggingface_hub>=0.20,<2", + "typing_extensions>=4.0,<5", + # CLI dependencies (autogluon-cloud command) + "click>=8.0,<9", + "rich>=13.0,<15", +] + +[project.optional-dependencies] +ray = ["ray[default]>=2.10.0,<2.56"] +all = [ # To allow user to pass ag objects + "autogluon>=0.7,<1.6", + "autogluon.cloud[ray]", +] +tests = [ + "pytest", + "moto", + "autogluon.common>=0.7", +] [project.urls] Documentation = "https://auto.gluon.ai/cloud" @@ -46,6 +74,21 @@ Source = "https://github.com/autogluon/autogluon-cloud/" [project.scripts] autogluon-cloud = "autogluon.cloud.cli:main" +[tool.setuptools] +zip-safe = true +include-package-data = true + +[tool.setuptools.packages.find] +where = ["src"] +namespaces = true + +[tool.setuptools.package-data] +"autogluon.cloud" = [ + "default_cluster_configs/*.yaml", + "utils/autogluon_dlc.json", + "templates/*.yaml", +] + [tool.ruff] line-length = 119 target-version = "py310" diff --git a/setup.py b/setup.py index c545b45..ff39a24 100644 --- a/setup.py +++ b/setup.py @@ -24,66 +24,9 @@ def update_version(version): return version -def default_setup_args(*, version): - from setuptools import find_namespace_packages - - setup_args = dict( - version=version, - packages=find_namespace_packages("src"), - package_dir={"": "src"}, - zip_safe=True, - include_package_data=True, - package_data={ - "autogluon.cloud": [ - "default_cluster_configs/*.yaml", - "utils/autogluon_dlc.json", - "templates/*.yaml", - ], - }, - ) - return setup_args - - -version = "0.5.1" -version = update_version(version) - -install_requires = [ - # common module provides utils with stable api across minor version - "autogluon.common>=0.7,<1.6", - # <2 because unlikely to introduce breaking changes in minor releases. >=1.10 because 1.10 is 3 years old, no need to support older - "boto3>=1.10,<2", - "packaging>=23.0,<27", - "sagemaker>=2.126.0,<3", - "pyarrow>=19.0.1,<25", # lower bound to avoid https://github.com/apache/arrow/issues/45283 - "PyYAML~=6.0", - "Pillow>=10.2,<13", - "huggingface_hub>=0.20,<2", - "typing_extensions>=4.0,<5", - # CLI dependencies (autogluon-cloud command) - "click>=8.0,<9", - "rich>=13.0,<15", -] - -extras_require = dict() - -ray_requires = ["ray[default]>=2.10.0,<2.56"] -extras_require["ray"] = ray_requires - -all_requires = ["autogluon>=0.7,<1.6"] + ray_requires # To allow user to pass ag objects -extras_require["all"] = all_requires - -test_requirements = [ - "pytest", - "moto", - "autogluon.common>=0.7", -] -extras_require["tests"] = test_requirements +version = update_version("0.5.1") if __name__ == "__main__": create_version_file(version=version) - setup_args = default_setup_args(version=version) - setup( - install_requires=install_requires, - extras_require=extras_require, - **setup_args, - ) + # Everything except the dynamic version lives in pyproject.toml. + setup(version=version) From e347dc781f35802611b927d2b03d6e77dc264792 Mon Sep 17 00:00:00 2001 From: Oleksandr Shchur Date: Fri, 7 Aug 2026 12:42:56 +0000 Subject: [PATCH 3/3] Redirect dependency-range check to pyproject.toml in release docs --- docs/ReleaseInstructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ReleaseInstructions.md b/docs/ReleaseInstructions.md index 14be7b1..97172bc 100644 --- a/docs/ReleaseInstructions.md +++ b/docs/ReleaseInstructions.md @@ -4,7 +4,7 @@ * Ensure `master` is stable: CI is green, no in-flight critical PRs. * Confirm `setup.py` has the intended release version (e.g. `version = "0.5.0"`). -* Sanity-check dependency version ranges in `setup.py`: +* Sanity-check dependency version ranges in `pyproject.toml`: * No major-version caps without an inline comment justifying it. * Every dependency has both a lower bound and an upper cap (using `<`, not `<=`). * Caps are at the minor level (`