Skip to content

Commit ae1e8cd

Browse files
sacca97copernico
authored andcommitted
fixed some stuff
1 parent d5d5fc3 commit ae1e8cd

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

prospector/Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ docker-clean:
3131
@docker-compose down --rmi all -v 2>/dev/null
3232
@echo "$(DONE) Stopped and removed all container and images"
3333

34-
@echo "$(PROGRESS) Cleaning volumes"
35-
@docker volume prune -f
36-
@echo "$(DONE) Cleaned volumes"
34+
# @echo "$(PROGRESS) Cleaning volumes"
35+
# @docker volume prune -f
36+
# @echo "$(DONE) Cleaned volumes"
3737

38-
@echo "$(PROGRESS) Cleaning residue"
39-
@docker system prune -a -f
40-
@echo "$(DONE) Cleaned residue"
38+
# @echo "$(PROGRESS) Cleaning residue"
39+
# @docker system prune -a -f
40+
# @echo "$(DONE) Cleaned residue"
4141

4242

4343
clean:

prospector/client/cli/main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,21 @@ def main(argv): # noqa: C901
9292
with ConsoleWriter("Generating report\n") as console:
9393
match config.report:
9494
case "console":
95-
report.console(results, advisory_record, get_level() < logging.INFO)
95+
report.console_(results, advisory_record, get_level() < logging.INFO)
9696
case "json":
97-
report.json(results, advisory_record, config.report_filename)
97+
report.json_(results, advisory_record, config.report_filename)
9898
case "html":
99-
report.html(results, advisory_record, config.report_filename)
99+
report.html_(results, advisory_record, config.report_filename)
100100
case "all":
101-
report.json(results, advisory_record, config.report_filename)
102-
report.html(results, advisory_record, config.report_filename)
101+
report.json_(results, advisory_record, config.report_filename)
102+
report.html_(results, advisory_record, config.report_filename)
103103
case _:
104104
logger.warning("Invalid report type specified, using 'console'")
105105
console.set_status(MessageStatus.WARNING)
106106
console.print(
107107
f"{config.report} is not a valid report type, 'console' will be used instead",
108108
)
109-
report.console(results, advisory_record, get_level() < logging.INFO)
109+
report.console_(results, advisory_record, get_level() < logging.INFO)
110110

111111
logger.info("\n" + execution_statistics.generate_console_tree())
112112
execution_time = execution_statistics["core"]["execution time"][0]

prospector/client/cli/report.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def default(self, obj):
1919
return json.JSONEncoder.default(self, obj)
2020

2121

22-
def json(
22+
def json_(
2323
results: List[Commit],
2424
advisory_record: AdvisoryRecord,
2525
filename: str = "prospector-report.json",
@@ -38,7 +38,7 @@ def json(
3838
return fn
3939

4040

41-
def html(
41+
def html_(
4242
results: List[Commit],
4343
advisory_record: AdvisoryRecord,
4444
filename: str = "prospector-report.html",
@@ -74,7 +74,7 @@ def html(
7474
return fn
7575

7676

77-
def console(results: List[Commit], advisory_record: AdvisoryRecord, verbose=False):
77+
def console_(results: List[Commit], advisory_record: AdvisoryRecord, verbose=False):
7878
def format_annotations(commit: Commit) -> str:
7979
out = ""
8080
if verbose:

prospector/client/cli/report_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os.path
33
from random import randint
44

5-
from client.cli.report import as_html, as_json
5+
import client.cli.report as report
66
from datamodel.advisory import build_advisory_record
77
from datamodel.commit import Commit
88
from util.sample_data_generation import ( # random_list_of_url,
@@ -45,10 +45,10 @@ def test_report_generation():
4545
os.remove("test_report.html")
4646
if os.path.isfile("test_report.json"):
4747
os.remove("test_report.json")
48-
html = as_html(
48+
html = report.html_(
4949
candidates, advisory, "test_report.html", statistics=sample_statistics()
5050
)
51-
json = as_json(candidates, advisory, "test_report.json")
51+
json = report.json_(candidates, advisory, "test_report.json")
5252

5353
assert os.path.isfile(html)
5454
assert os.path.isfile(json)

prospector/docker/api/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM python:3.10-slim
33
WORKDIR /app
44
ADD . .
55
COPY docker/api/start.sh /app/start.sh
6-
COPY /app/config-example.yaml /app/config.yaml
6+
COPY ./config-sample.yaml /app/config.yaml
77
RUN chmod +x /app/start.sh
88
COPY ./api /app
99
RUN pip install --upgrade pip

0 commit comments

Comments
 (0)