Tools: Add script to report (high) priority issues per module #120022

Merged
Thomas Dinges merged 3 commits from ThomasDinges/blender:reports_script into main 2024-04-02 15:54:23 +02:00

The python script checks on reports based on the provided severity (default High) and sorts them per module.

Thanks to Sybren for some code review and feedback on the chat already!

The python script checks on reports based on the provided severity (default High) and sorts them per module. Thanks to Sybren for some code review and feedback on the chat already!
Thomas Dinges added 1 commit 2024-03-28 17:18:12 +01:00
Thomas Dinges requested review from Campbell Barton 2024-03-28 17:18:32 +01:00
Thomas Dinges requested review from Philipp Oeser 2024-03-28 17:18:47 +01:00
Campbell Barton approved these changes 2024-03-29 05:50:22 +01:00
Campbell Barton left a comment
Owner

Generally fine, suggestions noted inline.

Generally fine, suggestions noted inline.
@ -0,0 +47,4 @@
"Unbreak Now!": "288"
}
uncategorized_reports = list()

Calling list() is mainly used for converting to a list, for empty lists [] is typically written.

Calling `list()` is mainly used for converting to a list, for empty lists `[]` is typically written.
ThomasDinges marked this conversation as resolved
@ -0,0 +76,4 @@
# Calculate total
total = 0
for module in modules:

Having module used twice under different types causes mypy to report type errors (see mypy --strict tools/triage/issues_module_listing.py), renaming it to module_key, module_id or similar resolves.

Having module used twice under different types causes mypy to report type errors (see ` mypy --strict tools/triage/issues_module_listing.py`), renaming it to `module_key`, `module_id` or similar resolves.
ThomasDinges marked this conversation as resolved
@ -0,0 +86,4 @@
for module in modules.values():
str_list = (', '.join(module.buglist))
full_url = base_url + severity_labelid[severity] + "%2c" + module.labelid
if not module.buglist or severity != 'High':

While personal preference I find the {str(len(module.bug_list))} a bit cryptic, the str() can be removed, assigning a variable buglist_len = len(module.buglist) means this can be written as {buglist_len} which reads better to me - but I'm not that fussed.

While personal preference I find the `{str(len(module.bug_list))}` a bit cryptic, the `str()` can be removed, assigning a variable `buglist_len = len(module.buglist)` means this can be written as `{buglist_len}` which reads better to me - but I'm not _that_ fussed.
ThomasDinges marked this conversation as resolved
@ -0,0 +92,4 @@
print(f"- [{module.name}]({full_url}): *{str(len(module.buglist))}* _{str_list}_")
print()
print("Total: " + str(total))

can be f"Total: {total}" - since f-strings are used everywhere else here.

can be `f"Total: {total}"` - since f-strings are used everywhere else here.
ThomasDinges marked this conversation as resolved
@ -0,0 +104,4 @@
description="Print statistics on open bug reports per module",
epilog="This script is used to help module teams")
parser.add_argument(

Adding choices=severity_labelid.keys(), gives a nice error if an invalid choice is passed in. .e.g

issues_module_listing.py: error: argument --severity: invalid choice: 'Unbreak' (choose from 'Low', 'Normal', 'High', 'Unbreak Now!')

... shows up in --help too.

Adding `choices=severity_labelid.keys(),` gives a nice error if an invalid choice is passed in. .e.g ``` issues_module_listing.py: error: argument --severity: invalid choice: 'Unbreak' (choose from 'Low', 'Normal', 'High', 'Unbreak Now!') ``` ... shows up in `--help` too.
ThomasDinges marked this conversation as resolved
@ -0,0 +110,4 @@
default="High",
type=str,
required=False,
help="Severity of reports (Low, Normal, High, Unbreak Now!")

*picky* prefer trailing comma and newline, makes diffs less noisy when new args are added. Same for ArgumentParser.

\*picky\* prefer trailing comma and newline, makes diffs less noisy when new args are added. Same for `ArgumentParser`.
ThomasDinges marked this conversation as resolved
Campbell Barton reviewed 2024-03-29 05:54:22 +01:00
@ -0,0 +22,4 @@
labelid: str
buglist: list[str] = dataclasses.field(default_factory=list)
modules = {

Worth adding a note about where these values are from - if we need to update the list.

Worth adding a note about where these values are from - if we need to update the list.
ThomasDinges marked this conversation as resolved
Campbell Barton reviewed 2024-03-29 06:06:10 +01:00
@ -0,0 +63,4 @@
html_url = issue["html_url"]
number = issue["number"]
# Check reports module assignement and fill in data

*typo* assignment, also end sentences with full-stops.

\*typo\* `assignment`, also end sentences with full-stops.
ThomasDinges marked this conversation as resolved
Thomas Dinges added 1 commit 2024-04-02 15:46:54 +02:00
Philipp Oeser approved these changes 2024-04-02 15:51:02 +02:00
Philipp Oeser left a comment
Member

lgtm

lgtm
Thomas Dinges added 1 commit 2024-04-02 15:53:01 +02:00
Thomas Dinges merged commit 04293e2494 into main 2024-04-02 15:54:23 +02:00
Thomas Dinges deleted branch reports_script 2024-04-02 15:54:25 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#120022
No description provided.