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

feat: add capability for writing to bigquery #993

Merged
merged 3 commits into from
Jan 9, 2025
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
Empty file.
35 changes: 35 additions & 0 deletions generated_proto/testrun/ta_testrun_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

83 changes: 83 additions & 0 deletions generated_proto/testrun/ta_testrun_pb2.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
from typing import ClassVar as _ClassVar
from typing import Iterable as _Iterable
from typing import Optional as _Optional
from typing import Union as _Union

from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf.internal import containers as _containers
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper

DESCRIPTOR: _descriptor.FileDescriptor

class TestRun(_message.Message):
__slots__ = (
"timestamp",
"name",
"classname",
"testsuite",
"computed_name",
"outcome",
"failure_message",
"duration_seconds",
"repoid",
"commit_sha",
"branch_name",
"flags",
"filename",
"framework",
)
class Outcome(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
__slots__ = ()
PASSED: _ClassVar[TestRun.Outcome]
FAILED: _ClassVar[TestRun.Outcome]
SKIPPED: _ClassVar[TestRun.Outcome]

PASSED: TestRun.Outcome
FAILED: TestRun.Outcome
SKIPPED: TestRun.Outcome
TIMESTAMP_FIELD_NUMBER: _ClassVar[int]
NAME_FIELD_NUMBER: _ClassVar[int]
CLASSNAME_FIELD_NUMBER: _ClassVar[int]
TESTSUITE_FIELD_NUMBER: _ClassVar[int]
COMPUTED_NAME_FIELD_NUMBER: _ClassVar[int]
OUTCOME_FIELD_NUMBER: _ClassVar[int]
FAILURE_MESSAGE_FIELD_NUMBER: _ClassVar[int]
DURATION_SECONDS_FIELD_NUMBER: _ClassVar[int]
REPOID_FIELD_NUMBER: _ClassVar[int]
COMMIT_SHA_FIELD_NUMBER: _ClassVar[int]
BRANCH_NAME_FIELD_NUMBER: _ClassVar[int]
FLAGS_FIELD_NUMBER: _ClassVar[int]
FILENAME_FIELD_NUMBER: _ClassVar[int]
FRAMEWORK_FIELD_NUMBER: _ClassVar[int]
timestamp: int
name: str
classname: str
testsuite: str
computed_name: str
outcome: TestRun.Outcome
failure_message: str
duration_seconds: float
repoid: int
commit_sha: str
branch_name: str
flags: _containers.RepeatedScalarFieldContainer[str]
filename: str
framework: str
def __init__(
self,
timestamp: _Optional[int] = ...,
name: _Optional[str] = ...,
classname: _Optional[str] = ...,
testsuite: _Optional[str] = ...,
computed_name: _Optional[str] = ...,
outcome: _Optional[_Union[TestRun.Outcome, str]] = ...,
failure_message: _Optional[str] = ...,
duration_seconds: _Optional[float] = ...,
repoid: _Optional[int] = ...,
commit_sha: _Optional[str] = ...,
branch_name: _Optional[str] = ...,
flags: _Optional[_Iterable[str]] = ...,
filename: _Optional[str] = ...,
framework: _Optional[str] = ...,
) -> None: ...
30 changes: 30 additions & 0 deletions protobuf/ta_testrun.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
syntax = "proto2";

message TestRun {
optional int64 timestamp = 1;
optional string name = 2;
optional string classname = 3;
optional string testsuite = 4;
optional string computed_name = 5;

enum Outcome {
PASSED = 0;
FAILED = 1;
SKIPPED = 2;
}

optional Outcome outcome = 6;

optional string failure_message = 7;
optional float duration_seconds = 8;

optional int64 repoid = 10;
optional string commit_sha = 11;

optional string branch_name = 12;

repeated string flags = 13;

optional string filename = 14;
optional string framework = 15;
}
3 changes: 3 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ coverage
Django>=4.2.16
django-postgres-extra>=2.0.8
factory-boy
google-cloud-bigquery>=3.27.0
google-cloud-bigquery-storage>=2.27.0
google-cloud-pubsub
google-cloud-storage>=2.10.0
grpcio>=1.66.2
Expand All @@ -26,6 +28,7 @@ pre-commit
polars==1.12.0
proto-plus>=1.25.0
psycopg2>=2.9.10
protobuf>=5.29.2
pydantic>=2.9.0
PyJWT>=2.4.0
pytest
Expand Down
58 changes: 49 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ coverage==7.5.0
# pytest-cov
cryptography==43.0.1
# via shared
deprecated==1.2.15
# via
# opentelemetry-api
# opentelemetry-semantic-conventions
distlib==0.3.7
# via virtualenv
distro==1.8.0
Expand Down Expand Up @@ -109,18 +113,29 @@ freezegun==1.5.0
# via pytest-freezegun
google-api-core==2.23.0
# via
# google-cloud-bigquery
# google-cloud-bigquery-storage
# google-cloud-core
# google-cloud-pubsub
# google-cloud-storage
google-auth==2.36.0
# via
# google-api-core
# google-cloud-bigquery
# google-cloud-bigquery-storage
# google-cloud-core
# google-cloud-pubsub
# google-cloud-storage
# shared
google-cloud-core==2.3.3
# via google-cloud-storage
google-cloud-pubsub==2.18.4
google-cloud-bigquery==3.27.0
# via -r requirements.in
google-cloud-bigquery-storage==2.27.0
# via -r requirements.in
google-cloud-core==2.4.1
# via
# google-cloud-bigquery
# google-cloud-storage
google-cloud-pubsub==2.27.1
# via
# -r requirements.in
# shared
Expand All @@ -133,13 +148,15 @@ google-crc32c==1.1.2
# google-cloud-storage
# google-resumable-media
google-resumable-media==2.7.2
# via google-cloud-storage
googleapis-common-protos==1.59.1
# via
# google-cloud-bigquery
# google-cloud-storage
googleapis-common-protos==1.66.0
# via
# google-api-core
# grpc-google-iam-v1
# grpcio-status
grpc-google-iam-v1==0.12.6
grpc-google-iam-v1==0.14.0
# via google-cloud-pubsub
grpcio==1.68.1
# via
Expand Down Expand Up @@ -173,6 +190,8 @@ idna==3.7
# yarl
ijson==3.2.3
# via shared
importlib-metadata==8.5.0
# via opentelemetry-api
iniconfig==1.1.1
# via pytest
jinja2==3.1.4
Expand Down Expand Up @@ -205,12 +224,23 @@ oauthlib==3.1.0
# via shared
openai==1.2.4
# via -r requirements.in
opentelemetry-api==1.29.0
# via
# google-cloud-pubsub
# opentelemetry-sdk
# opentelemetry-semantic-conventions
opentelemetry-sdk==1.29.0
# via google-cloud-pubsub
opentelemetry-semantic-conventions==0.50b0
# via opentelemetry-sdk
orjson==3.10.11
# via
# -r requirements.in
# shared
packaging==24.1
# via pytest
# via
# google-cloud-bigquery
# pytest
platformdirs==3.11.0
# via virtualenv
pluggy==1.5.0
Expand All @@ -229,10 +259,13 @@ proto-plus==1.25.0
# via
# -r requirements.in
# google-api-core
# google-cloud-bigquery-storage
# google-cloud-pubsub
protobuf==4.24.3
protobuf==5.29.2
# via
# -r requirements.in
# google-api-core
# google-cloud-bigquery-storage
# google-cloud-pubsub
# googleapis-common-protos
# grpc-google-iam-v1
Expand Down Expand Up @@ -292,6 +325,7 @@ python-dateutil==2.9.0.post0
# django-postgres-extra
# faker
# freezegun
# google-cloud-bigquery
# time-machine
python-json-logger==0.1.11
# via -r requirements.in
Expand Down Expand Up @@ -319,6 +353,7 @@ requests==2.32.3
# -r requirements.in
# analytics-python
# google-api-core
# google-cloud-bigquery
# google-cloud-storage
# shared
# stripe
Expand Down Expand Up @@ -379,6 +414,7 @@ tqdm==4.66.1
typing-extensions==4.12.2
# via
# openai
# opentelemetry-sdk
# pydantic
# pydantic-core
# stripe
Expand All @@ -403,9 +439,13 @@ virtualenv==20.24.5
wcwidth==0.2.5
# via prompt-toolkit
wrapt==1.16.0
# via vcrpy
# via
# deprecated
# vcrpy
yarl==1.9.4
# via vcrpy
zipp==3.21.0
# via importlib-metadata
zstandard==0.23.0
# via
# -r requirements.in
Expand Down
Loading
Loading