Code Monkey home page Code Monkey logo

ado_repo_stats's Introduction

Azure DevOps repository statistics python module

It is strongly suggested that you use a virtual python environment and a python version >=3.6
Install:python3 -m venv .venv
Run:source .venv/bin/activate
Test:which python3
(should give path to .venv/bin/python3, not global python location)
Stop:deactivate

To run

  • Clone repo
    git clone https://github.com/domroutley/ADO_repo_stats.git
  • Install required packages
    pip install -r requirements.txt
  • Change the organisation and project variables in the target.py file
  • Create a token file in the same directory and put your PAT for the target project in it
  • Run the main.py file (using python 3.6+)

What this code does

  • Outputs 4 .csv files
    • [project name]/[project name]-overview.csv
    • [project name]/project name]-git.csv
    • [project name]/project name]-build.csv
    • [project name]/project name]-release.csv

Overview file contains...

  • Number of repositories
  • Number of commits in total
  • Number of builds
  • Number of build definitions
  • Average time per build DO WE REALLY WANT THIS?
  • Number of releases
  • Number of release definitions
  • Average time per release deployment DO WE REALLY WANT THIS?

Git file contains...

  • Number of repositories
  • Default branch of repository
  • Number of commits in total (for project)
  • Number of commits per repo
  • Number of commits not in master (per repo)
  • Number of lines in master per repo (unknown)

Build file contains...

  • Number of builds
  • Number of build definitions
  • Number of builds per definition
  • Number of each type of outcome for a build per definition
  • Time per build (print build ids)
  • Average time per build

Release file contains...

  • Number of release deployments
  • Number of release definitions
  • Number of deployments per definition
  • Number of each type of outcome for a deployment per definition
  • Time per deployment (print deployment ids)
  • Average time per deployment

TODO

  • Rewrite all calls to the API to use direct calls

ado_repo_stats's People

Contributors

domroutley avatar

Watchers

James Cloos avatar

ado_repo_stats's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.