From 6bbc28e040e5eec3161bca2a8ffb94343a5038db Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Fri, 31 May 2024 10:36:35 +0900 Subject: [PATCH 1/5] Small amendments of coding style --- src/doc/en/developer/coding_basics.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/doc/en/developer/coding_basics.rst b/src/doc/en/developer/coding_basics.rst index 0855f04c5ec..5df54760b14 100644 --- a/src/doc/en/developer/coding_basics.rst +++ b/src/doc/en/developer/coding_basics.rst @@ -255,8 +255,8 @@ The top of each Sage code file should follow this format:: AUTHORS: - YOUR NAME (2005-01-03): initial version - - - person (date in ISO year-month-day format): short desc + - Alice Liddell (2024-05-31): added a method; cleaned docstrings + - Full name (year-month-day): short description """ @@ -341,9 +341,9 @@ information. You can use the existing functions of Sage as templates. The INPUT block describes all arguments that the function accepts. - 1. The type names should be descriptive, but do not have to represent - the exact Sage/Python types. For example, use "integer" for - anything that behaves like an integer, rather than ``int``. + 1. The type names should be descriptive, but do not have to represent the + exact Sage/Python types. For example, use "integer" for anything that + behaves like an integer, rather than ``int`` or ``Integer``. 2. Mention the default values of the input arguments when applicable. @@ -355,6 +355,8 @@ information. You can use the existing functions of Sage as templates. - ``p`` -- prime integer (default: `2`); coprime with ``n`` + - ``check`` -- (default: ``True``) specifies whether to check primality + The OUTPUT block describes the expected output. This is required if the one-sentence description of the function needs more explanation. From e38bc791cec921fe650d6e6ddb18c5f05ef94d46 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Fri, 31 May 2024 10:50:32 +0900 Subject: [PATCH 2/5] Put math as math --- src/doc/en/developer/coding_basics.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/en/developer/coding_basics.rst b/src/doc/en/developer/coding_basics.rst index 5df54760b14..5d10717166f 100644 --- a/src/doc/en/developer/coding_basics.rst +++ b/src/doc/en/developer/coding_basics.rst @@ -353,7 +353,7 @@ information. You can use the existing functions of Sage as templates. - ``n`` -- integer - - ``p`` -- prime integer (default: `2`); coprime with ``n`` + - ``p`` -- prime integer (default: `2`); coprime with `n` - ``check`` -- (default: ``True``) specifies whether to check primality From 3dde7177424573d89900fc32abbed1fdcef4804b Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sat, 1 Jun 2024 05:46:45 +0900 Subject: [PATCH 3/5] Reviewer suggestions --- src/doc/en/developer/coding_basics.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/doc/en/developer/coding_basics.rst b/src/doc/en/developer/coding_basics.rst index 5d10717166f..140f24608f3 100644 --- a/src/doc/en/developer/coding_basics.rst +++ b/src/doc/en/developer/coding_basics.rst @@ -254,14 +254,14 @@ The top of each Sage code file should follow this format:: AUTHORS: - - YOUR NAME (2005-01-03): initial version + - Your Name (2024-01-13): initial version - Alice Liddell (2024-05-31): added a method; cleaned docstrings - - Full name (year-month-day): short description + - Full name (YYYY-MM-DD): short description """ # **************************************************************************** - # Copyright (C) 2013 YOUR NAME + # Copyright (C) 2024 Your Name # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -343,7 +343,7 @@ information. You can use the existing functions of Sage as templates. 1. The type names should be descriptive, but do not have to represent the exact Sage/Python types. For example, use "integer" for anything that - behaves like an integer, rather than ``int`` or ``Integer``. + behaves like an integer, rather than "int" or "Integer". 2. Mention the default values of the input arguments when applicable. @@ -355,7 +355,9 @@ information. You can use the existing functions of Sage as templates. - ``p`` -- prime integer (default: `2`); coprime with `n` - - ``check`` -- (default: ``True``) specifies whether to check primality + - ``check`` -- boolean (default: ``True``); specifies whether to check for primality + + - ``algorithm`` -- (default: ``None``) the name of the algorithm to use The OUTPUT block describes the expected output. This is required if the one-sentence description of the function needs more explanation. From 9873f45582bf4951fe5983d23eb0958c3a22d8e7 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sat, 1 Jun 2024 05:56:34 +0900 Subject: [PATCH 4/5] Some omitted edits --- src/doc/en/developer/coding_basics.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/doc/en/developer/coding_basics.rst b/src/doc/en/developer/coding_basics.rst index 140f24608f3..0f442aa6bf7 100644 --- a/src/doc/en/developer/coding_basics.rst +++ b/src/doc/en/developer/coding_basics.rst @@ -657,12 +657,12 @@ indentation: INPUT: - - ``x`` -- integer (default: ``1``); the description of the + - ``x`` -- integer (default: `1`); the description of the argument ``x`` goes here. If it contains multiple lines, all the lines after the first need to begin at the same indentation as the backtick. - - ``y`` -- integer (default: ``2``); the description of the + - ``y`` -- integer (default: `2`); the description of the argument ``y`` OUTPUT: tuple; further description of the output @@ -673,7 +673,7 @@ indentation: sage: A = EuclideanSpace(2) sage: A.point(2, 3) - (32, 3) + (2, 3) We now ... :: @@ -690,7 +690,7 @@ indentation: .. NOTE:: This function uses :func:`pow` to determine the fifth - power of ``x``. + power of `x`. ... @@ -700,7 +700,7 @@ indentation: TESTS:: - sage: A.point(42, 0) # Check for corner case y = 0 + sage: A.point(42, 0) # check for corner case y = 0 ... """ From f4cb7cb9c9e64ca661a8434d0bdbb7f6f84ae90e Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 3 Jun 2024 08:48:25 +0900 Subject: [PATCH 5/5] Add string example --- src/doc/en/developer/coding_basics.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/doc/en/developer/coding_basics.rst b/src/doc/en/developer/coding_basics.rst index 0f442aa6bf7..5e15c4b2455 100644 --- a/src/doc/en/developer/coding_basics.rst +++ b/src/doc/en/developer/coding_basics.rst @@ -355,6 +355,8 @@ information. You can use the existing functions of Sage as templates. - ``p`` -- prime integer (default: `2`); coprime with `n` + - ``var`` -- string (default: ``'lambda'``) + - ``check`` -- boolean (default: ``True``); specifies whether to check for primality - ``algorithm`` -- (default: ``None``) the name of the algorithm to use