Differences between revisions 4 and 16 (spanning 12 versions)
Revision 4 as of 2020-02-15 16:23:07
Size: 2847
Editor: chapoton
Comment:
Revision 16 as of 2021-10-29 17:10:49
Size: 3760
Editor: tmonteil
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from plugins
{{{
┌─┬──────┐
│░│ ⊙ ʘ │
│░│ │
│░│ ──── │
╘═╧══════╛
}}}
Line 11: Line 19:
The coverage is the percent of functions that are doctested. This must be 100%.
Line 15: Line 25:
This detects the presence of the encoding line at the top of files. This detects the presence of the encoding line at the top of files. (TO BE REMOVED)
Line 19: Line 29:
Check that doctest continuation use the correct syntax, namely `....:` Check that doctest continuation use the correct syntax, namely {{{....:}}}
Line 25: Line 35:
This means '\choose', '\over', '\atop', '\above', '\overwithdelims', '\atopwithdelims', '\abovewithdelims'. This means {{{\choose, \over, \atop, \above, \overwithdelims, \atopwithdelims, \abovewithdelims}}}.
Line 27: Line 37:
== oldstyle_print == All these commands are obsolete in latex.
Line 29: Line 39:
Check that print is using python 3 syntax. (TO BE REMOVED) == deprecation_number ==

Check that new deprecations use the correct ticket number.
Line 35: Line 47:
0) xrange 0) {{{xrange}}}
Line 37: Line 49:
1) .iterkeys, .itervalues, .iteritems 1) {{{.iterkeys, .itervalues, .iteritems}}}
Line 39: Line 51:
2) basestring 2) {{{basestring}}}
Line 41: Line 53:
3) __nonzero__ 3) {{{__nonzero__}}}
Line 49: Line 61:
0) "import six" and "from six import" 0) {{{import six}}} and {{{from six import}}}

Never ever import anything from "six" in a Cython file.
Line 55: Line 69:
2) ifilter, imap, izip 2) {{{ifilter, imap, izip}}}
Line 57: Line 71:
3) raise statements 3) {{{raise statements}}}
Line 59: Line 73:
4) cmp 4) {{{cmp}}} (use {{{richcmp}}} for comparison)
Line 61: Line 75:
6) <> 6) {{{<>}}} (the correct syntax is {{{!=}}})
Line 63: Line 77:
7) <type '[a-z]*'> (no longer needed) 7) {{{<type '[a-z]*'>}}}
Line 65: Line 79:
8) next 8) {{{next}}}
Line 67: Line 81:
9) __metaclass__ 9) {{{__metaclass__}}}
Line 69: Line 83:
10) except Exception, var 10) {{{except Exception, var}}}
Line 71: Line 85:
11) apply 11) {{{apply}}}
Line 73: Line 87:
12) sagenb 12) {{{sagenb}}} (the legacy notebook is deprecated)
Line 77: Line 91:
Run pyflakes on the modified .py files. Run `pyflakes` on the modified `.py` files.
Line 79: Line 93:
This typically reports about unused variables or imports. This typically reports about unused variables or imports, that you should remove.
Line 85: Line 99:
Run ``pycodestyle --select=...`` on the modified .py files. Run `pycodestyle` on the modified `.py` files.
Line 87: Line 101:
Currently, the selected options ae W605, E401, E701, E702. Currently, the selected options are {{{W605, E401, E701, E702, E711, E712}}}.
Line 89: Line 103:
See [http://pycodestyle.pycqa.org/en/latest/intro.html#error-codes] for more information. See [[http://pycodestyle.pycqa.org/en/latest/intro.html#error-codes|pycodestyle documentation]] for more information.
Line 93: Line 107:
Perform various check, mainly about blocks in the documentation. Perform various checks, mainly about blocks in the documentation.
Line 95: Line 109:
1) correct syntax is .. SEEALSO:: 1) correct syntax is {{{.. SEEALSO::}}}
Line 97: Line 111:
2) TESTS and EXAMPLES should be plural, and NOTE singular 2) {{{TESTS}}} and {{{EXAMPLES}}} should be plural, and {{{NOTE}}} singular
Line 99: Line 113:
3) no :: after INPUT and OUTPUT blocks, only a single colon 3) no {{{::}}} after {{{INPUT}}} and {{{OUTPUT}}} blocks, only a single colon
Line 101: Line 115:
4) no :: after REFERENCE blocks, only a single colon 4) no {{{::}}} after {{{REFERENCE}}} blocks, only a single colon
Line 103: Line 117:
5) no " :" at the end of lines, as the colon should not be preceded by a space 5) no {{{ :}}} at the end of lines, namely the colon should not be preceded by a space
Line 105: Line 119:
6) no "Returns" at the start of lines, but "Return" 6) no {{{Returns}}} at the start of lines, but {{{Return}}} for the first line (short summary) or {{{This returns}}} otherwise
Line 109: Line 123:
Look for the presence of triple colons `:::` or `: ::`. Look for the presence of triple colons {{{:::}}} or {{{: ::}}}
Line 113: Line 127:
Look for the presence of badly formatted trac roles ``:trac:``, missing the initial colon. Look for the presence of badly formatted trac roles {{{:trac:}}}

The correct syntax is {{{
:trac:`23456`}}}
Line 119: Line 135:
This performs a statistical analysis. This performs a statistical analysis, which is not always pertinent.
Line 129: Line 145:
This is mandatory. Any failure will prevent the ticket to be merged.
Line 137: Line 155:
Not clear ? The aim of this plugin is not clear.

┌─┬──────┐
│░│ ⊙  ʘ │
│░│      │
│░│ ──── │
╘═╧══════╛

explanations on the patchbot plugins

commit_messages

Check for the existence of a commit message for every commit.

coverage

Try to check that coverage did increase.

The coverage is the percent of functions that are doctested. This must be 100%.

non_ascii

Look for the presence of non-ascii characters in python and cython files.

This detects the presence of the encoding line at the top of files. (TO BE REMOVED)

doctest_continuation

Check that doctest continuation use the correct syntax, namely ....:

foreign_latex

Check that some bad latex code does not appear.

This means \choose, \over, \atop, \above, \overwithdelims, \atopwithdelims, \abovewithdelims.

All these commands are obsolete in latex.

deprecation_number

Check that new deprecations use the correct ticket number.

python3_py

Look for some wrong patterns in python or rst files.

0) xrange

1) .iterkeys, .itervalues, .iteritems

2) basestring

3) __nonzero__

These are not allowed in python 3. (TO BE REMOVED)

python3_pyx

Look for some wrong patterns in cython files.

0) import six and from six import

Never ever import anything from "six" in a Cython file.

python3

Check that some python3 incompatible code does not appear. (TO BE REMOVED)

2) ifilter, imap, izip

3) raise statements

4) cmp (use richcmp for comparison)

6) <> (the correct syntax is !=)

7) <type '[a-z]*'>

8) next

9) __metaclass__

10) except Exception, var

11) apply

12) sagenb (the legacy notebook is deprecated)

pyflakes

Run pyflakes on the modified .py files.

This typically reports about unused variables or imports, that you should remove.

Sometimes it gives false-positive warnings.

pycodestyle

Run pycodestyle on the modified .py files.

Currently, the selected options are W605, E401, E701, E702, E711, E712.

See pycodestyle documentation for more information.

blocks

Perform various checks, mainly about blocks in the documentation.

1) correct syntax is .. SEEALSO::

2) TESTS and EXAMPLES should be plural, and NOTE singular

3) no :: after INPUT and OUTPUT blocks, only a single colon

4) no :: after REFERENCE blocks, only a single colon

5) no  : at the end of lines, namely the colon should not be preceded by a space

6) no Returns at the start of lines, but Return for the first line (short summary) or This returns otherwise

triple_colon

Look for the presence of triple colons ::: or : ::

Look for the presence of badly formatted trac roles :trac:

The correct syntax is :trac:`23456`

startup_time

Try to decide if the startup time is getting worse.

This performs a statistical analysis, which is not always pertinent.

startup_modules

Count modules imported at startup, and compare to stored data to see if this has increased.

docbuild

Build the html documentation.

This is mandatory. Any failure will prevent the ticket to be merged.

docbuild_pdf

Build the pdf documentation.

This is not activated by default on the patchbot clients.

git_rev_list

The aim of this plugin is not clear.