Skip to content

Commit a8482bd

Browse files
fix imports (#140)
1 parent 37acd6f commit a8482bd

16 files changed

+48
-46
lines changed

.github/workflows/large-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
run: pip install -r requirements.txt
2323

2424
- name: Run test
25-
run: python3 test_token_usage.py --tt1 ${{ secrets.TEST_TOKEN_GITHUB }} --tt2 ${{ secrets.SECOND_TEST_TOKEN_GITHUB }} --repo moevm/github_repo_commitment_calc --out out.csv
25+
run: PYTHONPATH=. python3 tests/test_token_usage.py --tt1 ${{ secrets.TEST_TOKEN_GITHUB }} --tt2 ${{ secrets.SECOND_TEST_TOKEN_GITHUB }} --repo moevm/github_repo_commitment_calc --out out.csv

src/main.py renamed to main.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import argparse
22
import traceback
33

4-
import commits_parser
5-
import contributors_parser
6-
import export_sheets
7-
import git_logger
8-
import invites_parser
9-
import issues_parser
10-
import pull_requests_parser
11-
import wikipars
12-
import workflow_runs_parser
13-
from utils import parse_time
4+
from src import commits_parser
5+
from src import contributors_parser
6+
from src import export_sheets
7+
from src import git_logger
8+
from src import invites_parser
9+
from src import issues_parser
10+
from src import pull_requests_parser
11+
from src import wikipars
12+
from src import workflow_runs_parser
13+
from src.utils import parse_time
1414

1515

1616
def parse_args():

src/ForgejoRepoAPI.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import isodate
55
from pyforgejo import PyforgejoApi
66

7-
from interface_wrapper import (
7+
from src.interface_wrapper import (
88
Branch,
99
Comment,
1010
Commit,

src/GitHubRepoAPI.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from github import Github, GithubException
22

3-
from interface_wrapper import (
3+
from src.interface_wrapper import (
44
Branch,
55
Comment,
66
Commit,

src/__init__.py

Whitespace-only changes.

src/commits_parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
import pytz
77

8-
from constants import EMPTY_FIELD, GOOGLE_MAX_CELL_LEN, TIMEDELTA, TIMEZONE
9-
from interface_wrapper import IRepositoryAPI, Repository
10-
from utils import logger
8+
from src.constants import EMPTY_FIELD, GOOGLE_MAX_CELL_LEN, TIMEDELTA, TIMEZONE
9+
from src.interface_wrapper import IRepositoryAPI, Repository
10+
from src.utils import logger
1111

1212

1313
@dataclass(kw_only=True, frozen=True)

src/contributors_parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
from time import sleep
33
from typing import Generator
44

5-
from constants import EMPTY_FIELD, TIMEDELTA
6-
from interface_wrapper import IRepositoryAPI, Repository
7-
from utils import logger
5+
from src.constants import EMPTY_FIELD, TIMEDELTA
6+
from src.interface_wrapper import IRepositoryAPI, Repository
7+
from src.utils import logger
88

99

1010
@dataclass(kw_only=True, frozen=True)

src/git_logger.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
from interface_wrapper import (
2-
RepositoryFactory,
3-
IRepositoryAPI
4-
)
5-
from GitHubRepoAPI import GitHubRepoAPI
61
from time import sleep
2+
73
import requests
84

9-
TIMEDELTA = 0.05
10-
TIMEZONE = 'Europe/Moscow'
5+
from src.GitHubRepoAPI import GitHubRepoAPI
6+
from src.interface_wrapper import (
7+
RepositoryFactory,
8+
IRepositoryAPI
9+
)
10+
from src.constants import (
11+
TIMEDELTA,
12+
)
1113

1214

1315
def login(token, base_url):

src/interface_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ def get_base_url(self) -> str:
201201
class RepositoryFactory:
202202
@staticmethod
203203
def create_api(token: str, base_url: str | None = None) -> IRepositoryAPI:
204-
from ForgejoRepoAPI import ForgejoRepoAPI
205-
from GitHubRepoAPI import GitHubRepoAPI
204+
from src.ForgejoRepoAPI import ForgejoRepoAPI
205+
from src.GitHubRepoAPI import GitHubRepoAPI
206206

207207
errors = []
208208

src/invites_parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
from time import sleep
33
from typing import Generator
44

5-
from constants import TIMEDELTA
6-
from interface_wrapper import IRepositoryAPI, Repository
7-
from utils import logger
5+
from src.constants import TIMEDELTA
6+
from src.interface_wrapper import IRepositoryAPI, Repository
7+
from src.utils import logger
88

99

1010
@dataclass(kw_only=True, frozen=True)

0 commit comments

Comments
 (0)