Skip to content

move ruff configuration into pyproject.toml#806

Merged
rapids-bot[bot] merged 2 commits intoNVIDIA:mainfrom
jameslamb:small-cleanup
Jan 29, 2026
Merged

move ruff configuration into pyproject.toml#806
rapids-bot[bot] merged 2 commits intoNVIDIA:mainfrom
jameslamb:small-cleanup

Conversation

@jameslamb
Copy link
Copy Markdown
Member

@jameslamb jameslamb commented Jan 27, 2026

Description

Moves ruff configuration into pyproject.toml.

I noticed this project has a .flake8, but doesn't actually run flake8 directly... I think the configuration in that .flake8 is getting ignored (based on https://docs.astral.sh/ruff/configuration/, I don't believe ruff reads .flake8 files).

This PR ensures ruff respects this project's configuration. Any other changes were made automatically by pre-commit hooks.

Issue

N/A

Notes for Reviewers

How I chose these checks

I only selected checks that flake8 would run.

I think it'd be worthwhile to expand this in the future, especially with (B) flake8-bugbear and (PERF) perflint. I'll leave that to you all in a follow-up if you'd like. Here's a list of rules I like to use in Python projects: https://github.com/jameslamb/pydistcheck/blob/3bf39fd2f0c9328e519b8892b6dfde029381d7a0/pyproject.toml#L133

Checklist

  • I am familiar with the Contributing Guidelines.
  • Testing
    • New or existing tests cover these changes
  • Documentation
    • The documentation is up to date with these changes

Summary by CodeRabbit

  • Chores

    • Removed legacy flake8 configuration and its ownership entry
    • Bumped copyright year to 2026
    • Adjusted pre-commit hook arguments and removed the old visibility exclusion
  • Configuration

    • Added/updated centralized linting configuration in project settings
  • Documentation

    • Updated CuOpt documentation to version 26.04.00 (marked as latest)
  • Style

    • Converted several regex literals to raw-string form

✏️ Tip: You can customize this high-level summary in your review settings.

@jameslamb jameslamb requested review from a team as code owners January 27, 2026 18:26
@jameslamb jameslamb added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Jan 27, 2026
@jameslamb jameslamb requested a review from tmckayus January 27, 2026 18:26
{
"version": "26.02.00",
"url": "https://docs.nvidia.com/cuopt/user-guide/26.02.00/",
"version": "26.04.00",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was made by just running pre-commit run --all-files. I'm not sure what's causing it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was manually added and needs update to the update script handle it with url now.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok got it, thanks

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

Removed the .flake8 configuration and its CODEOWNERS entry, migrated lint rules into pyproject.toml under tool.ruff.lint, updated pre-commit ruff hook and copyright years to 2026, converted several regex literals to raw strings, and updated CuOpt docs latest version to 26.04.00.

Changes

Cohort / File(s) Summary
Linting configuration & hooks
\.flake8, .github/CODEOWNERS, \.pre-commit-config\.yaml, pyproject\.toml
Deleted .flake8 and its CODEOWNERS line. Updated .pre-commit-config.yaml ruff hook arguments to include --config pyproject.toml and bumped copyright year to 2026. Added [tool.ruff.lint] with select and ignore in pyproject.toml; preserved per-file-ignores (minor comment tweak).
CI utility updates
ci/utils/nbtestlog2junitxml.py
Replaced several regex string literals with raw strings (e.g., STARTING, SKIPPING, EXIT CODE, FOLDER, real time). Updated SPDX copyright year to 2026.
Documentation versions
docs/cuopt/source/versions1.json
Changed "latest" entry from 26.02.00 → 26.04.00 with new URL and added a separate 26.02.00 entry (archived previous).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main objective: moving ruff configuration into pyproject.toml, which is the primary change across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@docs/cuopt/source/versions1.json`:
- Around line 3-11: The versions1.json entries for "version": "26.04.00" and
"version": "26.02.00" point to URLs that return 404; before merging either
confirm those docs are published and update the "url" fields to the correct live
endpoints (and set "preferred": true only for the proper release) or
remove/rollback the two version objects so the version picker doesn't include
broken links; locate the JSON objects by the "version" keys and the
"url"/"preferred"/"name" fields to make the change.

Comment on lines +3 to +11
"version": "26.04.00",
"url": "https://docs.nvidia.com/cuopt/user-guide/26.04.00/",
"name": "latest",
"preferred": true
},
{
"version": "26.02.00",
"url": "https://docs.nvidia.com/cuopt/user-guide/26.02.00/"
},
Copy link
Copy Markdown

@coderabbitai coderabbitai bot Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

https://docs.nvidia.com/cuopt/user-guide/26.04.00/

💡 Result:

The URL you provided (https://docs.nvidia.com/cuopt/user-guide/26.04.00/) currently returns 404 Not Found, which suggests that a “26.04.00” cuOpt User Guide isn’t published at that path (or the versioned URL format differs). [1]

What is available is the cuOpt documentation hub and the User Guide under the “latest” path, which currently shows NVIDIA cuOpt (25.12) and includes a “Choose version” selector. [2][3]

Use these instead:

  • Documentation hub: https://docs.nvidia.com/cuopt/index.html [2]
  • User Guide (latest): https://docs.nvidia.com/cuopt/user-guide/latest/introduction.html [3]

If you tell me what you’re trying to find in 26.04.00 (release notes, installation, API reference, etc.), I can help locate the closest matching version/page.

Sources:
[1] NVIDIA Docs – 404 for the provided 26.04.00 URL
[2] NVIDIA cuOpt documentation hub (docs.nvidia.com/cuopt)
[3] NVIDIA cuOpt User Guide “latest” (shows version 25.12 + version picker)


🌐 Web query:

https://docs.nvidia.com/cuopt/user-guide/26.02.00/

💡 Result:

The URL you provided (https://docs.nvidia.com/cuopt/user-guide/26.02.00/) currently returns 404 Not Found, so NVIDIA doesn’t appear to have published the 26.02.00 cuOpt User Guide at that path. [1]

What you can use instead:

  • cuOpt documentation hub (entry point to the published docs): [2]
  • Published cuOpt User Guide (example: 25.02): [3]
  • “latest” docs endpoint (example: OpenAPI/Swagger under latest/): [4]

Sources: [1] [2] [3] [4]


🌐 Web query:

https://docs.nvidia.com/cuopt/user-guide/latest/

💡 Result:

The link points to the NVIDIA cuOpt User Guide (version 25.12), which documents cuOpt’s capabilities and how to use it via multiple interfaces. [1]

  • What cuOpt is: A GPU-accelerated optimization library for MILP, LP, QP, and vehicle routing problems (VRP), aimed at large-scale problems and deployable across cloud/data center/workstations; APIs wrap a C++ core. [2]
  • What’s in the guide: Sections for features (Routing, LP/QP, MILP), C API docs + examples, Python API docs + examples (routing + LP/QP/MILP), server (service, CLI, OpenAPI/Swagger, clients, cloud guides), CLI, and third-party modeling languages (AMPL, GAMS/GAMSPy, PuLP, JuMP). [1]
  • Installation options covered: Source (GitHub), pip wheels, conda packages, and containers (Docker Hub nvidia/cuopt and NVIDIA NGC for AI Enterprise). [2]
  • System requirements (high level): Supports x86-64/ARM64, needs NVIDIA GPU Volta+ (CC ≥ 7.0), CUDA 12.0+, and lists specific CUDA↔driver minimums; for best performance it recommends H100 SXM, CUDA 13.0, and driver 580.65.06+. [3]
  • Release notes (25.12 highlights): Adds a barrier-method QP solver (beta), quadratic objectives in C & Python modeling APIs, multi-GPU concurrent LP mode, plus various MILP/LP improvements and fixes. [4]

Sources: NVIDIA cuOpt User Guide (latest): main index [1], introduction [2], system requirements [3], release notes [4].


Do not merge: 26.04.00 and 26.02.00 documentation links are not live (404).

The URLs for versions 26.04.00 and 26.02.00 currently return 404 errors. The /latest/ alias still serves version 25.12 docs. Merging this change will introduce broken links in the version picker. Either confirm that the docs for these versions are published and available at the specified URLs, or defer this change until they are deployed.

Rollback option
-  {
-    "version": "26.04.00",
-    "url": "https://docs.nvidia.com/cuopt/user-guide/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/",
+    "name": "latest",
+    "preferred": true
+  },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"version": "26.04.00",
"url": "https://docs.nvidia.com/cuopt/user-guide/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/",
"name": "latest",
"preferred": true
},
🤖 Prompt for AI Agents
In `@docs/cuopt/source/versions1.json` around lines 3 - 11, The versions1.json
entries for "version": "26.04.00" and "version": "26.02.00" point to URLs that
return 404; before merging either confirm those docs are published and update
the "url" fields to the correct live endpoints (and set "preferred": true only
for the proper release) or remove/rollback the two version objects so the
version picker doesn't include broken links; locate the JSON objects by the
"version" keys and the "url"/"preferred"/"name" fields to make the change.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codeabbitai this is future release

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

@jameslamb
Copy link
Copy Markdown
Member Author

/merge

@rapids-bot rapids-bot bot merged commit 38852b7 into NVIDIA:main Jan 29, 2026
90 checks passed
@jameslamb jameslamb deleted the small-cleanup branch January 29, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants