Mercurial > p > roundup > code
annotate scripts/README.txt @ 7752:b2dbab2b34bc
fix(refactor): multiple fixups using ruff linter; more testing.
Converting to using the ruff linter and its rulesets. Fixed a number
of issues.
admin.py:
sort imports
use immutable tuples as default value markers for parameters where a
None value is valid.
reduced some loops to list comprehensions for performance
used ternary to simplify some if statements
named some variables to make them less magic
(e.g. _default_savepoint_setting = 1000)
fixed some tests for argument counts < 2 becomes != 2 so 3 is an
error.
moved exception handlers outside of loops for performance where
exception handler will abort loop anyway.
renamed variables called 'id' or 'dir' as they shadow builtin
commands.
fix translations of form _("string %s" % value) -> _("string %s") %
value so translation will be looked up with the key before
substitution.
end dicts, tuples with a trailing comma to reduce missing comma
errors if modified
simplified sorted(list(self.setting.keys())) to
sorted(self.setting.keys()) as sorted consumes whole list.
in if conditions put compared variable on left and threshold condition
on right. (no yoda conditions)
multiple noqa: suppression
removed unneeded noqa as lint rulesets are a bit different
do_get - refactor output printing logic: Use fast return if not
special formatting is requested; use isinstance with a tuple
rather than two isinstance calls; cleaned up flow and removed
comments on algorithm as it can be easily read from the code.
do_filter, do_find - refactor output printing logic. Reduce
duplicate code.
do_find - renamed variable 'value' that was set inside a loop. The
loop index variable was also named 'value'.
do_pragma - added hint to use list subcommand if setting was not
found. Replaced condition 'type(x) is bool' with 'isinstance(x,
bool)' for various types.
test_admin.py
added testing for do_list
better test coverage for do_get includes: -S and -d for multilinks,
error case for -d with non-link.
better testing for do_find including all output modes
better testing for do_filter including all output modes
fixed expected output for do_pragma that now includes hint to use
pragma list if setting not found.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Fri, 01 Mar 2024 14:53:18 -0500 |
| parents | 8d9a6063cb22 |
| children |
| rev | line source |
|---|---|
|
1647
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
1 Scripts in this directory: |
|
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
2 |
|
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
3 add-issue |
|
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
4 Add a single issue, as specified on the command line, to your tracker. The |
|
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
5 initial message for the issue is taken from standard input. |
|
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
6 |
|
6473
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
7 copy-user.py |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
8 Copy one or more Roundup users from one tracker instance to another. |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
9 |
|
6571
cd408eb748dd
Add small utility script for dumping dbm based databases.
John Rouillard <rouilj@ieee.org>
parents:
6553
diff
changeset
|
10 dump_dbm_sessions_db.py |
|
cd408eb748dd
Add small utility script for dumping dbm based databases.
John Rouillard <rouilj@ieee.org>
parents:
6553
diff
changeset
|
11 Simple script to dump a session style dbm database e.g. db/otks or |
|
cd408eb748dd
Add small utility script for dumping dbm based databases.
John Rouillard <rouilj@ieee.org>
parents:
6553
diff
changeset
|
12 db/sessions in readable form. |
|
cd408eb748dd
Add small utility script for dumping dbm based databases.
John Rouillard <rouilj@ieee.org>
parents:
6553
diff
changeset
|
13 |
|
6473
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
14 imapServer.py |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
15 This IMAP server script that runs in the background and checks for new |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
16 email from a variety of mailboxes. |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
17 |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
18 import_sf.py |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
19 Import tracker data from Sourceforge.NET into a new roundup instance. |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
20 |
|
1647
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
21 roundup-reminder |
|
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
22 Generate an email that lists outstanding issues. Send in both plain text |
|
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
23 and HTML formats. |
|
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
24 |
|
6473
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
25 schema_diagram.py |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
26 Generate a schema diagram for a roundup tracker. It generates a 'dot file' |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
27 that is then fed into the 'dot' tool (http://www.graphviz.org) to generate |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
28 a graph. |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
29 |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
30 schema-dump.py |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
31 Use recently documented XML-RPC API to dump Roundup data schema in |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
32 human readable form. |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
33 |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
34 spam-remover |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
35 Remove file attachment spam from a tracker. (Warning destructive, |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
36 read script well.) |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
37 |
|
6553
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
38 stats.xmlrpc.py |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
39 Script using the xmlrpc interface to retrieve info. Generates report |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
40 on what values are used by the various issues on bugs.python.org. |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
41 |
|
3764
7f0c63868fa9
add new script
Richard Jones <richard@users.sourceforge.net>
parents:
3176
diff
changeset
|
42 weekly-report |
|
7f0c63868fa9
add new script
Richard Jones <richard@users.sourceforge.net>
parents:
3176
diff
changeset
|
43 Generate a simple report outlining the activity in one tracker for the |
|
7f0c63868fa9
add new script
Richard Jones <richard@users.sourceforge.net>
parents:
3176
diff
changeset
|
44 most recent week. |
|
7f0c63868fa9
add new script
Richard Jones <richard@users.sourceforge.net>
parents:
3176
diff
changeset
|
45 |
|
6473
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
46 ---- |
|
1647
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
47 |
|
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
48 server-ctl |
|
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
49 Control the roundup-server daemon from the command line with start, stop, |
|
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
50 restart, condstart (conditional start - only if server is stopped) and |
|
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
51 status commands. |
|
73bf927091c7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
52 |
|
1841
24fb163ddece
added Debian rc script
Richard Jones <richard@users.sourceforge.net>
parents:
1647
diff
changeset
|
53 roundup.rc-debian |
|
24fb163ddece
added Debian rc script
Richard Jones <richard@users.sourceforge.net>
parents:
1647
diff
changeset
|
54 An control script that may be installed in /etc/init.d on Debian systems. |
|
24fb163ddece
added Debian rc script
Richard Jones <richard@users.sourceforge.net>
parents:
1647
diff
changeset
|
55 Offers start, stop and restart commands and integrates with the Debian |
|
24fb163ddece
added Debian rc script
Richard Jones <richard@users.sourceforge.net>
parents:
1647
diff
changeset
|
56 init process. |
|
24fb163ddece
added Debian rc script
Richard Jones <richard@users.sourceforge.net>
parents:
1647
diff
changeset
|
57 |
|
6473
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
58 |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
59 systemd.gunicorn |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
60 A systemd unit file for running roundup under gnuicorn WSGI server. |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
61 |
|
7655dae061b8
Document missing files. Alphabetize.
John Rouillard <rouilj@ieee.org>
parents:
4828
diff
changeset
|
62 ---- |
|
3176
18ad9d702a5b
added "imapServer.py" script (patch [SF#934567])
Richard Jones <richard@users.sourceforge.net>
parents:
1841
diff
changeset
|
63 |
|
4828
64daaa4bf816
contributors.py: Exclude robots and change sorting so that
anatoly techtonik <techtonik@gmail.com>
parents:
3764
diff
changeset
|
64 contributors.py |
|
64daaa4bf816
contributors.py: Exclude robots and change sorting so that
anatoly techtonik <techtonik@gmail.com>
parents:
3764
diff
changeset
|
65 Analyzes Mercurial log, filters and compiles list of committers with years |
|
64daaa4bf816
contributors.py: Exclude robots and change sorting so that
anatoly techtonik <techtonik@gmail.com>
parents:
3764
diff
changeset
|
66 of contribution. Can be useful for updating COPYING.txt |
|
6553
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
67 |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
68 ---- |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
69 |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
70 Docker |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
71 Directory for docker setup. More info on how to use it is in |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
72 doc/installation.txt. |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
73 |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
74 Docker/Dockerfile - Create roundup docker. |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
75 |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
76 Docker/requirements.txt - Python requirements built into docker. |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
77 |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
78 Docker/roundup-start - Startup script for roundup in docker. |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
79 |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
80 Docker/docker-compose.yml - Manage two docker containers for roundup |
|
75da037d1c54
Add another xmlrpc example script and update readme.
John Rouillard <rouilj@ieee.org>
parents:
6473
diff
changeset
|
81 and mysql. |
|
7084
8d9a6063cb22
Add oauth-get-token.py script
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6571
diff
changeset
|
82 |
|
8d9a6063cb22
Add oauth-get-token.py script
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6571
diff
changeset
|
83 ---- |
|
8d9a6063cb22
Add oauth-get-token.py script
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6571
diff
changeset
|
84 |
|
8d9a6063cb22
Add oauth-get-token.py script
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6571
diff
changeset
|
85 oauth-get-token.py |
|
8d9a6063cb22
Add oauth-get-token.py script
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6571
diff
changeset
|
86 Retrieve necessary credentials from MS cloud for OAuth authentication |
|
8d9a6063cb22
Add oauth-get-token.py script
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6571
diff
changeset
|
87 with IMAP. This has an extensive help text so you want to call this |
|
8d9a6063cb22
Add oauth-get-token.py script
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6571
diff
changeset
|
88 script with --help first. |
|
8d9a6063cb22
Add oauth-get-token.py script
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6571
diff
changeset
|
89 |
