Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

buildtimetrend/python-lib

Repository files navigation

Project discontinued, will be archived!

Buildtime Trend Python library

Visualise what's trending in your build process

Buildtime Trend Python library Buildtime Trend Python library (dev) PyPI Latest Version PyPI Downloads PyPI Supported Python versions Can I Use Python 3?

Build Status Coverage Status Code Health Scrutinizer Code Quality Codacy Badge Quantified Code Issues

Buildtime trend Total builds Percentage passed build jobs Days since last failed build job

Stack Share status

Features

Visualise trends of build processes on Continuous Integration platforms by gathering and analysing build and timing data:

  • Capture timing data from each stage in a build process
  • Store, analyse and create trends of the build process data
    • keen mode : send timing data to Keen.io and use the Keen.io API for analysis and visualisation
    • native mode : store data in xml format and use matplotlib to generate a chart (limited)
  • Available charts and metrics :
    • number of builds, successful and failed
    • average build duration
    • duration of individual build stages
    • builds per branch
    • build duration per time of day/day of week

Usage

The Buildtime Trend Python client and Buildtime Trend as a Service depend on this library. It is recommended to use this library with either of them, have a look at their documentation on how to use them.

How to get it?

If you want to use this library directly, there are several ways of getting it.

Buildtimetrend library is registered in PyPI, to install, use :

pip install buildtimetrend

The latest version is available for download as zip and tarball on GitHub. Unzip and copy to the desired directory.

If you prefer to use git, several options are available :

  • development version : git clone https://github.com/buildtimetrend/python-lib.git
  • latest release : git clone https://github.com/buildtimetrend/python-lib.git --branch release
  • a specific release : git clone https://github.com/buildtimetrend/python-lib.git --branch v0.3

Dependencies

  • python : Python 2.7
  • keen : client for storing build time data as events in Keen.io
  • python-dateutil : for formatting datetime objects
  • lxml : python wrapper for libxml2 and libxslt
  • pyyaml : for parsing the config file in yaml format
  • native mode :
    • matplotlib (v1.2.0 or higher) : for drawing the native trend graph, can be omitted when only using Keen.io to generate charts. Stackplot requires version v1.2.0

Dependency installation

  • using the setup script

python setup.py install

  • if you want to use native mode to store data or generate charts :

python setup.py install -e .[native]

  • install each dependency individually :
pip install keen
pip install python-dateutil
pip install pyyaml
pip install lxml
pip install 'matplotlib>=1.2.0'

Store build time data in xml (native mode)

See wiki for data schema of the xml file.

Store build time data in Keen.io

See wiki for data schema of data sent to Keen.io.

Bugs and feature requests

Please report bugs and add feature requests in the Github issue tracker.

Contribute

If you want to contribute to make Buildtime Trend even better, check out the contribution page. We are looking for testers, developers, designers, ... and what more. Contact us if you want to help out.

Donations

You can support the project by making a donation. The donations will help pay for the hosting and support further development.

Credits

For an overview of who contributed to create Buildtime trend, see Credits.

Contact

Website : https://buildtimetrend.github.io/

Mailinglist : Buildtime Trend Community

Follow us on Twitter, Github and OpenHub.

License

Copyright (C) 2014-2016 Dieter Adriaenssens ruleant@users.sourceforge.net

This software was originally released under GNU General Public License version 3 or any later version, all commits contributed from 27th of November 2014 on, are contributed as GNU Affero General Public License. Hence the project is considered to be GNU Affero General Public License from 27th of November 2014 on.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.