Skip to content

Commit

Permalink
adding documentation of new parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ishepard committed Jan 22, 2019
1 parent 5a1a2b8 commit d32a42c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ PyDriller comes with a set of common commit filters that you can apply:
* **only\_no\_merge** *(bool)*: only analyses commits that are not merge commits.
* **only\_authors** *(List[str])*: only analyses commits that are made by these authors. The check is made on the username, NOT the email.
* **only\_commits** *(List[str])*: only these commits will be analyzed.
* **filepath** *(str)*: only commits that modified this file will be analyzed.
* **only\_modifications\_with\_file\_types** *(List[str])*: only analyses commits in which at least one modification was done in that file type, e.g., if you pass ".java", then, the it will visit only commits in which at least one Java file was modified; clearly, it will skip other commits.

Examples::
Expand All @@ -104,6 +105,11 @@ Examples::
# Only these 3 commits
RepositoryMining('path/to/the/repo', only_commits=['hash1', 'hash2', 'hash3']).traverse_commits()

# Only commit that modified "Matricula.javax"
RepositoryMining('path/to/the/repo', filepath='Matricula.javax').traverse_commits()

# Only commits that modified a java file
RepositoryMining('path/to/the/repo', only_modifications_with_file_types=['.java']).traverse_commits()



1 change: 1 addition & 0 deletions pydriller/repository_mining.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def __init__(self, path_to_repo: Union[str, List[str]],
:param bool only_no_merge: if True, merges will not be analyzed
:param List[str] only_authors: only commits of these authors will be analyzed (the check is done on the username, NOT the email)
:param List[str] only_commits: only these commits will be analyzed
:param str filepath: only commits that modified this file will be analyzed
"""

self._sanity_check_repos(path_to_repo)
Expand Down

0 comments on commit d32a42c

Please sign in to comment.