Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove session_totals field from report json #752

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions api/internal/tests/views/test_repo_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,14 +743,12 @@ def test_retrieve_returns_latest_commit_data(self, mocked_get_permissions):
"filename": "test_file_1.py",
"file_index": 2,
"file_totals": [1, 10, 8, 2, 5, "80.00000", 6, 7, 9, 8, 20, 40, 13],
"session_totals": [[0, 10, 8, 2, 0, "80.00000", 0, 0, 0, 0, 0, 0, 0]],
"diff_totals": [0, 2, 1, 1, 0, "50.00000", 0, 0, 0, 0, 0, 0, 0],
},
{
"filename": "test_file_2.py",
"file_index": 0,
"file_totals": [1, 3, 2, 1, 0, "66.66667", 0, 0, 0, 0, 0, 0, 0],
"session_totals": [[0, 3, 2, 1, 0, "66.66667", 0, 0, 0, 0, 0, 0, 0]],
"diff_totals": None,
},
]
Expand Down Expand Up @@ -842,9 +840,6 @@ def side_effect(path, *args, **kwargs):
40,
13,
],
"session_totals": [
[0, 10, 8, 2, 0, "80.00000", 0, 0, 0, 0, 0, 0, 0]
],
"diff_totals": [
0,
2,
Expand Down Expand Up @@ -879,9 +874,6 @@ def side_effect(path, *args, **kwargs):
0,
0,
],
"session_totals": [
[0, 3, 2, 1, 0, "66.66667", 0, 0, 0, 0, 0, 0, 0]
],
"diff_totals": None,
},
]
Expand Down
7 changes: 0 additions & 7 deletions core/tests/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,25 +89,18 @@ def _create(cls, model_class, *args, **kwargs):
"filename": "tests/__init__.py",
"file_index": 0,
"file_totals": [0, 3, 2, 1, 0, "66.66667", 0, 0, 0, 0, 0, 0, 0],
"session_totals": [
[0, 3, 2, 1, 0, "66.66667", 0, 0, 0, 0, 0, 0, 0]
],
"diff_totals": None,
},
{
"filename": "tests/test_sample.py",
"file_index": 1,
"file_totals": [0, 7, 7, 0, 0, "100", 0, 0, 0, 0, 0, 0, 0],
"session_totals": [[0, 7, 7, 0, 0, "100", 0, 0, 0, 0, 0, 0, 0]],
"diff_totals": None,
},
{
"filename": "awesome/__init__.py",
"file_index": 2,
"file_totals": [0, 10, 8, 2, 0, "80.00000", 0, 0, 0, 0, 0, 0, 0],
"session_totals": [
[0, 10, 8, 2, 0, "80.00000", 0, 0, 0, 0, 0, 0, 0]
],
"diff_totals": [0, 2, 1, 1, 0, "50.00000", 0, 0, 0, 0, 0, 0, 0],
},
],
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ factory-boy
fakeredis
freezegun
https://github.com/codecov/opentelem-python/archive/refs/tags/v0.0.4a1.tar.gz#egg=codecovopentelem
https://github.com/codecov/shared/archive/49f1bc9024dab50402e170e367439b6b80e6d8a4.tar.gz#egg=shared
https://github.com/codecov/shared/archive/aacbd7203ffec207adf94d97dadfcbcce55126b7.tar.gz#egg=shared
google-cloud-pubsub
gunicorn>=22.0.0
https://github.com/photocrowd/django-cursor-pagination/archive/f560902696b0c8509e4d95c10ba0d62700181d84.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ sentry-sdk[celery]==1.44.1
# shared
setproctitle==1.1.10
# via -r requirements.in
shared @ https://github.com/codecov/shared/archive/49f1bc9024dab50402e170e367439b6b80e6d8a4.tar.gz
shared @ https://github.com/codecov/shared/archive/aacbd7203ffec207adf94d97dadfcbcce55126b7.tar.gz
# via -r requirements.in
simplejson==3.17.2
# via -r requirements.in
Expand Down
1 change: 0 additions & 1 deletion services/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ def build_files(commit_report: CommitReport) -> dict[str, ReportFileSummary]:
file["filename"]: ReportFileSummary(
file_index=file["file_index"],
file_totals=ReportTotals(*file["file_totals"]),
session_totals=file["session_totals"],
diff_totals=file["diff_totals"],
)
for file in report_details.files_array
Expand Down
16 changes: 0 additions & 16 deletions services/tests/test_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,12 @@ def test_write_report_details_to_storage(self, mocker, db):
"filename": "file_1.go",
"file_index": 0,
"file_totals": [0, 8, 5, 3, 0, "62.50000", 0, 0, 0, 0, 10, 2, 0],
"session_totals": {
"0": [0, 8, 5, 3, 0, "62.50000", 0, 0, 0, 0, 10, 2],
"meta": {"session_count": 1},
},
"diff_totals": None,
},
{
"filename": "file_2.py",
"file_index": 1,
"file_totals": [0, 2, 1, 0, 1, "50.00000", 1, 0, 0, 0, 0, 0, 0],
"session_totals": {
"0": [0, 2, 1, 0, 1, "50.00000", 1],
"meta": {"session_count": 1},
},
"diff_totals": None,
},
]
Expand Down Expand Up @@ -79,20 +71,12 @@ def test_write_report_details_to_storage_no_commitid(self, mocker, db):
"filename": "file_1.go",
"file_index": 0,
"file_totals": [0, 8, 5, 3, 0, "62.50000", 0, 0, 0, 0, 10, 2, 0],
"session_totals": {
"0": [0, 8, 5, 3, 0, "62.50000", 0, 0, 0, 0, 10, 2],
"meta": {"session_count": 1},
},
"diff_totals": None,
},
{
"filename": "file_2.py",
"file_index": 1,
"file_totals": [0, 2, 1, 0, 1, "50.00000", 1, 0, 0, 0, 0, 0, 0],
"session_totals": {
"0": [0, 2, 1, 0, 1, "50.00000", 1],
"meta": {"session_count": 1},
},
"diff_totals": None,
},
]
Expand Down
Loading