From 7b99f9c8d0f56285a4570c951edc68fee8f33450 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 27 Jan 2026 12:22:11 -0600 Subject: [PATCH 1/2] move ruff configuration into pyproject.toml --- .flake8 | 25 ------------------------- .github/CODEOWNERS | 1 - .pre-commit-config.yaml | 5 ++--- ci/utils/nbtestlog2junitxml.py | 12 ++++++------ docs/cuopt/source/versions1.json | 8 ++++++-- pyproject.toml | 16 +++++++++++++++- 6 files changed, 29 insertions(+), 38 deletions(-) delete mode 100644 .flake8 diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 459cb46113..0000000000 --- a/.flake8 +++ /dev/null @@ -1,25 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 - -[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 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9db850cda4..11119becb2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -12,7 +12,6 @@ docs/ @nvidia/cuopt-infra-codeowners container-builder/ @nvidia/cuopt-infra-codeowners #CI code owners -.flake8 @nvidia/cuopt-ci-codeowners /.github/ @nvidia/cuopt-ci-codeowners /ci/ @nvidia/cuopt-ci-codeowners /.pre-commit-config.yaml @nvidia/cuopt-ci-codeowners diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 799eb291f8..c713ae8832 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2019-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 repos: @@ -19,7 +19,7 @@ repos: rev: v0.14.3 hooks: - id: ruff-check - args: [--fix] + args: [--fix, --config, pyproject.toml] - id: ruff-format - repo: https://github.com/PyCQA/pydocstyle rev: 6.1.1 @@ -68,7 +68,6 @@ repos: ^[.]pre-commit-config[.]yaml$| Dockerfile$| dependencies[.]yaml$| - ^[.]flake8$| Makefile$| setup[.]cfg$| pyproject[.]toml$ diff --git a/ci/utils/nbtestlog2junitxml.py b/ci/utils/nbtestlog2junitxml.py index 7b03ad6bf1..5ee0a20c0f 100644 --- a/ci/utils/nbtestlog2junitxml.py +++ b/ci/utils/nbtestlog2junitxml.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2019-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 import re @@ -7,13 +7,13 @@ from os import path from xml.etree.ElementTree import Element, ElementTree -startingPatt = re.compile("^STARTING: ([\w\.\-]+)$") +startingPatt = re.compile(r"^STARTING: ([\w\.\-]+)$") skippingPatt = re.compile( - "^SKIPPING: ([\w\.\-]+)\s*(\(([\w\.\-\ \,]+)\))?\s*$" + r"^SKIPPING: ([\w\.\-]+)\s*(\(([\w\.\-\ \,]+)\))?\s*$" ) -exitCodePatt = re.compile("^EXIT CODE: (\d+)$") -folderPatt = re.compile("^FOLDER: ([\w\.\-]+)$") -timePatt = re.compile("^real\s+([\d\.ms]+)$") +exitCodePatt = re.compile(r"^EXIT CODE: (\d+)$") +folderPatt = re.compile(r"^FOLDER: ([\w\.\-]+)$") +timePatt = re.compile(r"^real\s+([\d\.ms]+)$") linePatt = re.compile("^" + ("-" * 80) + "$") diff --git a/docs/cuopt/source/versions1.json b/docs/cuopt/source/versions1.json index 12bebcd036..1dede408c8 100644 --- a/docs/cuopt/source/versions1.json +++ b/docs/cuopt/source/versions1.json @@ -1,10 +1,14 @@ [ { - "version": "26.02.00", - "url": "https://docs.nvidia.com/cuopt/user-guide/26.02.00/", + "version": "26.04.00", + "url": "../26.04.00/", "name": "latest", "preferred": true }, + { + "version": "26.02.00", + "url": "https://docs.nvidia.com/cuopt/user-guide/26.02.00/" + }, { "version": "25.12.00", "url": "https://docs.nvidia.com/cuopt/user-guide/25.12.00/" diff --git a/pyproject.toml b/pyproject.toml index f8124b89c9..51aa3b6c74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,9 +28,23 @@ extend-exclude = [ "__init__.py", ] +[tool.ruff.lint] +select = [ + # pycodestyle (errors) + "E", + # pyflakes + "F", + # pycodestyle (warnings) + "W" +] +ignore = [ + # (pycodestyle) line too long + "E501" +] + [tool.ruff.lint.per-file-ignores] "*.ipynb" = [ - # unused imports + # (pyflakes) unused imports "F401", ] From 0399886d4661f366e9e58c9c9ff004b95b72150f Mon Sep 17 00:00:00 2001 From: Ramakrishnap <42624703+rgsl888prabhu@users.noreply.github.com> Date: Wed, 28 Jan 2026 11:59:33 -0600 Subject: [PATCH 2/2] Update versions1.json --- docs/cuopt/source/versions1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cuopt/source/versions1.json b/docs/cuopt/source/versions1.json index 1dede408c8..3e986996a4 100644 --- a/docs/cuopt/source/versions1.json +++ b/docs/cuopt/source/versions1.json @@ -1,7 +1,7 @@ [ { "version": "26.04.00", - "url": "../26.04.00/", + "url": "https://docs.nvidia.com/cuopt/user-guide/26.04.00/", "name": "latest", "preferred": true },