Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds Java Javadoc generation and integration into the docs pipeline: build scripts run Maven javadoc for Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
ci/build_docs.sh (1)
67-67: Make Java docs staging idempotent and failure-friendly.Using
mvhere can create unexpected nesting if the destination already exists. Prefer explicit directory checks/copy semantics for predictable output and clearer errors.As per coding guidelines: `ci/**/*`: Check for proper error handling and meaningful error messages.🔧 Proposed refactor
-mv ../java/cuvs-java/target/reports/apidocs ./build/dirhtml/_static/java +if [[ ! -d ../java/cuvs-java/target/reports/apidocs ]]; then + rapids-logger "Java apidocs missing at java/cuvs-java/target/reports/apidocs" + exit 1 +fi +rm -rf ./build/dirhtml/_static/java +mkdir -p ./build/dirhtml/_static/java +cp -a ../java/cuvs-java/target/reports/apidocs/. ./build/dirhtml/_static/java/🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ci/build_docs.sh` at line 67, Replace the bare mv call that moves Java apidocs (the line invoking "mv ../java/cuvs-java/target/reports/apidocs ./build/dirhtml/_static/java") with an idempotent, failure-friendly sequence: check whether the source directory exists and fail with a clear error if not, create or clear the destination directory before copying to avoid nesting, use a recursive copy/rsync semantic rather than mv to preserve predictable output, and ensure any failure prints a meaningful message and exits non‑zero; update the script around the mv invocation so the functions/steps that validate source existence, prepare "./build/dirhtml/_static/java", and perform the copy/rsync are used instead of the raw mv.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/source/java_api/index.rst`:
- Line 12: The iframe element in the docs (the <iframe ...> in the java_api
index) lacks an accessible title; update the iframe tag that currently reads
src="../_static/java/index.html" height="720px" width="100%" to include a
descriptive title attribute (e.g., title="Java API documentation" or similar) so
assistive technologies can identify the embedded content.
---
Nitpick comments:
In `@ci/build_docs.sh`:
- Line 67: Replace the bare mv call that moves Java apidocs (the line invoking
"mv ../java/cuvs-java/target/reports/apidocs ./build/dirhtml/_static/java") with
an idempotent, failure-friendly sequence: check whether the source directory
exists and fail with a clear error if not, create or clear the destination
directory before copying to avoid nesting, use a recursive copy/rsync semantic
rather than mv to preserve predictable output, and ensure any failure prints a
meaningful message and exits non‑zero; update the script around the mv
invocation so the functions/steps that validate source existence, prepare
"./build/dirhtml/_static/java", and perform the copy/rsync are used instead of
the raw mv.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: d27d69c8-37a2-4b74-9c88-6d745d66bdb0
📒 Files selected for processing (5)
build.shci/build_docs.shdependencies.yamldocs/source/api_docs.rstdocs/source/java_api/index.rst
| Open Java API documentation in a new tab ↗ | ||
| </a> | ||
| </p> | ||
| <iframe src="../_static/java/index.html" height="720px" width="100%"></iframe> |
There was a problem hiding this comment.
Add a title to the iframe for accessibility.
The embedded iframe should include a descriptive title so assistive technologies can identify its purpose.
♿ Proposed fix
- <iframe src="../_static/java/index.html" height="720px" width="100%"></iframe>
+ <iframe
+ src="../_static/java/index.html"
+ title="cuVS Java API documentation"
+ height="720px"
+ width="100%"></iframe>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/source/java_api/index.rst` at line 12, The iframe element in the docs
(the <iframe ...> in the java_api index) lacks an accessible title; update the
iframe tag that currently reads src="../_static/java/index.html" height="720px"
width="100%" to include a descriptive title attribute (e.g., title="Java API
documentation" or similar) so assistive technologies can identify the embedded
content.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@build.sh`:
- Around line 554-556: The mvn invocation's -DexcludePackageNames currently sets
only com.nvidia.cuvs.internal.panama which conflicts with the pom.xml
exclusions; update the -DexcludePackageNames value in the mvn command (the line
invoking mvn compile javadoc:javadoc-no-fork) to include the full exclusion list
used in the pom (for example:
com.nvidia.cuvs.examples,com.nvidia.cuvs.internal.panama) or change it to match
the actual package names in pom.xml so the Javadoc exclusions are aligned.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 53e108c1-5991-405b-87d9-d76b76df1f4f
📒 Files selected for processing (2)
build.shci/build_docs.sh
🚧 Files skipped from review as they are similar to previous changes (1)
- ci/build_docs.sh
| mvn compile javadoc:javadoc-no-fork \ | ||
| -DexcludePackageNames=com.nvidia.cuvs.internal.panama \ | ||
| -Dspotless.apply.skip=true |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the actual package structure to understand what should be excluded
echo "=== Checking for panama packages ==="
fd -t d -i "panama" java/
echo ""
echo "=== Checking for examples packages ==="
fd -t d "examples" java/
echo ""
echo "=== pom.xml excludePackageNames configuration ==="
rg -n "excludePackageNames" java/cuvs-java/pom.xmlRepository: rapidsai/cuvs
Length of output: 399
Align package exclusions with pom.xml configuration.
The -DexcludePackageNames value here only excludes com.nvidia.cuvs.internal.panama, but java/cuvs-java/pom.xml:201 excludes com.nvidia.cuvs.examples,com.nvidia.cuvs.panama. Since Maven -D properties override pom.xml entirely, building docs via this script will:
- Include
com.nvidia.cuvs.examplesin public API docs (likely unintended) - Exclude
com.nvidia.cuvs.internal.panamainstead ofcom.nvidia.cuvs.panama
Either pass the full exclusion list (com.nvidia.cuvs.examples,com.nvidia.cuvs.internal.panama) or verify that the pom.xml package names match the actual codebase structure.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@build.sh` around lines 554 - 556, The mvn invocation's -DexcludePackageNames
currently sets only com.nvidia.cuvs.internal.panama which conflicts with the
pom.xml exclusions; update the -DexcludePackageNames value in the mvn command
(the line invoking mvn compile javadoc:javadoc-no-fork) to include the full
exclusion list used in the pom (for example:
com.nvidia.cuvs.examples,com.nvidia.cuvs.internal.panama) or change it to match
the actual package names in pom.xml so the Javadoc exclusions are aligned.
Add the java-docs to the reference API.
Resolves #973
Resolves #580
Resolves #1593