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

sage.graphs: fix doctest warnings due to modularization #36077

Merged
merged 2 commits into from
Aug 13, 2023

Conversation

dcoudert
Copy link
Contributor

Part of : #29705

We fix the following doctest warnings due to the modularization.

sage -t --warn-long 17.6 --random-seed=165655739949225352692057073882229651510 src/sage/graphs/generators/distance_regular.pyx
**********************************************************************
File "src/sage/graphs/generators/distance_regular.pyx", line 1761, in sage.graphs.generators.distance_regular._line_graph_generalised_polygon
Warning: Variable '_line_graph_generalised_polygon' referenced here was set only in doctest marked '# needs sage.libs.gap'
    H = _line_graph_generalised_polygon(G)
    [181 tests, 7.59 s]
sage -t --warn-long 17.6 --random-seed=165655739949225352692057073882229651510 src/sage/graphs/generators/families.py
**********************************************************************
File "src/sage/graphs/generators/families.py", line 3943, in sage.graphs.generators.families.MathonPseudocyclicStronglyRegularGraph
Warning: Variable 'G3x3' referenced here was set only in doctest marked '# needs sage.groups sage.libs.gap sage.modules sage.rings.finite_rings'
    G3x3.is_strongly_regular(parameters=True)
**********************************************************************
File "src/sage/graphs/generators/families.py", line 3945, in sage.graphs.generators.families.MathonPseudocyclicStronglyRegularGraph
Warning: Variable 'G3x3' referenced here was set only in doctest marked '# needs sage.groups sage.libs.gap sage.modules sage.rings.finite_rings'
    G3x3.automorphism_group(algorithm="bliss").order()        # optional - bliss
    [449 tests, 4.75 s]
sage -t --warn-long 17.6 --random-seed=165655739949225352692057073882229651510 src/sage/graphs/graph_decompositions/tdlib.pyx
**********************************************************************
File "src/sage/graphs/graph_decompositions/tdlib.pyx", line 128, in sage.graphs.graph_decompositions.tdlib.treedecomposition_exact
Warning: Consider using a block-scoped tag by inserting the line 'sage: # optional - tdlib' just before this line to avoid repeating the tag 4 times
    import sage.graphs.graph_decompositions.tdlib as tdlib # optional - tdlib
**********************************************************************
File "src/sage/graphs/graph_decompositions/tdlib.pyx", line 179, in sage.graphs.graph_decompositions.tdlib.get_width
Warning: Consider using a block-scoped tag by inserting the line 'sage: # optional - tdlib' just before this line to avoid repeating the tag 4 times
    import sage.graphs.graph_decompositions.tdlib as tdlib # optional - tdlib
    [13 tests, 0.60 s]
sage -t --warn-long 17.6 --random-seed=165655739949225352692057073882229651510 src/sage/graphs/base/static_sparse_graph.pyx
**********************************************************************
File "src/sage/graphs/base/static_sparse_graph.pyx", line 1044, in sage.graphs.base.static_sparse_graph.spectral_radius
Warning: Variable 'r' referenced here was set only in doctest marked '# needs sage.modules'
    e_min < r < e_max
    [66 tests, 2.16 s]

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

Copy link
Contributor

@mkoeppe mkoeppe left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM.

@github-actions
Copy link

Documentation preview for this PR (built with commit 0670be0; changes) is ready! 🎉

@dcoudert
Copy link
Contributor Author

Thank you.

vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 12, 2023
…zation

Part of : sagemath#29705

We fix the following doctest warnings due to the modularization.

```
sage -t --warn-long 17.6 --random-
seed=165655739949225352692057073882229651510
src/sage/graphs/generators/distance_regular.pyx
**********************************************************************
File "src/sage/graphs/generators/distance_regular.pyx", line 1761, in
sage.graphs.generators.distance_regular._line_graph_generalised_polygon
Warning: Variable '_line_graph_generalised_polygon' referenced here was
set only in doctest marked '# needs sage.libs.gap'
    H = _line_graph_generalised_polygon(G)
    [181 tests, 7.59 s]
```

```
sage -t --warn-long 17.6 --random-
seed=165655739949225352692057073882229651510
src/sage/graphs/generators/families.py
**********************************************************************
File "src/sage/graphs/generators/families.py", line 3943, in
sage.graphs.generators.families.MathonPseudocyclicStronglyRegularGraph
Warning: Variable 'G3x3' referenced here was set only in doctest marked
'# needs sage.groups sage.libs.gap sage.modules sage.rings.finite_rings'
    G3x3.is_strongly_regular(parameters=True)
**********************************************************************
File "src/sage/graphs/generators/families.py", line 3945, in
sage.graphs.generators.families.MathonPseudocyclicStronglyRegularGraph
Warning: Variable 'G3x3' referenced here was set only in doctest marked
'# needs sage.groups sage.libs.gap sage.modules sage.rings.finite_rings'
    G3x3.automorphism_group(algorithm="bliss").order()        # optional
- bliss
    [449 tests, 4.75 s]
```

```
sage -t --warn-long 17.6 --random-
seed=165655739949225352692057073882229651510
src/sage/graphs/graph_decompositions/tdlib.pyx
**********************************************************************
File "src/sage/graphs/graph_decompositions/tdlib.pyx", line 128, in
sage.graphs.graph_decompositions.tdlib.treedecomposition_exact
Warning: Consider using a block-scoped tag by inserting the line 'sage:
# optional - tdlib' just before this line to avoid repeating the tag 4
times
    import sage.graphs.graph_decompositions.tdlib as tdlib # optional -
tdlib
**********************************************************************
File "src/sage/graphs/graph_decompositions/tdlib.pyx", line 179, in
sage.graphs.graph_decompositions.tdlib.get_width
Warning: Consider using a block-scoped tag by inserting the line 'sage:
# optional - tdlib' just before this line to avoid repeating the tag 4
times
    import sage.graphs.graph_decompositions.tdlib as tdlib # optional -
tdlib
    [13 tests, 0.60 s]
```

```
sage -t --warn-long 17.6 --random-
seed=165655739949225352692057073882229651510
src/sage/graphs/base/static_sparse_graph.pyx
**********************************************************************
File "src/sage/graphs/base/static_sparse_graph.pyx", line 1044, in
sage.graphs.base.static_sparse_graph.spectral_radius
Warning: Variable 'r' referenced here was set only in doctest marked '#
needs sage.modules'
    e_min < r < e_max
    [66 tests, 2.16 s]
```

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

URL: sagemath#36077
Reported by: David Coudert
Reviewer(s): Matthias Köppe
@vbraun vbraun merged commit 50208b7 into sagemath:develop Aug 13, 2023
@mkoeppe mkoeppe added this to the sage-10.1 milestone Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants