Better cross-referencing and link validation#827
Conversation
Signed-off-by: Adrien Taberner <adrien.taberner@cea.fr>
dalg24
left a comment
There was a problem hiding this comment.
Please split the link fixing from the documenting the new trait.
| linkcheck: | ||
| sphinx-build -b linkcheck ./source/ ./generated_docs/ -n -W --keep-going |
There was a problem hiding this comment.
Is that going to run as part of the CI?
How expensive is it? Should that be just part of the html rule?
There was a problem hiding this comment.
seems like we currently don't. But I am for doing it if it is cheap
There was a problem hiding this comment.
It only checks external links, and there are a lot of false positives.
There was a problem hiding this comment.
do we know how to reduce the false positives?
There was a problem hiding this comment.
I've just left it there so that developers can use it easily. I don't think it can be included in a CI
do we know how to reduce the false positives?
need to add the :doc: tag to some links
Signed-off-by: Adrien Taberner <adrien.taberner@cea.fr>
786bee0 to
f37d4df
Compare
StaticBatchSize section| linkcheck: | ||
| sphinx-build -b linkcheck ./source/ ./generated_docs/ -n -W --keep-going |
There was a problem hiding this comment.
seems like we currently don't. But I am for doing it if it is cheap
|
We should avoid substitutions for links. They are not verified at build time and cause false positives in Use (all build-checked):
|
Signed-off-by: Adrien Taberner <adrien.taberner@cea.fr>
3254d3f to
9491f1d
Compare
Signed-off-by: Adrien Taberner <adrien.taberner@cea.fr>
|
There was a problem hiding this comment.
Pull request overview
This PR modernizes the documentation cross-referencing approach by replacing raw HTML/URL links and ad-hoc substitutions with Sphinx-native roles (:doc:, :ref:, :cpp:), and adds a make linkcheck target to validate links during docs builds.
Changes:
- Converted many internal documentation links to Sphinx cross-references (
:doc:,:ref:) and C++ domain roles (:cpp:). - Added/updated stable RST labels (anchors) to support
:ref:links (e.g., known-issues sections, execution/memory space concepts). - Added a
linkchecktarget todocs/Makefilefor automated link validation.
Reviewed changes
Copilot reviewed 97 out of 97 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/source/usecases/Moving_from_EnableUVM_to_SharedSpace.rst | Switches SharedSpace-related references to :ref:-based substitutions. |
| docs/source/usecases/MDRangePolicy.md | Updates external Intrepid documentation link. |
| docs/source/testing-and-issue-tracking/Testing-Processes.md | Repoints tested-compiler link to local requirements doc. |
| docs/source/testing-and-issue-tracking/Kokkos-Project-Planning.md | Updates meeting-notes repository links and wording. |
| docs/source/known-issues.rst | Adds stable section labels and converts a doc link to :doc:. |
| docs/source/get-started/requirements.rst | Includes shared defs and replaces external known-issues link with :ref:. |
| docs/source/get-started/package-managers.rst | Converts configuration-guide link to :doc:. |
| docs/source/get-started/configuration-guide.rst | Converts internal links to :doc:/:ref: (transition + known-issues). |
| docs/source/contributing.rst | Converts LICENSE link to :doc:. |
| docs/source/ProgrammingGuide/View.rst | Converts API references to :doc: and adds new anchor labels. |
| docs/source/ProgrammingGuide/ProgrammingModel.md | Updates chapter reference number in narrative. |
| docs/source/ProgrammingGuide/ParallelDispatch.md | Updates chapter reference numbers in narrative. |
| docs/source/ProgrammingGuide/Machine-Model.rst | Replaces many legacy link substitutions with :doc:/:ref:/:cpp: and adds label(s). |
| docs/source/ProgrammingGuide/Initialization.rst | Converts API links to :doc: and adjusts shell examples/code-block typing. |
| docs/source/API/core/view/view_like.rst | Converts View-like links to :doc:. |
| docs/source/API/core/view/view.rst | Replaces Programming Guide link with :ref:-based substitution. |
| docs/source/API/core/view/subview.rst | Converts Kokkos::ALL reference to a doc link and removes _ usage. |
| docs/source/API/core/view/memoryTraits.rst | Converts Programming Guide references to :ref:-based substitutions. |
| docs/source/API/core/view/deep_copy.rst | Converts View/ExecutionSpace references to :doc:. |
| docs/source/API/core/view/create_mirror.rst | Reworks concept/view references into :doc:/:ref: and inline C++ roles. |
| docs/source/API/core/view/Subview_type.rst | Converts subview() reference to :doc: and removes _ usage. |
| docs/source/API/core/utilities/num_threads.rst | Simplifies “See also” links using :doc:. |
| docs/source/API/core/utilities/num_devices.rst | Simplifies “See also” links using :doc:. |
| docs/source/API/core/utilities/min_max_clamp.rst | Simplifies “See also” links using :doc:. |
| docs/source/API/core/utilities/device_id.rst | Simplifies “See also” links using :doc:. |
| docs/source/API/core/utilities/assert.rst | Converts abort link to :doc:. |
| docs/source/API/core/spaces/partition_space.rst | Converts execution_spaces reference into a :doc: link. |
| docs/source/API/core/profiling/scoped_region.rst | Converts “See also” reference to :doc:. |
| docs/source/API/core/profiling/profiling_section.rst | Converts “See also” reference to :doc:. |
| docs/source/API/core/policies/ThreadVectorRange.rst | Converts multiple policy/concept links to :doc:. |
| docs/source/API/core/policies/ThreadVectorMDRange.rst | Converts policy/concept links to :doc:. |
| docs/source/API/core/policies/TeamVectorRange.rst | Converts policy/concept links to :doc:. |
| docs/source/API/core/policies/TeamVectorMDRange.rst | Converts policy/concept links to :doc:. |
| docs/source/API/core/policies/TeamThreadRange.rst | Converts policy/concept links to :doc:. |
| docs/source/API/core/policies/TeamThreadMDRange.rst | Converts policy/concept links to :doc:. |
| docs/source/API/core/policies/TeamPolicy.rst | Converts links to :doc:/:ref: and updates parallel_* references to :cpp:. |
| docs/source/API/core/policies/TeamHandleConcept.rst | Updates external execution space URL. |
| docs/source/API/core/policies/RangePolicy.rst | Converts “common arguments” link to :ref:. |
| docs/source/API/core/policies/NestedPolicies.rst | Converts “common arguments” link to :ref:. |
| docs/source/API/core/policies/MDRangePolicy.rst | Converts “common arguments” link to :ref:. |
| docs/source/API/core/policies/ExecutionPolicyConcept.rst | Converts links to :doc: for guide + related APIs. |
| docs/source/API/core/parallel-dispatch/parallel_scan.rst | Converts policy list and reduction_identity link to :doc:. |
| docs/source/API/core/parallel-dispatch/parallel_reduce.rst | Reworks interface presentation and converts links to :doc:. |
| docs/source/API/core/parallel-dispatch/parallel_for.rst | Converts ExecutionPolicy and policy list links to :doc:. |
| docs/source/API/core/parallel-dispatch/fence.rst | Converts parallel_* and deep_copy references to :cpp: and concept link to :ref:. |
| docs/source/API/core/parallel-dispatch/ParallelScanTag.rst | Converts reference to parallel_scan into :doc:. |
| docs/source/API/core/parallel-dispatch/ParallelReduceTag.rst | Converts reference to parallel_reduce into :doc:. |
| docs/source/API/core/parallel-dispatch/ParallelForTag.rst | Converts reference to parallel_for into :doc:. |
| docs/source/API/core/numerics/numeric-traits.rst | Simplifies “See also” links using :doc:. |
| docs/source/API/core/numerics/mathematical-functions.rst | Updates/normalizes links and converts known-issues reference to :doc:/:ref: usage. |
| docs/source/API/core/numerics/mathematical-constants.rst | Converts known-issues reference to :ref: and see-also links to :doc:. |
| docs/source/API/core/memory_spaces.rst | Converts concept links to :doc:/:ref: and adds labels for SharedSpace/HostPinned/concepts. |
| docs/source/API/core/execution_spaces.rst | Converts concept links to :doc:/:ref: and adds a stable concept label. |
| docs/source/API/core/c_style_memory_management/realloc.rst | Converts referenced functions/concepts to :cpp:/:doc:. |
| docs/source/API/core/c_style_memory_management/malloc.rst | Converts referenced functions/concepts to :cpp:/:doc:. |
| docs/source/API/core/c_style_memory_management/free.rst | Converts referenced functions to :cpp:. |
| docs/source/API/core/builtinreducers/Sum.rst | Converts links to ReducerConcept + guide references to :doc:. |
| docs/source/API/core/builtinreducers/ReducerConcept.rst | Converts parallel_reduce + reducer list links to :doc:. |
| docs/source/API/core/builtinreducers/Prod.rst | Converts links to ReducerConcept + guide references to :doc:. |
| docs/source/API/core/builtinreducers/MinMaxLoc.rst | Converts links to ReducerConcept/scalar type + guide references to :doc:. |
| docs/source/API/core/builtinreducers/MinMax.rst | Converts links to ReducerConcept/scalar type + guide references to :doc:. |
| docs/source/API/core/builtinreducers/MinLoc.rst | Converts links to ReducerConcept/scalar type + guide references to :doc:. |
| docs/source/API/core/builtinreducers/Min.rst | Converts links to ReducerConcept + guide references to :doc:. |
| docs/source/API/core/builtinreducers/MaxLoc.rst | Converts links to ReducerConcept/scalar type + guide references to :doc:. |
| docs/source/API/core/builtinreducers/Max.rst | Converts links to ReducerConcept + guide references to :doc:. |
| docs/source/API/core/builtinreducers/LOr.rst | Converts links to ReducerConcept + guide references to :doc:. |
| docs/source/API/core/builtinreducers/LAnd.rst | Converts links to ReducerConcept + guide references to :doc:. |
| docs/source/API/core/builtinreducers/BOr.rst | Converts links to ReducerConcept + guide references to :doc:. |
| docs/source/API/core/builtinreducers/BAnd.rst | Converts links to ReducerConcept + guide references to :doc:. |
| docs/source/API/core/builtin_reducers.rst | Converts index links to :doc: for concept + reducer entries. |
| docs/source/API/core/atomics/atomic_store.rst | Converts “See also” links to :doc:. |
| docs/source/API/core/atomics/atomic_load.rst | Converts “See also” links to :doc:. |
| docs/source/API/core/atomics/atomic_exchange.rst | Converts “See also” links to :doc:. |
| docs/source/API/core/atomics/atomic_compare_exchange_strong.rst | Converts deprecation pointer link to :doc:. |
| docs/source/API/core/atomics/atomic_compare_exchange.rst | Converts “See also” link to :doc:. |
| docs/source/API/core/View.rst | Converts View API index entries to :doc:. |
| docs/source/API/core/Traits.rst | Converts concept links to :doc:/:ref:. |
| docs/source/API/core/Task-Parallelism.rst | Converts guide links to :doc:. |
| docs/source/API/core/SpaceAccessibility.rst | Converts ExecutionSpace/MemorySpace mentions to :doc: and refactors View/deep_copy mentions. |
| docs/source/API/core/Profiling.rst | Converts profiling links to :doc:. |
| docs/source/API/core/ParallelDispatch.rst | Converts dispatch function/tag links to :doc:. |
| docs/source/API/core/Macros.rst | Converts execution-space mentions in tables to :doc:. |
| docs/source/API/core/KokkosConcepts.rst | Replaces legacy substitutions with :doc: cross-references. |
| docs/source/API/core/Execution-Policies.rst | Converts policy links to :doc: and adds a named anchor for common arguments. |
| docs/source/API/core-index.rst | Converts core index entries to :doc: and fixes Traits link target. |
| docs/source/API/containers/ScatterView.rst | Converts View reference to :doc:/C++ role style and updates parallel_reduce reference usage. |
| docs/source/API/containers/DualView.rst | Converts View references to :doc:. |
| docs/source/API/containers-index.rst | Converts containers index entries to :doc:. |
| docs/source/API/algorithms/std-algorithms/all/StdShiftRight.rst | Converts cross-reference to shift_left into :doc:. |
| docs/source/API/algorithms/std-algorithms/all/StdRemoveIf.rst | Converts cross-reference to remove into :doc:. |
| docs/source/API/algorithms/std-algorithms/all/StdRemoveCopyIf.rst | Converts cross-reference to remove_copy into :doc:. |
| docs/source/API/algorithms/std-algorithms/all/StdMinMaxElement.rst | Converts cross-reference to min_element into :doc:. |
| docs/source/API/algorithms/std-algorithms/all/StdMaxElement.rst | Converts cross-reference to min_element into :doc:. |
| docs/source/API/algorithms/std-algorithms/all/StdIsSortedUntil.rst | Converts cross-reference to is_sorted into :doc:. |
| docs/source/API/algorithms/std-algorithms/all/StdCopy_n.rst | Converts cross-reference to copy into :doc:. |
| docs/source/API/algorithms/std-algorithms/all/StdCopyIf.rst | Converts cross-reference to copy into :doc:. |
| docs/Makefile | Adds linkcheck target using sphinx-build -b linkcheck. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ----- | ||
|
|
||
| A Kokkos ScatterView serves as an interface for a standard Kokkos::|View|_ implementing a scatter-add pattern either via atomics or data replication. | ||
| A Kokkos ScatterView serves as an interface for a standard Kokkos:::cpp:class:`View` implementing a scatter-add pattern either via atomics or data replication. |
There was a problem hiding this comment.
There is a malformed inline C++ domain reference here (Kokkos:::cpp:class:...). This will render incorrectly and may prevent Sphinx from resolving the reference. Update it to either plain Kokkos::View or a valid role like :cpp:class:Kokkos::View.
| A Kokkos ScatterView serves as an interface for a standard Kokkos:::cpp:class:`View` implementing a scatter-add pattern either via atomics or data replication. | |
| A Kokkos ScatterView serves as an interface for a standard ``Kokkos::View`` implementing a scatter-add pattern either via atomics or data replication. |
| See :doc:`Profiling::ScopedRegion <profiling/scoped_region>` for details.` | ||
|
|
||
| Kokkos::Profiling::ProfilingSection | ||
| ----------------------------------- | ||
| See `Profiling::ProfilingSection <profiling/profiling_section.html>`_ for details.` | ||
| See :doc:`Profiling::ProfilingSection <profiling/profiling_section>` for details.` |
There was a problem hiding this comment.
The sentences end with an extra trailing backtick (...for details.), leaving an unmatched ` character. This is likely to cause an RST parsing warning/error. Remove the trailing backticks at the end of these lines.
| .. _scalbln: https://en.cppreference.com/w/cpp/numeric/math/scalbn | ||
|
|
||
| .. |scalbln| replace:: ``scalbln`` |
There was a problem hiding this comment.
The external reference target for scalbln points to the scalbn cppreference page. This makes the link incorrect. Update the URL to the correct cppreference page for scalbln.
| Test configurations are defined in the `kokkos/.jenkins`, and `kokkos/.github/workflows/*` files and determine the official | ||
| primary software stack support. | ||
| The tested compiler versions are also listed [here](https://kokkos.github.io/kokkos-core-wiki/requirements.html). | ||
| The tested compiler versions are also listed [here](../get-started/requirements). |
There was a problem hiding this comment.
This Markdown link points to ../get-started/requirements without an extension or Sphinx cross-reference. In the built HTML this is likely to be a broken relative URL (it won't automatically resolve to requirements.html). Prefer a MyST/Sphinx doc link (e.g., {doc}/:doc:) to get-started/requirements so Sphinx can resolve it and linkcheck can validate it.
| Fortran | ||
| ======= |
There was a problem hiding this comment.
The section title "Fortran" has a trailing space. This can lead to inconsistent rendering and makes diffs noisier. Remove the trailing whitespace in the heading text.
Signed-off-by: Adrien Taberner <adrien.taberner@cea.fr>
:doc:,:ref:and:cpp: