-
-
Notifications
You must be signed in to change notification settings - Fork 656
Deprecate sorting by default in connected component methods for graphs #35891
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
Conversation
Do we need to deprecate the change in the default for the |
Yes, it's better with a deprecation warning. |
I changed the title and description of this PR to better reflect its content. |
Thank you. |
Merge conflict, please fix |
I fixed the merge conflict. I'm setting the ticket back to positive review. |
|
There is an embarrassing issue here. When I run
|
Documentation preview for this PR (built with commit efcf6f0; changes) is ready! 🎉 |
I think this is addressed by #35749. |
Let me know if we can switch back this ticket to positive review. Thanks. |
lgtm |
* upstream/develop: (1372 commits) Updated SageMath version to 10.1.beta8 remove multiple call of Vmatrix and Vmodule remove PGE and some listcomp get two entry directly tests passed Still permutation wip fix one issue fix fix typo store inverse of permutation Direct_Permute WIP PermutedMatrixWindow redundant line Style fixes PR sagemath#35891: fix issue in src/sage/geometry/polyhedral_complex.py fix merging problems add type checks for parameters PR sagemath#35956: fix typo PR sagemath#35956: fix doctests fix another issue ...
SageMath version 10.1.beta8, Release Date: 2023-07-30 * tag '10.1.beta8': (13890 commits) Updated SageMath version to 10.1.beta8 remove multiple call of Vmatrix and Vmodule remove PGE and some listcomp get two entry directly tests passed Still permutation wip fix one issue fix fix typo store inverse of permutation Direct_Permute WIP PermutedMatrixWindow redundant line Style fixes PR sagemath#35891: fix issue in src/sage/geometry/polyhedral_complex.py fix merging problems add type checks for parameters PR sagemath#35956: fix typo PR sagemath#35956: fix doctests fix another issue ...
sagemathgh-40098: remove deprecation in `connected_components` With issue sagemath#35889 and PR sagemath#35891 we have deprecate sorting by default in connected component methods for graphs. This PR removes the deprecation and sets the default value of parameter `sort` to `False`. Hence, the vertices of a connected component are no longer sorted by default. We let unchanged the behavior of method `connected_components` of returning the list of connected components sorted by non-increasing size. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [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 and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#40098 Reported by: David Coudert Reviewer(s): Dima Pasechnik
sagemathgh-40098: remove deprecation in `connected_components` With issue sagemath#35889 and PR sagemath#35891 we have deprecate sorting by default in connected component methods for graphs. This PR removes the deprecation and sets the default value of parameter `sort` to `False`. Hence, the vertices of a connected component are no longer sorted by default. We let unchanged the behavior of method `connected_components` of returning the list of connected components sorted by non-increasing size. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [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 and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#40098 Reported by: David Coudert Reviewer(s): Dima Pasechnik
Fixes #35889.
📚 Description
We deprecate sorting by default in
connected_components
andconnected_component_containing_vertex
. The default value of parametersort
wasTrue
. We change it toNone
to identify calls when a deprecation warning is necessary. We also add parameterkey
so that users can define home made sorting rules.This deprecation is needed to avoid type errors when vertices have labels of incomparable type.
📝 Checklist
⌛ Dependencies