Gitlab Stats
This package has .env
support. See python-dotenv
for more information.
CLI options
poetry run ucam-gitlab-stats --help
## Mean Capacity Command
The following shows the Wilson/Identity teams mean capacity against estimation (max value of estimate or weight per ticket) for the last 16 weeks for cadence 'IAM Sprint' (e.g. https://gitlab.developers.cam.ac.uk/groups/uis/devops/-/cadences/14/iterations/445):
GITLAB_TOKEN=<gitlab-personal-token> poetry run ucam-gitlab-stats mean-capacity \
--labels "team::Identity" \
--print-iterations \
--week-count=16 \
'IAM Sprint'
Epic Sizes Command
To get the epic sizes for epics in the "In Progress" and "Sprint Ready" states for the Identity team you can use:
GITLAB_TOKEN=<gitlab-personal-token> poetry run ucam-gitlab-stats epic-sizes \
--filter-labels "team::Identity" \
--workflow-labels "workflow::In Progress" --workflow-labels "workflow::Sprint Ready"
This will print tables for each workflow label, displaying the total estimated size for each epic attached with that workflow label, along with the total for each workflow epic at the bottom of the table.
You can also ask the tool to guesstimate averages. There are three options for the averaging:
-
--average-epic-sizes
- turns on the averaging functionality. -
--average-size-filter-labels
- sets what labels should be considered for averaging. -
--t-shirt-labels
- sets what labels are "size" labels for the epics, this defaults to["size::XS", "size::S", "size::M", "size::L", "size::XL"]
.
The averaging tool takes the average of all closed epics for the average-size-filter-labels
matching each t-shirt-label
to work out the average estimated size for each of those t-shirt
labels. It also averages all epics, to give a "unlabelled" average size as well.
If average-epic-sizes
is turned on, in the output tables any epics with no current estimated
times will be assigned an average size depending on their size label. If they have no size label
they are given the overall unlabelled average. Averages rather than definite sizes are printed in
italics in the output tables.
An example command for getting estimates with average sizes is:
GITLAB_TOKEN=<gitlab-personal-token> poetry run ucam-gitlab-stats epic-sizes \
--filter-labels "team::Identity" \
--filter-labels "mvp" \
--workflow-labels "workflow::Needs Refinement" \
--workflow-labels "workflow::In Progress" \
--workflow-labels "workflow::Sprint Ready" \
--average-epic-sizes \
--average-size-filter-labels "team::Identity"
This command will find all epics labelled team::Identity
and mvp
, in workflows
Needs Refinement
, In Progress
, or Sprint Ready
. It will print out the sizes and average sizes
for these epics, and is considering any epic tagged as team::Identity
for the averages.