From f9ffb6fd1b2e458475dd4e7a03195f108dc58f25 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 18 Dec 2024 13:37:39 -0600 Subject: [PATCH] remove setup.cfg files, other packaging cleanup --- .pre-commit-config.yaml | 3 +-- dependencies.yaml | 40 +++++++++++++++--------------- pyproject.toml | 4 +-- python/cuvs/setup.cfg | 39 ----------------------------- setup.cfg | 55 ----------------------------------------- 5 files changed, 23 insertions(+), 118 deletions(-) delete mode 100644 python/cuvs/setup.cfg delete mode 100644 setup.cfg diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5e53abd92..fcfc7e1fa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -108,8 +108,7 @@ repos: [.](cmake|cpp|cu|cuh|h|hpp|sh|pxd|py|pyx|rs)$| CMakeLists[.]txt$| CMakeLists_standalone[.]txt$| - meta[.]yaml$| - setup[.]cfg$ + meta[.]yaml$ exclude: | (?x) docs/source/sphinxext/github_link\.py| diff --git a/dependencies.yaml b/dependencies.yaml index eca97d2f5..a59b5f671 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -7,39 +7,39 @@ files: arch: [x86_64, aarch64] includes: - build - - rapids_build - build_py_cuvs + - build_wheels + - checks - cuda - cuda_version - - depends_on_pylibraft + - depends_on_cupy - depends_on_librmm + - depends_on_pylibraft - develop - - checks - - build_wheels - - test_libcuvs - docs + - rapids_build - run_py_cuvs + - rust + - test_libcuvs - test_python_common - test_py_cuvs - - cupy - - rust bench_ann: output: conda matrix: cuda: ["11.8", "12.5"] arch: [x86_64, aarch64] includes: - - rapids_build + - bench + - bench_python - build_py_cuvs - cuda - cuda_version + - depends_on_cupy - depends_on_pylibraft - depends_on_librmm - develop - - bench - - bench_python + - rapids_build - rapids_build_setuptools - - cupy test_cpp: output: none includes: @@ -49,10 +49,10 @@ files: output: none includes: - cuda_version + - depends_on_cupy - py_version - test_python_common - test_py_cuvs - - cupy checks: output: none includes: @@ -61,19 +61,19 @@ files: docs: output: none includes: + - cuda - cuda_version - - cupy + - depends_on_cupy - docs - py_version - - rust - rapids_build - - cuda + - rust rust: output: none includes: + - cuda - cuda_version - rapids_build - - cuda - rust py_build_cuvs: output: pyproject @@ -89,8 +89,8 @@ files: table: tool.rapids-build-backend key: requires includes: - - rapids_build - build_py_cuvs + - rapids_build py_run_cuvs: output: pyproject pyproject_dir: python/cuvs @@ -98,8 +98,8 @@ files: table: project includes: - cuda_wheels - - run_py_cuvs - depends_on_pylibraft + - run_py_cuvs py_test_cuvs: output: pyproject pyproject_dir: python/cuvs @@ -107,9 +107,9 @@ files: table: project.optional-dependencies key: test includes: + - depends_on_cupy - test_python_common - test_py_cuvs - - cupy py_build_cuvs_bench: output: pyproject pyproject_dir: python/cuvs_bench @@ -368,7 +368,7 @@ dependencies: - nvidia-cusolver - nvidia-cusparse - cupy: + depends_on_cupy: common: - output_types: conda packages: diff --git a/pyproject.toml b/pyproject.toml index fbf4cf41f..417514466 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ force-exclude = ''' # unlike the match option above this match-dir will have no effect when # pydocstyle is invoked from pre-commit. Therefore this exclusion list must # also be maintained in the pre-commit config file. -match-dir = "^(?!(ci|cpp|conda|docs)).*$" +match-dir = "^(?!(ci|cpp|conda|docs|notebooks)).*$" select = "D201, D204, D206, D207, D208, D209, D210, D211, D214, D215, D300, D301, D302, D403, D405, D406, D407, D408, D409, D410, D411, D412, D414, D418" # Would like to enable the following rules in the future: # D200, D202, D205, D400 @@ -42,6 +42,6 @@ follow_imports = "skip" skip = "./.git,./.github,./cpp/build,.*egg-info.*,./.mypy_cache,.*_skbuild" # ignore short words, and typename parameters like OffsetT ignore-regex = "\\b(.{1,4}|[A-Z]\\w*T)\\b" -ignore-words-list = "inout,numer" +ignore-words-list = "inout,unparseable,numer" builtin = "clear" quiet-level = 3 diff --git a/python/cuvs/setup.cfg b/python/cuvs/setup.cfg deleted file mode 100644 index 57b4954bc..000000000 --- a/python/cuvs/setup.cfg +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) 2024, NVIDIA CORPORATION. - -[isort] -line_length=79 -multi_line_output=3 -include_trailing_comma=True -force_grid_wrap=0 -combine_as_imports=True -order_by_type=True -known_dask= - dask - distributed - dask_cuda -known_rapids= - cuvs - nvtext - cudf - cuml - raft - cugraph - dask_cudf - rmm -known_first_party= - cuvs -default_section=THIRDPARTY -sections=FUTURE,STDLIB,THIRDPARTY,DASK,RAPIDS,FIRSTPARTY,LOCALFOLDER -skip= - thirdparty - .eggs - .git - .hg - .mypy_cache - .tox - .venv - _build - buck-out - build - dist - __init__.py diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index e64641d05..000000000 --- a/setup.cfg +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. - -[flake8] -filename = *.py, *.pyx, *.pxd, *.pxi -exclude = __init__.py, *.egg, build, docs, .git -force-check = True -ignore = - # line break before binary operator - W503, - # whitespace before : - E203 -per-file-ignores = - # Rules ignored only in Cython: - # E211: whitespace before '(' (used in multi-line imports) - # E225: Missing whitespace around operators (breaks cython casting syntax like ) - # E226: Missing whitespace around arithmetic operators (breaks cython pointer syntax like int*) - # E227: Missing whitespace around bitwise or shift operator (Can also break casting syntax) - # E275: Missing whitespace after keyword (Doesn't work with Cython except?) - # E402: invalid syntax (works for Python, not Cython) - # E999: invalid syntax (works for Python, not Cython) - # W504: line break after binary operator (breaks lines that end with a pointer) - *.pyx: E211, E225, E226, E227, E275, E402, E999, W504 - *.pxd: E211, E225, E226, E227, E275, E402, E999, W504 - *.pxi: E211, E225, E226, E227, E275, E402, E999, W504 - -[pydocstyle] -# Due to https://github.com/PyCQA/pydocstyle/issues/363, we must exclude rather -# than include using match-dir. Note that as discussed in -# https://stackoverflow.com/questions/65478393/how-to-filter-directories-using-the-match-dir-flag-for-pydocstyle, -# unlike the match option above this match-dir will have no effect when -# pydocstyle is invoked from pre-commit. Therefore this exclusion list must -# also be maintained in the pre-commit config file. -match-dir = ^(?!(ci|cpp|conda|docs|java|notebooks)).*$ -# Allow missing docstrings for docutils -ignore-decorators = .*(docutils|doc_apply|copy_docstring).* -select = - D201, D204, D206, D207, D208, D209, D210, D211, D214, D215, D300, D301, D302, D403, D405, D406, D407, D408, D409, D410, D411, D412, D414, D418 - # Would like to enable the following rules in the future: - # D200, D202, D205, D400 - -[mypy] -ignore_missing_imports = True -# If we don't specify this, then mypy will check excluded files if -# they are imported by a checked file. -follow_imports = skip - -[codespell] -# note: pre-commit passes explicit lists of files here, which this skip file list doesn't override - -# this is only to allow you to run codespell interactively -skip = ./.git,./.github,./cpp/build,.*egg-info.*,./.mypy_cache,.*_skbuild -# ignore short words, and typename parameters like OffsetT -ignore-regex = \b(.{1,4}|[A-Z]\w*T)\b -ignore-words-list = inout,unparseable,numer -builtin = clear -quiet-level = 3