Skip to content

Commit

Permalink
structure changed. now everything is in pydriller
Browse files Browse the repository at this point in the history
  • Loading branch information
ishepard committed Apr 4, 2018
1 parent 41b16cc commit 4be0402
Show file tree
Hide file tree
Showing 31 changed files with 72 additions and 58 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions domain/commit.py → pydriller/domain/commit.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from _datetime import datetime
from typing import List
from domain.developer import Developer
from domain.modification import Modification
from domain.modification_type import ModificationType
from pydriller.domain.developer import Developer
from pydriller.domain.modification import Modification
from pydriller.domain.modification_type import ModificationType


class Commit:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from domain.modification_type import ModificationType
from pydriller.domain.modification_type import ModificationType
import re
import os

Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions repository_mining.py → pydriller/repository_mining.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import logging

from domain.commit import Commit
from pydriller.domain.commit import Commit
logging.getLogger(__name__).addHandler(logging.NullHandler())

from typing import List
from scm.git_repository import GitRepository
from domain.change_set import ChangeSet
from scm.commit_visitor import CommitVisitor
from pydriller.scm.git_repository import GitRepository
from pydriller.domain.change_set import ChangeSet
from pydriller.scm.commit_visitor import CommitVisitor
from datetime import datetime
from concurrent.futures import ThreadPoolExecutor

Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions scm/commit_visitor.py → pydriller/scm/commit_visitor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import abc
from scm.git_repository import GitRepository
from domain.commit import Commit
from scm.persistence_mechanism import PersistenceMechanism
from pydriller.scm.git_repository import GitRepository
from pydriller.domain.commit import Commit
from pydriller.scm.persistence_mechanism import PersistenceMechanism


class CommitVisitor(abc.ABC):
Expand Down
8 changes: 4 additions & 4 deletions scm/git_repository.py → pydriller/scm/git_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
from typing import List
from git import Git, Repo, Diff, GitCommandError
from git.objects.util import tzoffset
from domain.change_set import ChangeSet
from domain.commit import Commit
from domain.developer import Developer
from domain.modification_type import ModificationType
from pydriller.domain.change_set import ChangeSet
from pydriller.domain.commit import Commit
from pydriller.domain.developer import Developer
from pydriller.domain.modification_type import ModificationType
from threading import Lock
from datetime import datetime

Expand Down
File renamed without changes.
File renamed without changes.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from domain.commit import Commit
from scm.commit_visitor import CommitVisitor
from scm.git_repository import GitRepository
from scm.persistence_mechanism import PersistenceMechanism
from pydriller.domain.commit import Commit
from pydriller.scm.commit_visitor import CommitVisitor
from pydriller.scm.git_repository import GitRepository
from pydriller.scm.persistence_mechanism import PersistenceMechanism


class ConcurrencyVisitorTest(CommitVisitor):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import pytest
from dateutil import tz

from repository_mining import RepositoryMining
from tests.visitor_test import VisitorTest
from pydriller.repository_mining import RepositoryMining
from pydriller.tests.visitor_test import VisitorTest


@pytest.yield_fixture(scope="function")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import logging
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO)

from repository_mining import RepositoryMining
from tests.visitor_test import VisitorTest
from pydriller.repository_mining import RepositoryMining
from pydriller.tests.visitor_test import VisitorTest


def test_between_revisions():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import logging
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO)

from repository_mining import RepositoryMining
from tests.visitor_test import VisitorTest
from pydriller.repository_mining import RepositoryMining
from pydriller.tests.visitor_test import VisitorTest


def test_mod_with_file_types():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest

from repository_mining import RepositoryMining
from tests.integration.concurrency_visitor_test import ConcurrencyVisitorTest
from pydriller.repository_mining import RepositoryMining
from pydriller.tests.integration.concurrency_visitor_test import ConcurrencyVisitorTest

results = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import pytest
from dateutil import tz

from domain.commit import Commit
from repository_mining import RepositoryMining
from tests.visitor_test import VisitorTest
from pydriller.domain.commit import Commit
from pydriller.repository_mining import RepositoryMining
from pydriller.tests.visitor_test import VisitorTest

from datetime import datetime
path2 = 'test-repos/git-2/'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import logging
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO)

from repository_mining import RepositoryMining
from tests.visitor_test import VisitorTest
from pydriller.repository_mining import RepositoryMining
from pydriller.tests.visitor_test import VisitorTest


def test_mod_with_file_types():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import pytest

from repository_mining import RepositoryMining
from tests.visitor_test import VisitorTest
from pydriller.repository_mining import RepositoryMining
from pydriller.tests.visitor_test import VisitorTest


@pytest.yield_fixture(scope="function")
Expand Down
4 changes: 2 additions & 2 deletions tests/test_commit.py → pydriller/tests/test_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import pytest

from domain.commit import Commit
from scm.git_repository import GitRepository
from pydriller.domain.commit import Commit
from pydriller.scm.git_repository import GitRepository


@pytest.yield_fixture(scope="module")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO)

import pytest
from scm.git_repository import GitRepository
from domain.change_set import ChangeSet
from domain.modification_type import ModificationType
from pydriller.scm.git_repository import GitRepository
from pydriller.domain.change_set import ChangeSet
from pydriller.domain.modification_type import ModificationType
from datetime import datetime
from dateutil import tz

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import logging
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO)

from domain.commit import Commit
from repository_mining import RepositoryMining
from scm.commit_visitor import CommitVisitor
from scm.git_repository import GitRepository
from scm.persistence_mechanism import PersistenceMechanism
from pydriller.domain.commit import Commit
from pydriller.repository_mining import RepositoryMining
from pydriller.scm.commit_visitor import CommitVisitor
from pydriller.scm.git_repository import GitRepository
from pydriller.scm.persistence_mechanism import PersistenceMechanism
from datetime import datetime


Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import logging
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO)

import pytest

from domain.modification import Modification
from domain.modification_type import ModificationType
from pydriller.domain.modification import Modification
from pydriller.domain.modification_type import ModificationType


def test_should_get_adds_and_removes():
Expand Down
8 changes: 2 additions & 6 deletions tests/test_ranges.py → pydriller/tests/test_ranges.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO)

import pytest
from domain.commit import Commit
from repository_mining import RepositoryMining
from scm.commit_visitor import CommitVisitor
from scm.git_repository import GitRepository
from scm.persistence_mechanism import PersistenceMechanism
from pydriller.repository_mining import RepositoryMining
from datetime import datetime
from dateutil import tz
from tests.visitor_test import VisitorTest
from pydriller.tests.visitor_test import VisitorTest

to_zone = tz.gettz('GMT+1')
dt = datetime(2018, 3, 22, 10, 41, 30, tzinfo=to_zone)
Expand Down
8 changes: 4 additions & 4 deletions tests/visitor_test.py → pydriller/tests/visitor_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from domain.commit import Commit
from scm.commit_visitor import CommitVisitor
from scm.git_repository import GitRepository
from scm.persistence_mechanism import PersistenceMechanism
from pydriller.domain.commit import Commit
from pydriller.scm.commit_visitor import CommitVisitor
from pydriller.scm.git_repository import GitRepository
from pydriller.scm.persistence_mechanism import PersistenceMechanism


class VisitorTest(CommitVisitor):
Expand Down
20 changes: 20 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from setuptools import setup, find_packages

install_requires = ['gitpython']
test_requires = ['pytest', 'python-dateutil', 'psutil']


setup(
author_email='spadini.davide@gmail.com',
description='Framework for MSR',
name='pydriller',
version='1.0.1',
packages=find_packages('.'),
url='https://github.com/ishepard/pydriller',
package_dir={'pydriller': 'pydriller'},
license='BSD License',
author='Davide Spadini',
python_requires='>=3.6',
install_requires=install_requires,
test_requirements=test_requires + install_requires
)

0 comments on commit 4be0402

Please sign in to comment.