From e8fbd06e98c22d91f2b453f4b475fe9c4a93958a Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Tue, 21 Mar 2023 16:35:26 -0400 Subject: [PATCH] Generate pyproject.toml dependencies using dfg (#1219) This PR updates dependencies.yaml to also generates the relevant dependency sections of pyproject.toml. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Bradley Dice (https://github.com/bdice) URL: https://github.com/rapidsai/rmm/pull/1219 --- .pre-commit-config.yaml | 2 +- dependencies.yaml | 34 +++++++++++++++++++++++++++++----- python/pyproject.toml | 22 +++++++++++----------- 3 files changed, 41 insertions(+), 17 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bcbf17018..b230cafb7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: - id: trailing-whitespace - id: end-of-file-fixer - repo: https://github.com/rapidsai/dependency-file-generator - rev: v1.4.0 + rev: v1.5.1 hooks: - id: rapids-dependency-file-generator args: ["--clean"] diff --git a/dependencies.yaml b/dependencies.yaml index 37885a940..f39f62803 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -34,25 +34,48 @@ files: - cudatoolkit - docs - py_version + py_build: + output: pyproject + extras: + table: build-system + includes: + - build + py_run: + output: pyproject + extras: + table: project + includes: + - run + py_optional_test: + output: pyproject + extras: + table: project.optional-dependencies + key: test + includes: + - test_python channels: - rapidsai - conda-forge dependencies: build: common: - - output_types: [conda, requirements] + - output_types: [conda, requirements, pyproject] packages: - &cmake_ver cmake>=3.23.1,!=3.25.0 - - cuda-python>=11.7.1,<12.0 + - &cuda_python cuda-python>=11.7.1,<12.0 - cython>=0.29,<0.30 - ninja - - python>=3.8,<3.11 - scikit-build>=0.13.1 - tomli - output_types: conda packages: - fmt>=9.1.0,<10 - spdlog>=1.11.0,<1.12 + - python>=3.8,<3.11 + - output_types: pyproject + packages: + - wheel + - setuptools>=61.0.0 checks: common: - output_types: [conda, requirements] @@ -118,10 +141,11 @@ dependencies: - python=3.10 run: common: - - output_types: [conda, requirements] + - output_types: [conda, requirements, pyproject] packages: - numba>=0.49 - numpy>=1.19 + - *cuda_python test_cpp: common: - output_types: conda @@ -129,7 +153,7 @@ dependencies: - *cmake_ver test_python: common: - - output_types: [conda, requirements] + - output_types: [conda, requirements, pyproject] packages: - pytest - pytest-cov diff --git a/python/pyproject.toml b/python/pyproject.toml index 873e21445..a462c341f 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -15,15 +15,15 @@ [build-system] build-backend = "setuptools.build_meta" requires = [ - "wheel", - "setuptools>=61.0.0", - "cython>=0.29,<0.30", - "scikit-build>=0.13.1", "cmake>=3.23.1,!=3.25.0", - "ninja", "cuda-python>=11.7.1,<12.0", - "tomli; python_version < '3.11'", -] + "cython>=0.29,<0.30", + "ninja", + "scikit-build>=0.13.1", + "setuptools>=61.0.0", + "tomli", + "wheel", +] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`. [project] name = "rmm" @@ -37,9 +37,9 @@ license = { text = "Apache 2.0" } requires-python = ">=3.8" dependencies = [ "cuda-python>=11.7.1,<12.0", - "numpy>=1.19", "numba>=0.49", -] + "numpy>=1.19", +] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`. classifiers = [ "Intended Audience :: Developers", "Topic :: Database", @@ -53,8 +53,8 @@ classifiers = [ [project.optional-dependencies] test = [ "pytest", - "pytest-xdist", -] + "pytest-cov", +] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`. [project.urls] Homepage = "https://github.com/rapidsai/rmm"