Differences between revisions 1 and 11 (spanning 10 versions)
Revision 1 as of 2012-01-06 00:56:22
Size: 1092
Comment:
Revision 11 as of 2023-02-23 20:15:26
Size: 2428
Editor: mkoeppe
Comment: remove Trac info
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
This is a checklist that can be consulted when reviewing a patch. = Review Checklist =

This is a checklist that can be consulted when authoring or reviewing a ticket.

== Read the ticket ==

 * Most im
portantly, have a look at the ticket and see what it does.
Line 5: Line 11:
 * The patch should apply cleanly on top of the latest [[http://sagemath.org/download-latest.html|development release]].
 * There should be no trailing whitespace on any line touched by the patch.
 * The patch should be generated by Mercurial and have a sensible commit message.
 * `make ptestlong` should pass with the patch applied.
 * Run an interactive sage session, and manually exercise the affected code.
 * The ticket should apply cleanly on top of the latest [[https://www.sagemath.org/download-latest.html|development release]].
 * There should be no trailing whitespace on any line touched by the ticket.
 * The commits should have a sensible commit message.
 * `make ptestlong` should pass with the ticket applied.
 * If the ticket could impact any optional packages or tests, install those optional packages and run the optional tests using {{{sage -t -only_optional=package}}}. See #6329 for what *not* to do
.
 * Run an interactive sage session, and manually exercise the affected code.  Try in particular some corner cases or stuff not mentioned in the EXAMPLES section.
Line 13: Line 20:
 * Run `sage -docbuild reference html` to rebuild the reference docs. View any affected pages.  * Documentation should be formatted according to the [[https://doc.sagemath.org/html/en/developer/coding_basics.html|developer's guide]].
 * Run `sage --docbuild reference html` to rebuild the reference docs. View any affected pages. You can use the extra option `--warn-links` as in `sage --docbuild --warn-links reference html` to see if all links are properly resolved.
Line 15: Line 23:
 * All variables in documentation should be enclosed in backticks.  * All variables in documentation should be enclosed in backticks (for example {{{`x`}}}).
Line 20: Line 28:
 * If the patch fixes a trac ticket, the ticket number should be mentioned in the doctest.  * If the ticket fixes a defect, there should be a doctest checking that the defect is fixed, and the comment should mention the trac ticket number. You can use the special sphinx markup {{{:trac:`12314`}}} for that.
 * Add a {{{TESTS::}}} section to test corner cases or (for a bugfix ticket) cases fixed by the ticket.
 * Also doctest exceptions. For example, when writing a function for division, test that dividing by zero yields a reasonable exception (as opposed to a crash of Sage).
Line 24: Line 34:
 * '''All''' new functions must have INPUT, OUTPUT, EXAMPLES, and TESTS sections.  * ''All'' new functions should have {{{INPUT:}}}, {{{OUTPUT:}}}, {{{EXAMPLES::}}}, and {{{TESTS::}}} sections where applicable. `.. SEEALSO::` section is highly recommended.
 * New files should have a heading as shown in the [[https://doc.sagemath.org/html/en/developer/coding_basics.html|developer's guide]].

Review Checklist

This is a checklist that can be consulted when authoring or reviewing a ticket.

Read the ticket

  • Most importantly, have a look at the ticket and see what it does.

General

  • The ticket should apply cleanly on top of the latest development release.

  • There should be no trailing whitespace on any line touched by the ticket.
  • The commits should have a sensible commit message.
  • make ptestlong should pass with the ticket applied.

  • If the ticket could impact any optional packages or tests, install those optional packages and run the optional tests using sage -t -only_optional=package. See #6329 for what *not* to do.

  • Run an interactive sage session, and manually exercise the affected code. Try in particular some corner cases or stuff not mentioned in the EXAMPLES section.

Documentation

  • Documentation should be formatted according to the developer's guide.

  • Run sage --docbuild reference html to rebuild the reference docs. View any affected pages. You can use the extra option --warn-links as in sage --docbuild --warn-links reference html to see if all links are properly resolved.

  • View affected documentation from within a sage session.
  • All variables in documentation should be enclosed in backticks (for example `x`).

Doctests

  • All new code should be doctested. Use sage --coverageall to make sure the doctest coverage has not gone down.

  • If the ticket fixes a defect, there should be a doctest checking that the defect is fixed, and the comment should mention the trac ticket number. You can use the special sphinx markup :trac:`12314` for that.

  • Add a TESTS:: section to test corner cases or (for a bugfix ticket) cases fixed by the ticket.

  • Also doctest exceptions. For example, when writing a function for division, test that dividing by zero yields a reasonable exception (as opposed to a crash of Sage).

New Functions

  • All new functions should have INPUT:, OUTPUT:, EXAMPLES::, and TESTS:: sections where applicable. .. SEEALSO:: section is highly recommended.

  • New files should have a heading as shown in the developer's guide.

ReviewChecklist (last edited 2023-02-23 20:15:26 by mkoeppe)