https://github.com/fimblo/leanstats
Compute lean metrics on Kanban ticket data. Analyse cycle-time, throughput, and more.
https://github.com/fimblo/leanstats
data-analysis-python kanban lean-metrics
Last synced: about 1 year ago
JSON representation
Compute lean metrics on Kanban ticket data. Analyse cycle-time, throughput, and more.
- Host: GitHub
- URL: https://github.com/fimblo/leanstats
- Owner: fimblo
- License: mit
- Created: 2023-09-24T18:19:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-27T11:24:44.000Z (almost 2 years ago)
- Last Synced: 2025-01-17T16:36:05.484Z (about 1 year ago)
- Topics: data-analysis-python, kanban, lean-metrics
- Language: Python
- Homepage:
- Size: 60.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
* leanStats Project
[[https://github.com/fimblo/leanStats/actions/workflows/test.yml/badge.svg]]
** Description
This is the leanStats project, which computes lean metrics on Kanban
ticket data.
I'm still messing around with the code, but ultimately I'm hoping to:
- present cycletime and throughput data with a N-day lookback window
- show graphs, like:
- a simple cycle-time/throughput chart
- a cycle-time scatterplot
- a throughput and cycle time histogram
- ... and that kind of thing.
Currently, I output throughput, p50 and p85 cycle-time with a 7 day
look-back window in the terminal.
** Prerequisites
- Python 3.x
- pipenv
** Setting Up
*** Clone the Repository
#+BEGIN_SRC bash
git clone git@github.com:fimblo/leanStats.git
cd leanStats
#+END_SRC
*** Set Up the Python Environment
To manage dependencies and virtual environments, we use `pipenv`.
#+BEGIN_SRC bash
# install pipenv
pip install pipenv
# create virtual environment and install all dependencies
pipenv install
# update PYTHONPATH
cat< .env
PYTHONPATH=src:$PYTHONPATH
EOF
#+END_SRC
This will create a virtual environment and install all dependencies
listed in the `Pipfile`. The `.env` file contains environment
variables, and is read by pipenv upon start.
** Running leanStats
With everything set up, you can run leanStats using:
#+BEGIN_SRC bash
pipenv run leanStats -i data/sample.csv
#+END_SRC
This will output something like:
#+begin_example
$ pipenv run leanStats -i data/sample.csv
Loading .env environment variables...
ticket_id|timestamp_start|timestamp_end|cycletime|median_cycletime|p85_cycletime|throughput
PROJ-004|2023-08-07 11:23:54|2023-08-07 11:23:58|1|1|1|1
PROJ-002|2023-08-09 07:38:10|2023-08-09 12:03:24|1|1|1|2
PROJ-003|2023-08-07 10:46:48|2023-08-09 14:09:05|3|1|3|3
PROJ-001|2023-08-15 06:39:14|2023-08-20 07:39:21|6|6|6|1
#+end_example
Not pretty, but it's a work in progress :)
*** Expectations on data csv
Currently, the required fields in the CSV file are:
- =ticket_id=: The unique id of the ticket.
- =to.status=: The target status of the ticket.
- =changed_at= The datetime when the ticket entered a status (dd/mm/yy HH:MM:SS)
For example, if a ticket with id =PRJ-001= entered the Done lane on the 25th of September, exactly at 10:27pm, then the fields above would be:
- =ticket_id=: PRJ-001
- =to_status=: "Done"
- =changed_at= "25/09/2023 22:27:00"
All other fields are ignored.
** Testing
Explain how to run tests here (if you have them). For example:
#+BEGIN_SRC bash
pipenv run test
#+END_SRC
** Contributing
If you'd like to contribute, please fork the repository and make
changes as you'd like. Pull requests are warmly welcome.
** License
This project is licensed under the MIT License -
see the LICENSE file for details.