-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec7b8aa
commit 7a29f9e
Showing
7 changed files
with
84 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,45 @@ | ||
import os | ||
import pathlib | ||
|
||
import config | ||
from diff import gen_diff | ||
from index import gen_index | ||
from utils import check_call | ||
import shutil | ||
|
||
|
||
def debug_main(): | ||
# pull some repos for test | ||
check_call(["git", "clone", "--depth=2", "https://github.com/gin-gonic/gin.git"]) | ||
# clone junit4 repository | ||
check_call( | ||
["git", "clone", "--depth=2", "https://github.com/junit-team/junit4.git"] | ||
) | ||
junit4_dir = pathlib.Path(config.USER_DIR) / "junit4" | ||
gen_index( | ||
"java", | ||
junit4_dir.as_posix(), | ||
"scip-java index -- " | ||
"package -DskipTests " | ||
"--batch-mode " | ||
"--errors " | ||
"--settings .github/workflows/settings.xml", | ||
) | ||
os.chdir(junit4_dir) | ||
gen_diff(junit4_dir.as_posix(), "HEAD~1", "HEAD", "") | ||
os.chdir(config.USER_DIR) | ||
shutil.rmtree(junit4_dir) | ||
|
||
# clone gin repository | ||
check_call(["git", "clone", "--depth=2", "https://github.com/gin-gonic/gin.git"]) | ||
gen_index("golang", "gin", "") | ||
|
||
os.chdir("gin") | ||
gen_diff("HEAD~1", "HEAD", "") | ||
os.chdir("..") | ||
|
||
# clean up | ||
shutil.rmtree("gin") | ||
|
||
# clone requests repository | ||
check_call(["git", "clone", "--depth=2", "https://github.com/psf/requests.git"]) | ||
gen_index("python", "requests", "") | ||
os.chdir("requests") | ||
gen_diff("HEAD~1", "HEAD", "") | ||
os.chdir("..") | ||
shutil.rmtree("requests") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from index import gen_index | ||
from main import export_csv_table, load_index_data | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import subprocess | ||
from loguru import logger | ||
|
||
|
||
def check_call(commands: list): | ||
logger.info(f"check calling: {commands}") | ||
subprocess.check_call(commands) |