PyDriller 2.7__tar.gz → 2.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. pydriller-2.8/MANIFEST.in +2 -0
  2. {pydriller-2.7 → pydriller-2.8}/PKG-INFO +13 -3
  3. {pydriller-2.7 → pydriller-2.8}/PyDriller.egg-info/PKG-INFO +13 -3
  4. {pydriller-2.7 → pydriller-2.8}/PyDriller.egg-info/SOURCES.txt +3 -0
  5. pydriller-2.8/PyDriller.egg-info/requires.txt +4 -0
  6. {pydriller-2.7 → pydriller-2.8}/pydriller/__init__.py +1 -1
  7. pydriller-2.8/pydriller/domain/__init__.py +4 -0
  8. {pydriller-2.7 → pydriller-2.8}/pydriller/domain/commit.py +6 -1
  9. pydriller-2.8/pydriller/utils/check_git_version.py +19 -0
  10. pydriller-2.7/PyDriller.egg-info/requires.txt → pydriller-2.8/requirements.txt +1 -1
  11. {pydriller-2.7 → pydriller-2.8}/setup.py +2 -0
  12. pydriller-2.8/test-requirements.txt +5 -0
  13. pydriller-2.8/tests/test_check_git_version.py +24 -0
  14. pydriller-2.7/pydriller/domain/__init__.py +0 -4
  15. pydriller-2.7/pydriller/utils/check_git_version.py +0 -19
  16. pydriller-2.7/tests/test_check_git_version.py +0 -24
  17. {pydriller-2.7 → pydriller-2.8}/LICENSE +0 -0
  18. {pydriller-2.7 → pydriller-2.8}/PyDriller.egg-info/dependency_links.txt +0 -0
  19. {pydriller-2.7 → pydriller-2.8}/PyDriller.egg-info/top_level.txt +0 -0
  20. {pydriller-2.7 → pydriller-2.8}/README.md +0 -0
  21. {pydriller-2.7 → pydriller-2.8}/pydriller/domain/developer.py +0 -0
  22. {pydriller-2.7 → pydriller-2.8}/pydriller/git.py +0 -0
  23. {pydriller-2.7 → pydriller-2.8}/pydriller/metrics/__init__.py +0 -0
  24. {pydriller-2.7 → pydriller-2.8}/pydriller/metrics/process/__init__.py +0 -0
  25. {pydriller-2.7 → pydriller-2.8}/pydriller/metrics/process/change_set.py +0 -0
  26. {pydriller-2.7 → pydriller-2.8}/pydriller/metrics/process/code_churn.py +0 -0
  27. {pydriller-2.7 → pydriller-2.8}/pydriller/metrics/process/commits_count.py +0 -0
  28. {pydriller-2.7 → pydriller-2.8}/pydriller/metrics/process/contributors_count.py +0 -0
  29. {pydriller-2.7 → pydriller-2.8}/pydriller/metrics/process/contributors_experience.py +0 -0
  30. {pydriller-2.7 → pydriller-2.8}/pydriller/metrics/process/history_complexity.py +0 -0
  31. {pydriller-2.7 → pydriller-2.8}/pydriller/metrics/process/hunks_count.py +0 -0
  32. {pydriller-2.7 → pydriller-2.8}/pydriller/metrics/process/lines_count.py +0 -0
  33. {pydriller-2.7 → pydriller-2.8}/pydriller/metrics/process/process_metric.py +0 -0
  34. {pydriller-2.7 → pydriller-2.8}/pydriller/repository.py +0 -0
  35. {pydriller-2.7 → pydriller-2.8}/pydriller/utils/__init__.py +0 -0
  36. {pydriller-2.7 → pydriller-2.8}/pydriller/utils/conf.py +0 -0
  37. {pydriller-2.7 → pydriller-2.8}/pydriller/utils/mailmap.py +0 -0
  38. {pydriller-2.7 → pydriller-2.8}/setup.cfg +0 -0
  39. {pydriller-2.7 → pydriller-2.8}/tests/test_commit.py +0 -0
  40. {pydriller-2.7 → pydriller-2.8}/tests/test_developer.py +0 -0
  41. {pydriller-2.7 → pydriller-2.8}/tests/test_diff.py +0 -0
  42. {pydriller-2.7 → pydriller-2.8}/tests/test_dmm.py +0 -0
  43. {pydriller-2.7 → pydriller-2.8}/tests/test_git.py +0 -0
  44. {pydriller-2.7 → pydriller-2.8}/tests/test_mailmap.py +0 -0
  45. {pydriller-2.7 → pydriller-2.8}/tests/test_memory_consumption.py +0 -0
  46. {pydriller-2.7 → pydriller-2.8}/tests/test_repository.py +0 -0
@@ -0,0 +1,2 @@
1
+ include requirements.txt
2
+ include test-requirements.txt
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: PyDriller
3
- Version: 2.7
3
+ Version: 2.8
4
4
  Summary: Framework for MSR
5
5
  Home-page: https://github.com/ishepard/pydriller
6
6
  Author: Davide Spadini
@@ -25,6 +25,16 @@ License-File: LICENSE
25
25
  Requires-Dist: gitpython
26
26
  Requires-Dist: pytz
27
27
  Requires-Dist: types-pytz
28
- Requires-Dist: lizard
28
+ Requires-Dist: lizard==1.17.10
29
+ Dynamic: author
30
+ Dynamic: author-email
31
+ Dynamic: classifier
32
+ Dynamic: description
33
+ Dynamic: home-page
34
+ Dynamic: license
35
+ Dynamic: license-file
36
+ Dynamic: requires-dist
37
+ Dynamic: requires-python
38
+ Dynamic: summary
29
39
 
30
40
  PyDriller is a Python framework that helps developers on mining software repositories. With PyDriller you can easily extract information from any Git repository, such as commits, developers, modifications, diffs, and source codes, and quickly export CSV files.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: PyDriller
3
- Version: 2.7
3
+ Version: 2.8
4
4
  Summary: Framework for MSR
5
5
  Home-page: https://github.com/ishepard/pydriller
6
6
  Author: Davide Spadini
@@ -25,6 +25,16 @@ License-File: LICENSE
25
25
  Requires-Dist: gitpython
26
26
  Requires-Dist: pytz
27
27
  Requires-Dist: types-pytz
28
- Requires-Dist: lizard
28
+ Requires-Dist: lizard==1.17.10
29
+ Dynamic: author
30
+ Dynamic: author-email
31
+ Dynamic: classifier
32
+ Dynamic: description
33
+ Dynamic: home-page
34
+ Dynamic: license
35
+ Dynamic: license-file
36
+ Dynamic: requires-dist
37
+ Dynamic: requires-python
38
+ Dynamic: summary
29
39
 
30
40
  PyDriller is a Python framework that helps developers on mining software repositories. With PyDriller you can easily extract information from any Git repository, such as commits, developers, modifications, diffs, and source codes, and quickly export CSV files.
@@ -1,6 +1,9 @@
1
1
  LICENSE
2
+ MANIFEST.in
2
3
  README.md
4
+ requirements.txt
3
5
  setup.py
6
+ test-requirements.txt
4
7
  PyDriller.egg-info/PKG-INFO
5
8
  PyDriller.egg-info/SOURCES.txt
6
9
  PyDriller.egg-info/dependency_links.txt
@@ -0,0 +1,4 @@
1
+ gitpython
2
+ pytz
3
+ types-pytz
4
+ lizard==1.17.10
@@ -2,4 +2,4 @@
2
2
  from .domain.commit import Commit, ModifiedFile, ModificationType # noqa
3
3
  from .repository import Repository, Git # noqa
4
4
 
5
- __version__ = "2.7"
5
+ __version__ = "2.8"
@@ -0,0 +1,4 @@
1
+ # from pydriller.utils.check_git_version import CheckGitVersion
2
+ #
3
+ #
4
+ # CheckGitVersion().check_git_version()
@@ -542,6 +542,7 @@ class Commit:
542
542
  """
543
543
  self._c_object = commit
544
544
  self._conf = conf
545
+ self._stats_cache = None
545
546
 
546
547
  def __hash__(self) -> int:
547
548
  """
@@ -688,6 +689,9 @@ class Commit:
688
689
  return len(self._c_object.parents) > 1
689
690
 
690
691
  def _stats(self):
692
+ if self._stats_cache is not None:
693
+ return self._stats_cache
694
+
691
695
  if len(self.parents) == 0:
692
696
  text = self._conf.get('git').repo.git.diff_tree(self.hash, "--", numstat=True, root=True)
693
697
  text2 = ""
@@ -698,7 +702,8 @@ class Commit:
698
702
  else:
699
703
  text = self._conf.get('git').repo.git.diff(self._c_object.parents[0].hexsha, self._c_object.hexsha, "--", numstat=True, root=True)
700
704
 
701
- return self._list_from_string(text)
705
+ self._stats_cache = self._list_from_string(text)
706
+ return self._stats_cache
702
707
 
703
708
  def _list_from_string(self, text: str):
704
709
  total = {"insertions": 0, "deletions": 0, "lines": 0, "files": 0}
@@ -0,0 +1,19 @@
1
+ # import subprocess
2
+ # import re
3
+ #
4
+ #
5
+ # class GitVersion(Exception):
6
+ # def __init__(self, message):
7
+ # super().__init__(message)
8
+ #
9
+ #
10
+ # class CheckGitVersion:
11
+ # def check_git_version(self):
12
+ # git_version = (
13
+ # subprocess.check_output(["git", "--version"]).decode("ascii").strip()
14
+ # )
15
+ # version_number = re.findall(r"[0-9]+\.[0-9]+", git_version)[0]
16
+ # if float(version_number) < 2.38:
17
+ # raise GitVersion(
18
+ # f"Current git version is {version_number}. Minimum supported version is 2.38."
19
+ # )
@@ -1,4 +1,4 @@
1
1
  gitpython
2
2
  pytz
3
3
  types-pytz
4
- lizard
4
+ lizard==1.17.10
@@ -33,6 +33,8 @@ setup(
33
33
  author_email='spadini.davide@gmail.com',
34
34
  version=get_version(),
35
35
  packages=find_packages('.', exclude=['tests*']),
36
+ include_package_data=True,
37
+ data_files=[('', ['requirements.txt', 'test-requirements.txt'])],
36
38
  url='https://github.com/ishepard/pydriller',
37
39
  license='Apache License',
38
40
  package_dir={'pydriller': 'pydriller'},
@@ -0,0 +1,5 @@
1
+ mock
2
+ types-mock
3
+ pytest
4
+ psutil
5
+ pytest-mock
@@ -0,0 +1,24 @@
1
+ # from unittest.mock import patch
2
+ # from pydriller.utils.check_git_version import CheckGitVersion, GitVersion
3
+ # from contextlib import nullcontext as does_not_raise
4
+ #
5
+ # import pytest
6
+ #
7
+ #
8
+ # @pytest.mark.parametrize(
9
+ # "version_number,expectation",
10
+ # [
11
+ # ("3.2.0", does_not_raise()),
12
+ # ("2.38.1", does_not_raise()),
13
+ # ("2.0.0", pytest.raises(GitVersion)),
14
+ # ],
15
+ # )
16
+ # def test_extracts_correct_version(version_number, expectation):
17
+ # with patch(
18
+ # "pydriller.utils.check_git_version.subprocess.check_output"
19
+ # ) as mock_git_version:
20
+ # mock_git_version().decode.return_value.strip.return_value = (
21
+ # f"git version {version_number}"
22
+ # )
23
+ # with expectation:
24
+ # CheckGitVersion().check_git_version()
@@ -1,4 +0,0 @@
1
- from pydriller.utils.check_git_version import CheckGitVersion
2
-
3
-
4
- CheckGitVersion().check_git_version()
@@ -1,19 +0,0 @@
1
- import subprocess
2
- import re
3
-
4
-
5
- class GitVersion(Exception):
6
- def __init__(self, message):
7
- super().__init__(message)
8
-
9
-
10
- class CheckGitVersion:
11
- def check_git_version(self):
12
- git_version = (
13
- subprocess.check_output(["git", "--version"]).decode("ascii").strip()
14
- )
15
- version_number = re.findall(r"[0-9]+\.[0-9]+", git_version)[0]
16
- if float(version_number) < 2.38:
17
- raise GitVersion(
18
- f"Current git version is {version_number}. Minimum supported version is 2.38."
19
- )
@@ -1,24 +0,0 @@
1
- from unittest.mock import patch
2
- from pydriller.utils.check_git_version import CheckGitVersion, GitVersion
3
- from contextlib import nullcontext as does_not_raise
4
-
5
- import pytest
6
-
7
-
8
- @pytest.mark.parametrize(
9
- "version_number,expectation",
10
- [
11
- ("3.2.0", does_not_raise()),
12
- ("2.38.1", does_not_raise()),
13
- ("2.0.0", pytest.raises(GitVersion)),
14
- ],
15
- )
16
- def test_extracts_correct_version(version_number, expectation):
17
- with patch(
18
- "pydriller.utils.check_git_version.subprocess.check_output"
19
- ) as mock_git_version:
20
- mock_git_version().decode.return_value.strip.return_value = (
21
- f"git version {version_number}"
22
- )
23
- with expectation:
24
- CheckGitVersion().check_git_version()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes