Commit Graph

42 Commits

Author SHA1 Message Date
Ivan A. Melnikov
8dce33f9b3 interactive: Move interactive_setup to utils
... and split it in hope to make the parts more reusable.
2021-09-02 16:02:33 +04:00
Ivan A. Melnikov
96d88080c3 interactive: Helper function to create inapt reporter
inapt reports are still not part of the main functionality,
so I don't want to put them right into `load` and make
that even slower.
2021-08-15 20:38:23 +04:00
Ivan A. Melnikov
8af9e1d7b1 Make sure NONE packages are properly colorized
Previously, BY_NAME did not include packages that were
absent from both repositories. This meant that some functions
like `gspi` ignored them, which is inconvenient because
it does not show packages that were never built (like new
kernel flavors) or already deleted.

This commit addresses this in the following way:
- colorize.colorize() now takes additional argument,
  an explicit list of package names to colorize
- for interactive console, this list is formed from
  both repositories, AND all the package names found
  in PACKAGE_TASKS.
2019-12-04 11:10:07 +04:00
Ivan A. Melnikov
c66361223d interactive: fix fresh() for subtasks with EXTRA packages 2019-08-15 10:42:12 +04:00
Ivan A. Melnikov
1e6cc56b9a interactive/fresh: Make colorizing optional
Sometimes it's convenient to have the list
without colors.
2019-08-15 10:40:35 +04:00
Ivan A. Melnikov
f60a82557c interactive: add doc() function
... that prints the welcoming message
2019-07-01 12:41:36 +04:00
Ivan A. Melnikov
aba8162676 interactive: add fresh(num)
This function displays subtasks of the tasks
that would update packages in the target repo.
It is especially useful for determining why
the particular task gets into next_tasks(...)
output.

Implementing it nicely required a bit of refactoring
to factor out certain parts of colorizing
and display mech.
2019-07-01 12:38:13 +04:00
Ivan A. Melnikov
a25d089525 Restrict set of interesting tasks to recycler's
recycler64 is boring now.
2019-05-02 17:45:02 +04:00
Ivan A. Melnikov
c9057f2c08 interactive: EXTRA packages are always interesting
... for next_tasks report.
2019-04-04 13:25:33 +04:00
Ivan A. Melnikov
573ff92a85 interactive: list_spi: Accept and split string as first argument
Use case: to show info on all packages in your clipboard, do:

>>> list_spi('''
... <paste>
... ''')
2019-03-19 18:15:39 +04:00
Ivan A. Melnikov
a46ff4b5d4 interactive: Update the module docstring
... to include all the recent stuff
2019-03-19 18:07:16 +04:00
Ivan A. Melnikov
f9ef19f8d9 interactive: add min_id param to display_tasks and next_tasks 2019-03-02 21:13:05 +04:00
Ivan A. Melnikov
6598bb5b26 interactive: display_tasks enhancements
Now it is more usable as interactive command.
2019-03-01 17:13:59 +04:00
Ivan A. Melnikov
059f092080 interactive: Add build_log function
Function displays build logs for a subtask, and has
some nice defaults. Alias: bl
2019-03-01 16:45:19 +04:00
Ivan A. Melnikov
0108663163 interactive: Try detecting rebuilds in next_tasks 2019-03-01 15:57:57 +04:00
Ivan A. Melnikov
7ea016d2c8 Drop task_predicates submodule
It did not turn out to be convenient
2019-03-01 14:01:47 +04:00
Ivan A. Melnikov
349cc65f61 update_days: Try to detect rebuilds
It's hard to do 100% correctly, but the heuristics we
employ here works quite well for now: when a package
was rebuild by base repo (Sisyphus) after we've updated
it last time, we probably need to rebuild it.
2019-03-01 13:48:09 +04:00
Ivan A. Melnikov
156f2cdcb8 interactive: Add '\n' between package tasks 2019-02-04 14:21:23 +04:00
Ivan A. Melnikov
f33aa9ae43 update_days report
This change adds new report, update_days, that nicely
displays how many days ago a package was updated. This
report is now available in interactive mode and included
into daily report.
2019-02-01 21:06:41 +04:00
Ivan A. Melnikov
901df3a952 Add 'import rlcompleter' back
Just importing this module configures the completion
correctly.
2019-01-23 13:46:03 +04:00
Ivan A. Melnikov
9189ab87ef interactive: aliases for logs and gspi
This change adds 1-letter aliases for 'logs' and 'gspi' commands.
These commands are used so often that even 4 letters are
just too much.
2019-01-22 13:05:05 +04:00
Ivan A. Melnikov
530010dee9 interactive: correctly load non-ascii logs
Some packages write utf-8 in logs, and may write
build logs in other charset. Now we can load
such logs more or less correctly.
2019-01-22 13:03:49 +04:00
Ivan A. Melnikov
7a656153fc Fix some flakes8 warnings 2019-01-17 13:25:22 +04:00
Ivan A. Melnikov
08bc219dc5 Tasks: don't re-read info.json if we don't have to
tasks.py is now capable of using a dict id => task_info
as a cache; if task is already there and is recent
enough, we don't have to re-read its metadata.
2019-01-17 12:39:23 +04:00
Ivan A. Melnikov
bfb28137c7 interactive: TASKS is now dict() 2019-01-13 21:52:30 +04:00
Ivan A. Melnikov
2b77f1b7a2 interactive: Print unknown items in list_spi 2018-12-13 17:37:09 +04:00
Ivan A. Melnikov
0ab1839953 next_tasks refactoring
This change refactors internals of next_tasks interactive
command in hope to make them more reusable.
2018-12-13 16:51:50 +04:00
Ivan A. Melnikov
0d0d89331e interactive: Raise ValueError if task is not found 2018-09-21 12:39:13 +04:00
Ivan A. Melnikov
91f58d6f28 interactive: Enhance stats() command
- name list support;
- display percentages and legend.
2018-09-11 16:49:57 +04:00
Ivan A. Melnikov
a21e6866f8 Introduce 'logs' subpackage
- parse timestamps from logs
- move subroutine that lists task events logs there
2018-09-11 14:00:51 +04:00
Ivan A. Melnikov
f33cbd511e interactive.next_tasks: Include and exclude by pattern 2018-08-15 17:23:15 +04:00
Ivan A. Melnikov
f88c01316b Add next_tasks to daily report 2018-08-14 14:13:21 +04:00
Ivan A. Melnikov
08af75a9b9 port_stats.interactive update
- update docstring
- add stats() function
- rename grep_spi -> gspi to save some typing
2018-08-14 14:11:50 +04:00
Ivan A. Melnikov
2e6ac86991 port_stats: Introducing config
Put all the args to config to easily support
several repositories.
2018-08-10 18:39:27 +04:00
Ivan A. Melnikov
c699c11eea interactive: Consider only recycler's tasks for next_tasks 2018-07-29 09:52:02 +04:00
Ivan A. Melnikov
d1ecb45ba3 Hack to restrict tasks to mipsel repo
Now we have mips64el, that for now should be ignored.
2018-07-29 09:48:50 +04:00
Ivan A. Melnikov
18437e19d3 port_stats: More interactive improvements
- package colors in ti()
- next_tasks() -- list all non-done tasks that would update
  packages.
2018-07-19 17:50:57 +04:00
Ivan A. Melnikov
8210c4a077 port_stats: More interactive funtions 2018-07-04 15:53:40 +04:00
Ivan A. Melnikov
44175d1f34 port_stats: Add script that finds outdated tasks
python -m port_stats.outdated_tasks \
        /mnt/repo_secondary/sisyphus_mipsel/release/latest \
        /mnt/tasks_secondary \
    | tee outdated_tasks.txt
2018-06-25 19:49:40 +04:00
Ivan A. Melnikov
5df6aca515 port_stats: New tools in interactive module
Now it works with colors, too.
2018-06-22 14:40:38 +04:00
Ivan A. Melnikov
c96baad339 Initial take on daily repo report generation 2018-06-20 15:53:53 +04:00
Ivan A. Melnikov
9b62e446d5 port_stats: Tools for getting tasks information
You can try doing this within an interactive python shell:

    python -i -m port_stats.interactive

The default pathes work on basealt.
2018-06-20 14:09:51 +04:00