Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustworkx-core: fix docs build warnings #1333

Merged
merged 7 commits into from
Nov 30, 2024

Conversation

airwoodix
Copy link
Contributor

@airwoodix airwoodix commented Nov 29, 2024

Fix the warnings during the rustworkx-core documentation build. See e.g. this job:

warning: unresolved link to `1`
  --> rustworkx-core/src/generators/dorogovtsev_goltsev_mendes_graph.rs:19:60
   |
19 | /// Generate a graph following the recursive procedure in [1].
   |                                                            ^ no item named `1` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
   = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default

warning: unresolved link to `1`
  --> rustworkx-core/src/generators/dorogovtsev_goltsev_mendes_graph.rs:46:9
   |
46 | /// .. [1] S. N. Dorogovtsev, A. V. Goltsev and J. F. F. Mendes
   |         ^ no item named `1` in scope
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `1`
   --> rustworkx-core/src/steiner_tree.rs:457:21
    |
457 | /// This algorithm [1]_ produces a tree whose weight is within a
    |                     ^ no item named `1` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `2`
   --> rustworkx-core/src/steiner_tree.rs:460:21
    |
460 | /// here is due to [2]_ . It avoids computing all pairs shortest paths but rather
    |                     ^ no item named `2` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `1`
   --> rustworkx-core/src/steiner_tree.rs:512:9
    |
512 | /// .. [1] Kou, Markowsky & Berman,
    |         ^ no item named `1` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `2`
   --> rustworkx-core/src/steiner_tree.rs:516:9
    |
516 | /// .. [2] Kurt Mehlhorn,
    |         ^ no item named `2` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unportable markdown
    --> rustworkx-core/src/centrality.rs:1076:27
     |
1076 | /// the average distance" [^WF]. You can enable this by setting `wf_improved` to `true`.
     |                           -^^^^
     |                           |
     |                           help: if it should not be a footnote, escape it: `\`
     |
     = note: `#[warn(rustdoc::unportable_markdown)]` on by default

warning: unportable markdown
    --> rustworkx-core/src/centrality.rs:1078:5
     |
1078 | /// [^WF] Wasserman, S., & Faust, K. (1994). Social Network Analysis:
     |     -^^^^
     |     |
     |     help: if it should not be a footnote, escape it: `\`

warning: this URL is not a hyperlink
  --> rustworkx-core/src/generators/dorogovtsev_goltsev_mendes_graph.rs:49:8
   |
49 | ///    https://arxiv.org/abs/cond-mat/0112143
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: bare URLs are not automatically turned into clickable links
   = note: `#[warn(rustdoc::bare_urls)]` on by default
help: use an automatic link instead
   |
49 | ///    <https://arxiv.org/abs/cond-mat/0112143>
   |        +                                      +

warning: this URL is not a hyperlink
   --> rustworkx-core/src/steiner_tree.rs:515:8
    |
515 | ///    https://link.springer.com/article/10.1007/BF00288961
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: bare URLs are not automatically turned into clickable links
help: use an automatic link instead
    |
515 | ///    <https://link.springer.com/article/10.1007/BF00288961>
    |        +                                                    +

warning: this URL is not a hyperlink
   --> rustworkx-core/src/steiner_tree.rs:518:8
    |
518 | ///    https://doi.org/10.1016/0020-0190(88)90066-X
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: bare URLs are not automatically turned into clickable links
help: use an automatic link instead
    |
518 | ///    <https://doi.org/10.1016/0020-0190>(88)90066-X
    |        +                                 +

2a61e43 fails the rustworkx-core documentation build step to avoid regressions. The change could be reverted on similar ground to #1330 (review).

@coveralls
Copy link

coveralls commented Nov 29, 2024

Pull Request Test Coverage Report for Build 12098431514

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.869%

Totals Coverage Status
Change from base Build 12098423308: 0.0%
Covered Lines: 18287
Relevant Lines: 19075

💛 - Coveralls

@airwoodix airwoodix marked this pull request as ready for review November 29, 2024 23:28
Copy link
Collaborator

@IvanIsCoding IvanIsCoding left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the warnings!

Can't wait for rust-lang/rust#56232 though. Once I tried running rust-lang/rust#56232 (comment) and Clippy found so many issues with our doc examples, one of these days I should try to fix them

@@ -46,6 +46,8 @@ jobs:
run: pushd rustworkx-core && cargo test && popd
- name: rustworkx-core Docs
run: pushd rustworkx-core && cargo doc && popd
env:
RUSTDOCFLAGS: '-D warnings'
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is very weird that this isn't a command line option. But it is a Cargo limitation, there is not much we can do

@IvanIsCoding IvanIsCoding added this pull request to the merge queue Nov 30, 2024
Merged via the queue into Qiskit:main with commit 5d28053 Nov 30, 2024
31 checks passed
@airwoodix airwoodix deleted the fix-rs-docs-links branch November 30, 2024 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants