Tools: Weekly Report Generator #110652
No reviewers
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#110652
Loading…
Reference in New Issue
No description provided.
Delete Branch "mano-wii/blender:weekly_report_generator"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This commit implements 2 triage tools:
These tools automatically detect the username to list activities related to the user.
Solutions:
weekly_report.py
: this is a report generator that mimics the old one seen in https://projects.blender.org/blender/blender-dev-tools/src/branch/blender-v3.4-release/utils/weekly_report.py. This tool uses the Gitea API that lists a user's activities. Once the Issues and Pull involved for the week are obtained, each of their links are accessed to see the events that do not appear in the activity feed (such as applying labels). With these labels it is possible to know why an issue was closed for example. The downside of this solution is that issues that the triager has tagged as confirmed or needing info but not commented on are not tracked.issues_needing_info.py
: this tool prints the links of issues that the user marked as needing information at least 1 week ago. It uses the Gitea API to first list all issues marked as needing information and updated more than a week ago, and then accesses the events for each one to filter them based on user.Each of these files access the
gitea_utils.py
modules.Is the idea that there will be just one script, and the question is which one is preferred? If not at least there should be a more informative name than v2.
I don't use these scripts, so maybe ask for feedback from @lichtwerk and others that are using these.
The purpose of the shell scripts is not clear to me, why not run the python file directly like other scripts in tools?
In fact the shell scripts are not needed here. (I tend to use it a lot in other cases and ended up forgetting that it's not necessary here).
weekly_report_v2.py
and shell scriptsgit_utils.py
(Created agit_username_detect
function inweekly_report.py
itself)Nice simplification.
I only have minor comments on the implementation.
@ -0,0 +7,4 @@
def url_json_get(url):
import json
These kinds of lazy imports are not needed in scripts like this. We do it in Blender for faster startup, but here it's not a factor.
@ -0,0 +201,4 @@
result.append(event)
if len(issue_events_json) < 50:
This assumes the limit will always be 50, which I don't think is a guarantee.
What you could do is use
&page={page}&limit={limit}
above to specifically request this limit.@ -0,0 +4,4 @@
"""
# This script prints the URLs of all opened issues labeled
# "Status/Needs Information from User" by a specified user
# before a specified date.
Might as well say 7 days since there is no argument to specify the date.
@ -0,0 +56,4 @@
args = parser.parse_args()
username = args.username
if not username:
from weekly_report import git_username_detect
Perhaps would make more sense to add this in
gitea_utils
since a dependency on the weekly reports script is not so obvious.@ -0,0 +266,4 @@
start_date = end_date - datetime.timedelta(days=time_delta, hours=end_date.hour)
# Ensure friday :)
firday = start_date + datetime.timedelta(days=4)
Typo: firday -> friday
Thanks for the feedback @brecht
In addition to what was suggested, I also created the
url_json_get_all_pages
function that uses thelimit
param.Unfortunately in some cases the
page
andlimit
parameters fail when the page is 1. So they could not be used.I also left the imports
os
andsubprocess
inside thegit_username_detect
function, as this function, besides not being a Gitea utility, is a bit of a workaround and therefore is treated differently.@ -0,0 +190,4 @@
# WORKAROUND: This function doesn't involve Gitea, and the obtained username may not match the username used in Gitea.
# However, it provides an option to fetch the configured username from the local Git,
# in case the user does not explicitly supply the username.
# Please note that this approach may not be suitable for all scenarios and might not be secure in some cases.
I'm not sure what is insecure about this? Would leave that out unless there is a good reason.
2bec691eec
to6e98c3e64b
Thx working on this! (wasnt able to review because I was on holidays)
I will add
--calendarweek
as an arg (as we discussed) and put up a PR for that