Giter VIP home page Giter VIP logo

pydriller's Introduction

Build Status Documentation Status codecov Downloads License

PyDriller

PyDriller is a Python framework that helps developers in analyzing Git repositories. With PyDriller you can easily extract information about commits, developers, modified files, diffs, and source code.

Install

pip install pydriller

Quick usage

from pydriller import Repository

for commit in Repository('https://github.com/ishepard/pydriller').traverse_commits():
    print(commit.hash)
    print(commit.msg)
    print(commit.author.name)

    for file in commit.modified_files:
        print(file.filename, ' has changed')

Read the docs for more usage examples. Furthermore, a video is available on Youtube.

How to cite PyDriller

@inproceedings{Spadini2018,
  address = {New York, New York, USA},
  author = {Spadini, Davide and Aniche, Maur\'{i}cio and Bacchelli, Alberto},
  booktitle = {Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering - ESEC/FSE 2018},
  doi = {10.1145/3236024.3264598},
  isbn = {9781450355735},
  keywords = {2018,acm reference format,and alberto bacchelli,davide spadini,git,gitpython,maur\'{i}cio aniche,mining software repositories,pydriller,python},
  pages = {908--911},
  publisher = {ACM Press},
  title = {{PyDriller: Python framework for mining software repositories}},
  url = {http://dl.acm.org/citation.cfm?doid=3236024.3264598},
  year = {2018}
}

How to contribute

First clone the repository:

git clone https://github.com/ishepard/pydriller.git
cd pydriller

(Optional) It is suggested to make use of virtualenv. Therefore, before installing the requirements run:

python3 -m venv venv
source venv/bin/activate

Then, install the requirements:

pip install -r requirements.txt

(Important) I tend to not accept Pull Requests without tests, so:

  • unzip the test-repos.zip zip file
  • inside are many "small repositories" that were manually created to test PyDriller. Use one of your choice to test your feature (check the existing tests for inspiration)
  • if none is suitable for testing your feature, create a new one. Be careful: if you create a new one, do not forget to upload a new zip file test-repos.zip that includes your new repository, otherwise the tests will fail.

To run the tests (using pytest):

unzip test-repos.zip
pip install -r test-requirements.txt
pytest

Acknowledgements

This project has received funding from the European Union's Horizon 2020 research and innovation programme under the Marie Sklodowska-Curie grant agreement No. 642954.

pydriller's People

Contributors

andodet avatar avandeursen avatar babenek avatar butterl avatar cmtg avatar evancasey-allstacks avatar f-fanfan avatar glato avatar gliptak avatar gremat avatar hatrg avatar helgecph avatar ishepard avatar jphgoodwin avatar k----n avatar kanghj avatar knniff avatar ledenel avatar lgtm-migrator avatar lucapascarella avatar marco-c avatar mauricioaniche avatar otethal avatar shantanuo avatar sposs avatar stefanodallapalma avatar thtrummer avatar totoroyyb avatar xserban avatar yusufsn avatar

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.