| changeset | 9c3ec0a5c7fc |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | chore: remove __future print_funcion from code. Not needed as of Python 3. |
| files |
| changeset | 254f70dfc585 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | bug, refactor, test: make pragma history_length work interactively history_length could be set interactively, but it was never used to set readline/pyreadline3's internal state. Using the pragma setting on the roundup-admin command line did set readline's state. Also refactored 2 calls to self.readline.get_current_history_length() into one call and storing in a variable. Also changed method for creating history strings for printing. Tests added for history_length pragma on cli and interactive use. Added test for exiting roundup-admin with EOF on input. Added test for 'readline nosuchdirective' error case. Added test to readline with a command directive to set an internal variable. This last one has no real test to see if it was successful because I can't emulate a real keyboard/tty which is needed to test. |
| files |
| changeset | 3bdae15252c6 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | feat: add support for ! history and readline command in roundup-admin Ad support to change input mode emacs/vi using new 'readline' roundup-admin command. Also bind keys to command/input strings, List numbered history and allow rerunning a command with !<number> or allow user to edit it using !<number>:p. admin_guide.txt: Added docs. admin.py: add functionality. Reconcile import commands to standard. Replace IOError with FileNotFoundError no that we have removed python 2.7 support. Add support for identifying backend used to supply line editing/history functions. Add support for saving commands sent on stdin to history to allow preloading of history. test_admin.py: Test code. Can't test mode changes as lack of pty when driving command line turns off line editing in readline/pyreadline3. Similarly can't test key bindings/settings. Some refactoring of test conditions that had to change because of additional output reporting backend library. |
| files |
| changeset | 1a93dc58f975 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | feat: add 'q' as alias to quit to exit interactive roundup-admin Also require no arguments to 'q', 'quit' or 'exit' before exiting. Now typing 'quit a' will get an unknown command error. Add to admin-guide how to get out of interactive mode. Also test 'q' and 'exit' commands. No upgrading docs added. Not that big a feature. Just noted in CHANGES. Reporting error if argument provided is unlikely to be an issue IMO, so no upgrading.txt entry. |
| files |
| changeset | b4ad03927711 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | test: fix failing test setup for change in PBKDF2 rounds. |
| files |
| changeset | c12377fb4144 |
|---|---|
| branch | permission-performance |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <rsc@runtux.com> |
| description | Change permission representation Now permissions are checked in different order. Permissions without a check method (which are cheap to check) are checked first. Only if no permission is found do we check permissions with check methods. |
| files |
| changeset | 23b7669b2f48 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | test: fix path issues posix vs windows in admin functions. |
| files |
| changeset | fe77e4325084 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | test: fix test to change in message. Prior commit changed message to make it match the newly added message. Fix the test. |
| files |
| changeset | 2746337ded4c |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | fix: disable history file changes when testing Found more places that were blowing up the history file size to MB. Disabled writing to the history file for all tests. |
| files |
| changeset | 7c0a8088b053 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | feat: add support for controlling readline history features You can disable loading or saving the history file and disable loading the readline rc file. This is controlled by pragma history_features which is a bit string. Setting a bit disables the feature. Also cleaned up a python traceback if an invalid pragma was specified on the command line. Just displays an error message and drops into interactive mode. I had a hand when running regression tests with tet-admin.py::testBasicInteractive. It was loading the history file and saving the commands making the file huge. So disable all history_features by default when testing by setting pragma to 7. |
| files |
| changeset | b2dbab2b34bc |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | 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. |
| files |
| changeset | 4de48eadf5f4 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | bug: Fix roundup-admin security command. Lowercase optionalarg. Roles are indexed by lower case role name. So 'security User' and 'security user' should generate the same output. Also add testing for this case. Thread: https://sourceforge.net/p/roundup/mailman/roundup-users/thread/CAH-41398iTPhze7D_pZB8tqTBHF%3Dq6HYonbcG%2B%2BYN-ioDssXBw%40mail.gmail.com/#msg41557225 starting from: https://sourceforge.net/p/roundup/mailman/message/41557225/ |
| files |
| changeset | 859c57bc8d91 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | test: limit search for \r to first 100 bytes. Don't scan entire file. just look at 100 bytes which should include all of the first line. |
| files |
| changeset | 227aca44fea5 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | test: fix failure under cygwin python caused by line endings reading config.ini files under cygwin python results in \r\n terminated lines which do not compare properly with the success conditions. replace \r\n with \n when required. |
| files |
| changeset | 978285986b2c |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | fix: issue2551193 - Fix roundup for removal of cgi and cgitb ... standard python modules (and FieldStorage/MiniFieldStorage). Vendor cgi.py and modify imports. Details: roundup/anypy/cgi_.py import that accesses a working cgi.py. All imports dealing with cgi now use cgi_. roundup/anypy/vendored/cgi.py vendored version 2.6 of cgi.py from: https://pypi.org/project/legacy-cgi/ CHANGES.txt change note added COPYING.txt added license for cgi.py doc/rest.txt change example to use cgi_ doc/upgrading.txt doc removal and how to rework local code using cgi.py. frontends/roundup.cgi remove unneeded cgi import roundup/cgi/actions.py roundup/cgi/apache.py roundup/cgi/client.py roundup/cgi/templating.py roundup/cgi/TAL/TALGenerator.py test/db_test_base.py test/rest_common.py test/test_cgi.py remove import cgi and replace with from roundup.anypy.cgi_ import cgi test/test_actions.py test/test_templating.py modify import to get *FieldStorage test/test_admin.py test/test_hyperdbvals.py test/test_xmlrpc.py remove unneeded cgi import |
| files |
| changeset | 73dfa9df9fb0 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | issue685275 - show retired/unretired items in roundup-admin add pragma display_header to print headers for display command. Header displays designator and retired/active status. Add doc of pragma to affected commands. Add test for code paths. |
| files |
| changeset | 793f4b63c538 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Fix test where postgres returned items in different order |
| files |
| changeset | c8c4514f4c3e |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | issue685275 - show retired/unretire commands For roundup-admin, add pragma show_retired [no, only, both] to control showing retired items in list and table commands: no - do not show retired only - only show retired both - show retired and unretired (active) items Also sort results of Class::getnodeids() in back_anydbm.py. Anydbm Class::list() expicitly sorts the returned values and a test depends on the order of the returned items. I can't find any docs that say Class::list() sorts and there is no explicit sort in the rdbms_common.py implementation. It looks like the natural order returned in the rdbms case for these methods is sorted. However the test fails for the anydbm case if I don't sort the results of back_anydbm.py:Class::getnodeids() to match back_anydbm.py:Class::list(). This also fixes a spelling error in comment. |
| files |
| changeset | 534f8bdb8f94 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Add -P pragma=value command line option to roundup-admin. To set pragmas when using non-interactive mode, or set on command line when going into interactive mode. Also changed specification test to use command line pragma setting rather than interactive. This tests the -P option without having to run an extra test. Docs updated as well. |
| files |
| changeset | fc9daba984c0 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | - issue2551103 - add pragma 'display_protected' to roundup-admin. If setting is true, print protected attributes like id, activity, actor... when using display or specification subcommands. |
| files |
| changeset | 312d52305583 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | - issue2551190 - Allow roundup-admin reindex to work in batches. Running: roundup-admin -i ... reindex issue:1-1000 will reindex the first 1000 issues while reporting any missing issues in the range. Also completion progress is reported when indexing a specific class. Note this require a chnge that makes an invalid command like: reindex issue23f to error with no such class issue23f. It used to reindex issue23 which I consider a bug. Updates to man page admin_guide.py. Tests added. |
| files |
| changeset | bd6523c84a95 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Fix test failure caused by making genconfig trackerless When I removed the need to have a tracker for genconfig, I broke a couple of tests. The breakage was hidden by a bad workflow. This change allows the tests to pass and refactors reporting of UsageError exceptions in admin.py. It also adds a test for failure in install command as there is a test case for it and this test tests the refactor. |
| files |
| changeset | af870e295b46 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | add test for pragma _reopen_tracker missed committing it with the code change. Note _reopen_tracker is a negative feature flag. It should go away if nobody reports an error with the new tracker open caching code path. |
| files |
| changeset | 9c067ed4568b |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | add pragma command to roundup-admin Added basic pragma command. Can assign settings, list settings. Most settings are not yet implemented. Only the pragma command respects unhidden pragma settings at this point. Also added tests, doc updates for roundup-admin. CHANGES.txt not updated because currently only pragma references the unhidden settings. Also fixed a couple of long lines. |
| files |
| changeset | 1a3d4703c7d6 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Fix for python2. m[0] -> m.group(0) |
| files |
| changeset | ccb0e566e0be |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Add missing space in message; add tests; update .po Testing for updateconfig updating password_pbkdf2_default_rounds. Added missing space in one message and updated locale files as a result. |
| files |
| changeset | 0c6617db0b97 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Add testing interactive mode to roundup_admin. remove redundant imports |
| files |
| changeset | 43a0c2901524 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Remove unneded import. |
| files |
| changeset | e54a2db40a9e |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | check trackers trace_search as well. |
| files |
| changeset | f924af12ef50 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | issue2551233 - create new roundup-admin command "templates" add a command to list all templates, the directory where they are defined, and a description. If called as templates trace_dir also list all directores that are search for templates even if none are found. |
| files |
| changeset | ff4ab763f47c |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | issue2551141 - roundup-admin returns no such class when restoring item with duplicate key Fix the error by splitting the class name lookup and the restore opertation. Both can return KeyErrors. Set up two different try blocks for each case. Also test restore/retire. |
| files |
| changeset | 51a1a9b0f567 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | - issue2551062: AddPermission doesn't validate property names. roundup-admin security stops output when it finds an invalid property. It used to try to print the rest of the security properties. So errors were lost in the output. If roundup-admin is run non-interactively it exits with status 1 so it can be used in a script to validate the properties schema. |
| files |
| changeset | 6a6b4651be1f |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <rsc@runtux.com> |
| description | Use server-side cursor for postgres in some cases In filter, filter_iter, and _materialize_multilinks, use named cursor with postgresql. This turns of client-side cursor handling and avoids *large* roundup process (or wsgi process) in case of large results. Fixes issue2551114. |
| files |
| changeset | b303db7f384f |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Test designator code path Added -d to a test to output designator rather than just id numbers. Improves test coverage. |
| files |
| changeset | 95183d73ac64 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | issue2550522 - add transitive searching to filter in roundup-admin issue2550522 - Add 'filter' command to command-line interface. Filter command was actually added in 2.0.0, but this issue requested transitive searching. So that: roundup-admin -i . filter issue assignedto.username=Admin will work. This also fixes two bugs. If assignedto.username had no matches, all issues would be returned. admin.py had a find() call where the should have been a filter() call. Was tripped when -S, -c or -s were used. |
| files |
| changeset | e860c6a30508 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | admin.py testing. See previous checkin for admin.py. This got left out of the changeset apparently. test_admin.py: Add tests for get with bad node designator Add disabled test for HelpInitopts. Proper test TBD as valid result depends on the environment the test is run in. So making it robust it tricky. Add tests for set error cases. Add test for using set on class rather than designator Add new tests for table command |
| files |
| changeset | 7458211ca6f3 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Use self.dirname, add testing for genconfig/updateconfig Add comparison of updateconfig to config.ini. Should be same except for timestamp line. Replace hardcoded _test_admin with self.dirname. |
| files |
| changeset | 32ebffbae49a |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Setup basic genconfig and updateconfig tests. |
| files |
| changeset | 81babf5a4494 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Test for cli. Command partial match, Bad command, bad args. |
| files |
| changeset | 49f599f187e1 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Add tests for get and set, clean up Specification test. |
| files |
| changeset | 227c05ce2d85 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Nuke database on install and fix specification test Need to empty database as part of install_init(). Wasn't a problem for sqlite/anydbm as those got nuked by killing the test directory on each new test. For postgres/mysql in CI it needs to be nuked. Using admin.force=True to get the admin.py module to do it. If that doesn't work can open the instance and nuke it manually. Fields listed when getting specification for class are in different orders for different databases backends and versions. Use sorted lines for comparison. |
| files |
| changeset | 41907e1f9c3f |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Fix postgres/mysql testing; test filter. Apparently I killed the testFilter test by using it for the testFind check. Also testing showed that filter issue assignedto=admin,anonymous wasn't properly mapped to be the same as assignedto=1,2. Also set all rdbms properties to allow roundup-admin to create the databses for postgres and mysql. Pulled props from test/db_test_base.py. |
| files |
| changeset | d25638d1826c |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Add roundup-admin filter command; fix bad doc example; add tests admin_guide.txt had an example using find with username prop. This is wrong. Find only works with links not string. Fix it to use filter. Add filter command to roundup-admin. Add tests for filter, specification and find. |
| files |
| changeset | bed579f654ee |
|---|---|
| branch | maint-1.6 |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | issue2551029: Jinja2 template install error. Issue where template's config.ini not getting updated. Change do_install in admin.py to load config_ini.ini from template before writing tracker's config.ini. This generates an updated config file for the user on install preserving values required tomake tracker work. Added config_ini.ini files to jinja2 and responsive templates to set required values (template_engine and static_files; static_files resp.). Documented new file in doc/tracker_templates.txt and added tests for new admin.py code. |
| files |
| changeset | b76be13e027e |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | issue2551029: Jinja2 template install error. Issue where template's config.ini not getting updated. Change do_install in admin.py to load config_ini.ini from template before writing tracker's config.ini. This generates an updated config file for the user on install preserving values required tomake tracker work. Added config_ini.ini files to jinja2 and responsive templates to set required values (template_engine and static_files; static_files resp.). Documented new file in doc/tracker_templates.txt and added tests for new admin.py code. |
| files |
| changeset | 95dfdbaf5aa6 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | A basic set of tests for admin.py. Triggered by https://issues.roundup-tracker.org/issue2551042 |
| files |