-
Notifications
You must be signed in to change notification settings - Fork 0
Home
swordysrepo edited this page Dec 13, 2021
·
22 revisions
- python version 3+
- pydriller https://pypi.org/project/PyDriller/
Run this project via a command-line that has access to a python3 installation, enter the project directory where stats.py file is located and run
python3 stats.py
You will need to create a config.py file that has the following stored in variables:
- The repository link you would like to track - variable String REPO_LINK
- The repository location on your file system - variable String LOCAL_PROJECT_DIRECTORY
- The directories you wish to ignore when adding up the "modified lines" count - list object IGNORE_DIRECTORY
- The list of nicknamed contributors and their relative GitHub Usernames - dictionary (key-value pairs) object CONTRIBUTORS
These will automatically be imported into the main script from your created config.py
file when running the simple command in the command-line.
See example config.py file below
#----------------------------------------------------------------
# the list of contributors and their relative github usernames
# Note: the key is the name that will be used in the report.
CONTRIBUTORS = {
"person1": ["person1GithubCommitUsername1","person1GithubCommitUsername2"],
"person2": ["person2GithubCommitUsername1"],
}
# where the current repository is located on your file system
LOCAL_PROJECT_DIRECTORY = "/home/<myusername>/<my main github directory>/<cloned repo folder>"
# The directories you wish to ignore for adding up lines changed
IGNORE_DIRECTORY = [".git", "temp", ".github", "target", "models", "data","lib"]
# the online url for the repository
REPO_LINK = "https://github.com/<username>/<repo>"
#---------------------------------------------------------------