-
-
Notifications
You must be signed in to change notification settings - Fork 654
docstrings: large scale formatting #38155
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
docstrings: large scale formatting #38155
Conversation
@kwankyu you may like to keep an eye and make suggestions dynamically. |
cc151ff
to
5219d62
Compare
Documentation preview for this PR (built with commit 588fddb; changes) is ready! 🎉 |
sagemathgh-38401: Fix a bug in version selector of documentation <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> The version selector should work for 1. documentation in online sites 2. documentation in local sage install 3. standalone tree of the documentation (such as github action artifact doc.zip) The version selector javascript code works fine with the cases (1) and (2), but currently it fails with (3). Tested with doc.zip in https://github.com/sagemath/sage/actions/runs/10032161715 ### 📝 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. - [ ] 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#38401 Reported by: Kwankyu Lee Reviewer(s): Matthias Köppe
sagemathgh-38402: Add announcement banner for push to develop <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> motivated by spurious diffs seen in https://doc-pr-38402-- sagemath.netlify.app/changes These diffs can be avoided by adding announcement banner for any push to develop, regardless of stable or unstable releases. Tested in: https://doc-develop--sagemath-test.netlify.app/html/en/ ### 📝 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#38402 Reported by: Kwankyu Lee Reviewer(s): Matthias Köppe
sagemathgh-38407: Fix typos and outdated links in `igraph_graph()` docs <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> This PR simply fixes typos and updates broken links in the documentation here: https://doc.sagemath.org/html/en/reference/graphs/sage/graphs/gene ric_graph.html#sage.graphs.generic_graph.GenericGraph.igraph_graph ### 📝 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. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [x] 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#38407 Reported by: Szabolcs Horvát Reviewer(s): Matthias Köppe
This fixes two layout errors in the documentation. ##### Before  ##### After  ##### Before  ##### After  URL: sagemath#38408 Reported by: Julian Rüth Reviewer(s): Matthias Köppe
…e_after_doubledash
…e_after_doubledash
Documentation doesn't build
|
Fix diff --git a/src/sage/rings/finite_rings/integer_mod.pyx b/src/sage/rings/finite_rings/integer_mod.pyx
index 50eef256b70..0b220e81a1e 100644
--- a/src/sage/rings/finite_rings/integer_mod.pyx
+++ b/src/sage/rings/finite_rings/integer_mod.pyx
@@ -652,14 +652,13 @@ cdef class IntegerMod_abstract(FiniteRingElement):
``R.multiplicative_generator()`` is used, where
``R`` is the parent of ``self``.
- - ``order`` -- integer (unused), the order of ``b``.
+ - ``order`` -- integer (unused), the order of ``b``.
This argument is normally unused, only there for
coherence of apis with finite field elements.
- ``check`` -- boolean (default: ``False``); if set,
test whether the given ``order`` is correct
-
OUTPUT:
Integer `x` such that `b^x = a`, if this exists; a :exc:`ValueError` |
Documentation builds now. |
sagemathgh-38155: docstrings: large scale formatting Large scale formatting of the docstrings in accordance with the [Developer Guide](https://doc.sagemath.org/html/en/developer/coding_basics.html). The changes are done by applying `regex` rules followed by manual checks and edits. The commits will be kept in manageable sizes (of ~100 changed files). Similar preceding PR: sagemath#38145. ### Changes - `True`, `False`, `None`, `self` to ` ``True`` `, ` ``False`` `, ` ``None`` `, ` ``self`` ` - `- arg (type, default: val) -- description` to `- ``arg`` -- type (default: val); description` - First docstring sentences: enforce prescriptive form of initial verb and add missing full stops - Remove full stops from single-sentence `INPUT` argument descriptions - One-line `OUTPUT`s for short output descriptions - More math (`<math>` to `` `<math>` `` and ` ``<math>`` ` to `` `<math>` `` ) - Remove redundant whitespace ### Extra changes (not reflected in the Guide) - `non-negative`, `non-zero`, `non-positive` to `nonnegative`, `nonzero`, `nonpositive` - `"<string>"` to `'<string>'` ### Partial reviews by commit - [x] 01. 5219d62 (reviewer: @kwankyu) - [x] 02. 37fe9ec (reviewer: @davidlowryduda) - [x] 03. 1ed6ea5 (reviewer: @davidlowryduda) - [x] 04. a6b0382 (reviewer: @davidlowryduda) - [x] 05. c284b26 (reviewer: @davidlowryduda) - [x] 06. 021184a (reviewer: @davidlowryduda) - [x] 07. 713e80d (reviewer: @davidlowryduda) - [x] 08. 53ea68f (reviewer: @davidlowryduda) - [x] 09. 198e7ea (stash) - [x] 10. f8b7351 (merge) - [x] 11. 14a3682 (reviewer: @kwankyu) - [x] 12. 9eab12f (reviewer: @kwankyu) - [x] 13. 6c70e9e (reviewer: @kwankyu) - [x] 14. c9f4492 (reviewer: @kwankyu) - [x] 15. ad120b6 (merge) - [x] 16. 75b4801 (reviewer: @kwankyu) - [x] 17. 6922a4c (reviewer: @kwankyu) - [x] 18. 0716b41 (reviewer: @kwankyu) - [x] 19. 5f652ff (reviewer: @kwankyu) - [x] 20. f0445a3 (reviewer: @kwankyu) - [x] 21. 114c977 (reviewer: @kwankyu) - [x] 22. 068ba37 (reviewer: @davidlowryduda) - [x] 23. b0f1279 (reviewer: @kwankyu) - [x] 24. 03a7b01 (reviewer: @davidlowryduda) - [x] 25. db885d1 (reviewer: @kwankyu) - [x] 26. 33550bd (reviewer: @kwankyu) - [x] 27. d41de45 (reviewer: @kwankyu) - [x] 28. a2e9564 (reviewer: @kwankyu) - [x] 29. c0080c6 (reviewer: @kwankyu) - [x] 30. a049e61 (reviewer: @davidlowryduda) - [x] 31. 22e43fd (reviewer: @kwankyu) - [x] 32. 19b9da5 (reviewer: @kwankyu) - [x] 33. e2b4155 (reviewer: @kwankyu) - [x] 34. fa498ef (reviewer: @kwankyu) - [x] 35. 5adb22a (reviewer: @kwankyu) - [x] 36. 5410d08 (reviewer: @kwankyu) - [x] 37. d29c4ed (reviewer: @kwankyu) - [x] 38. babffff (reviewer: @kwankyu) - [x] 39. 16c9892 (reviewer: @kwankyu) - [x] 40. 055b9cf (reviewer: @kwankyu) - [x] 41. b6d2649 (reviewer: @kwankyu) - [x] 42. 9c9ec6d (reviewer: @kwankyu) - [x] 43. dc17b6c (reviewer: @kwankyu) - [x] 44. 629d9c2 (reviewer: @kwankyu) - [x] 45. 60fc897 (reviewer: @kwankyu) - [x] 46. 0b60f4f (reviewer: @kwankyu) - [x] 47. 1669486 (reviewer: @kwankyu) - [x] 48. aaf8cc8 (reviewer: @kwankyu) - [x] 49. d7d1ce3 (reviewer: @kwankyu) - [x] 50. e5b7753 (reviewer: @kwankyu) - [x] 51. 3e0473a (reviewer: @kwankyu) - [x] 52. ae07ccc (reviewer: @kwankyu) - [x] 53. 0995121 (merge) - [x] 54. 6b3aeff (reviewer: @kwankyu) - [x] 55. 6d8aa62 (reviewer: @kwankyu) - [x] 56. db6bec5 (reviewer: @kwankyu) - [x] 57. 75abe85 (reviewer: @kwankyu) - [x] 58. 7abd33c (reviewer: @kwankyu) - [x] 59. 07dd3f3 (reviewer: @kwankyu) - [x] 60. eb1f83b (reviewer: @kwankyu) - [x] 61. 61956fd (reviewer: @kwankyu) - [x] 62. 5696a97 (reviewer: @kwankyu) - [x] 63. b6ee3a2 (merge) - [x] 64. 53dad87 (reviewer: @kwankyu) - [x] 65. 032518d (reviewer: @kwankyu) - [x] 66. d97c1c7 (reviewer: @kwankyu) - [x] 67. f55ced3 (reviewer: @kwankyu) - [x] 68. 53aa5f0 (reviewer: @kwankyu) - [x] 69. be0d4dc (reviewer: @kwankyu) - [x] 70. 7ab69d4 (reviewer: @kwankyu) - [x] 71. 7754584 (reviewer: @kwankyu) - [x] 72. 6964c2f (reviewer: @kwankyu) - [x] 73. d176a3e (reviewer: @kwankyu) - [x] 74. 554d014 (reviewer: @kwankyu) - [x] 75. 6f1efc4 (reviewer: @kwankyu) - [x] 76. 4b8708e (reviewer: @kwankyu) - [x] 77. c8f546f (reviewer: @kwankyu) - [x] 78. d4a3ce9 (reviewer: @kwankyu) - [x] 79. 8f00496 (reviewer: @kwankyu) - [x] 80. 56f8390 (merge) - [x] 81. 41893fd (reviewer: @kwankyu) - [x] 82. d1c6631 (reviewer: @kwankyu) - [x] 83. 884363e (reviewer: @kwankyu) - [x] 84. 7162abb (reviewer: @kwankyu) - [x] 85. cbb9326 (merge) - [x] 86. 398226f (reviewer: @kwankyu) - [x] 87. 06c897c (merge) - [x] 88. 9456ded (merge) - [x] 89. 4d8caaa (merge) - [x] 90. 02e5da6 (merge) - [x] 91. beeb935 (lint) - [x] 92. f278392 (preemptive merge) - [x] 93. 588fddb (reviewer: @kwankyu) URL: sagemath#38155 Reported by: gmou3 Reviewer(s): David Lowry-Duda, Kwankyu Lee
sagemathgh-38155: docstrings: large scale formatting Large scale formatting of the docstrings in accordance with the [Developer Guide](https://doc.sagemath.org/html/en/developer/coding_basics.html). The changes are done by applying `regex` rules followed by manual checks and edits. The commits will be kept in manageable sizes (of ~100 changed files). Similar preceding PR: sagemath#38145. ### Changes - `True`, `False`, `None`, `self` to ` ``True`` `, ` ``False`` `, ` ``None`` `, ` ``self`` ` - `- arg (type, default: val) -- description` to `- ``arg`` -- type (default: val); description` - First docstring sentences: enforce prescriptive form of initial verb and add missing full stops - Remove full stops from single-sentence `INPUT` argument descriptions - One-line `OUTPUT`s for short output descriptions - More math (`<math>` to `` `<math>` `` and ` ``<math>`` ` to `` `<math>` `` ) - Remove redundant whitespace ### Extra changes (not reflected in the Guide) - `non-negative`, `non-zero`, `non-positive` to `nonnegative`, `nonzero`, `nonpositive` - `"<string>"` to `'<string>'` ### Partial reviews by commit - [x] 01. 5219d62 (reviewer: @kwankyu) - [x] 02. 37fe9ec (reviewer: @davidlowryduda) - [x] 03. 1ed6ea5 (reviewer: @davidlowryduda) - [x] 04. a6b0382 (reviewer: @davidlowryduda) - [x] 05. c284b26 (reviewer: @davidlowryduda) - [x] 06. 021184a (reviewer: @davidlowryduda) - [x] 07. 713e80d (reviewer: @davidlowryduda) - [x] 08. 53ea68f (reviewer: @davidlowryduda) - [x] 09. 198e7ea (stash) - [x] 10. f8b7351 (merge) - [x] 11. 14a3682 (reviewer: @kwankyu) - [x] 12. 9eab12f (reviewer: @kwankyu) - [x] 13. 6c70e9e (reviewer: @kwankyu) - [x] 14. c9f4492 (reviewer: @kwankyu) - [x] 15. ad120b6 (merge) - [x] 16. 75b4801 (reviewer: @kwankyu) - [x] 17. 6922a4c (reviewer: @kwankyu) - [x] 18. 0716b41 (reviewer: @kwankyu) - [x] 19. 5f652ff (reviewer: @kwankyu) - [x] 20. f0445a3 (reviewer: @kwankyu) - [x] 21. 114c977 (reviewer: @kwankyu) - [x] 22. 068ba37 (reviewer: @davidlowryduda) - [x] 23. b0f1279 (reviewer: @kwankyu) - [x] 24. 03a7b01 (reviewer: @davidlowryduda) - [x] 25. db885d1 (reviewer: @kwankyu) - [x] 26. 33550bd (reviewer: @kwankyu) - [x] 27. d41de45 (reviewer: @kwankyu) - [x] 28. a2e9564 (reviewer: @kwankyu) - [x] 29. c0080c6 (reviewer: @kwankyu) - [x] 30. a049e61 (reviewer: @davidlowryduda) - [x] 31. 22e43fd (reviewer: @kwankyu) - [x] 32. 19b9da5 (reviewer: @kwankyu) - [x] 33. e2b4155 (reviewer: @kwankyu) - [x] 34. fa498ef (reviewer: @kwankyu) - [x] 35. 5adb22a (reviewer: @kwankyu) - [x] 36. 5410d08 (reviewer: @kwankyu) - [x] 37. d29c4ed (reviewer: @kwankyu) - [x] 38. babffff (reviewer: @kwankyu) - [x] 39. 16c9892 (reviewer: @kwankyu) - [x] 40. 055b9cf (reviewer: @kwankyu) - [x] 41. b6d2649 (reviewer: @kwankyu) - [x] 42. 9c9ec6d (reviewer: @kwankyu) - [x] 43. dc17b6c (reviewer: @kwankyu) - [x] 44. 629d9c2 (reviewer: @kwankyu) - [x] 45. 60fc897 (reviewer: @kwankyu) - [x] 46. 0b60f4f (reviewer: @kwankyu) - [x] 47. 1669486 (reviewer: @kwankyu) - [x] 48. aaf8cc8 (reviewer: @kwankyu) - [x] 49. d7d1ce3 (reviewer: @kwankyu) - [x] 50. e5b7753 (reviewer: @kwankyu) - [x] 51. 3e0473a (reviewer: @kwankyu) - [x] 52. ae07ccc (reviewer: @kwankyu) - [x] 53. 0995121 (merge) - [x] 54. 6b3aeff (reviewer: @kwankyu) - [x] 55. 6d8aa62 (reviewer: @kwankyu) - [x] 56. db6bec5 (reviewer: @kwankyu) - [x] 57. 75abe85 (reviewer: @kwankyu) - [x] 58. 7abd33c (reviewer: @kwankyu) - [x] 59. 07dd3f3 (reviewer: @kwankyu) - [x] 60. eb1f83b (reviewer: @kwankyu) - [x] 61. 61956fd (reviewer: @kwankyu) - [x] 62. 5696a97 (reviewer: @kwankyu) - [x] 63. b6ee3a2 (merge) - [x] 64. 53dad87 (reviewer: @kwankyu) - [x] 65. 032518d (reviewer: @kwankyu) - [x] 66. d97c1c7 (reviewer: @kwankyu) - [x] 67. f55ced3 (reviewer: @kwankyu) - [x] 68. 53aa5f0 (reviewer: @kwankyu) - [x] 69. be0d4dc (reviewer: @kwankyu) - [x] 70. 7ab69d4 (reviewer: @kwankyu) - [x] 71. 7754584 (reviewer: @kwankyu) - [x] 72. 6964c2f (reviewer: @kwankyu) - [x] 73. d176a3e (reviewer: @kwankyu) - [x] 74. 554d014 (reviewer: @kwankyu) - [x] 75. 6f1efc4 (reviewer: @kwankyu) - [x] 76. 4b8708e (reviewer: @kwankyu) - [x] 77. c8f546f (reviewer: @kwankyu) - [x] 78. d4a3ce9 (reviewer: @kwankyu) - [x] 79. 8f00496 (reviewer: @kwankyu) - [x] 80. 56f8390 (merge) - [x] 81. 41893fd (reviewer: @kwankyu) - [x] 82. d1c6631 (reviewer: @kwankyu) - [x] 83. 884363e (reviewer: @kwankyu) - [x] 84. 7162abb (reviewer: @kwankyu) - [x] 85. cbb9326 (merge) - [x] 86. 398226f (reviewer: @kwankyu) - [x] 87. 06c897c (merge) - [x] 88. 9456ded (merge) - [x] 89. 4d8caaa (merge) - [x] 90. 02e5da6 (merge) - [x] 91. beeb935 (lint) - [x] 92. f278392 (preemptive merge) - [x] 93. 588fddb (reviewer: @kwankyu) URL: sagemath#38155 Reported by: gmou3 Reviewer(s): David Lowry-Duda, Kwankyu Lee
This pull request changes file permissions to executable for no apparent reason. Should we revert?
|
That's weird. You can open a PR to give more details and revert the permissions if you like. Running |
sagemathgh-39149: Remove executable flags from many Python files For some reason many files are set to be executable. (Presumably some developer `git clone` sage on some NTFS-based file system or otherwise don't have proper permissions) Some of the changes was previously seen in sagemath#38155 or https://github.com/sagema th/sage/commit/c24e07df70ad46cae0f6a2f58778a90dbb843e05, which has nothing to do with executable. On the other hand some files looks like they can rightfully be executable (because they have the `#!`): ext_data/pari/dokchitser/testall and ext_data/nbconvert/postprocess.py . These files are kept as is. Moving forward… it might be good idea to have something run on the CI to check only files with `#!` or PE executable have executable flag. ### 📝 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. ### ⌛ 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#39149 Reported by: user202729 Reviewer(s):
sagemathgh-39149: Remove executable flags from many Python files For some reason many files are set to be executable. (Presumably some developer `git clone` sage on some NTFS-based file system or otherwise don't have proper permissions) Some of the changes was previously seen in sagemath#38155 or https://github.com/sagema th/sage/commit/c24e07df70ad46cae0f6a2f58778a90dbb843e05, which has nothing to do with executable. On the other hand some files looks like they can rightfully be executable (because they have the `#!`): ext_data/pari/dokchitser/testall and ext_data/nbconvert/postprocess.py . These files are kept as is. Moving forward… it might be good idea to have something run on the CI to check only files with `#!` or PE executable have executable flag. ### 📝 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. ### ⌛ 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#39149 Reported by: user202729 Reviewer(s):
Large scale formatting of the docstrings in accordance with the Developer Guide.
The changes are done by applying
regex
rules followed by manual checks and edits.The commits will be kept in manageable sizes (of ~100 changed files).
Similar preceding PR: #38145.
Changes
True
,False
,None
,self
to``True``
,``False``
,``None``
,``self``
- arg (type, default: val) -- description
to- ``arg`` -- type (default: val); description
INPUT
argument descriptionsOUTPUT
s for short output descriptions<math>
to`<math>`
and``<math>``
to`<math>`
)Extra changes (not reflected in the Guide)
non-negative
,non-zero
,non-positive
tononnegative
,nonzero
,nonpositive
"<string>"
to'<string>'
Partial reviews by commit