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

Feature/5.0 schema #94

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion .github/workflows/test_oonidata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
os: [Ubuntu]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3

Expand Down
2 changes: 0 additions & 2 deletions oonidata/src/oonidata/models/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ class WebAnalysis:
analysis_id: str
observation_id: str

created_at: datetime

# This is the domain name associated with the target, for example for
# facebook it will be www.facebook.com, but also edge-mqtt.facebook.com
target_domain_name: str
Expand Down
17 changes: 14 additions & 3 deletions oonidata/src/oonidata/models/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import datetime
from dataclasses import dataclass
from typing import Any, Optional, Tuple
from typing import Annotated, Any, List, Optional, Tuple
from mashumaro import DataClassDictMixin
from mashumaro.config import BaseConfig, TO_DICT_ADD_OMIT_NONE_FLAG
from typing import Protocol, runtime_checkable
Expand Down Expand Up @@ -35,5 +35,16 @@ class TableModelProtocol(Protocol):

@dataclass
class ProcessingMeta:
processing_start_time: datetime
processing_end_time: Optional[datetime] = None
created_at: datetime


UInt8 = Annotated[int, "UInt8"]
UInt16 = Annotated[int, "UInt16"]
UInt32 = Annotated[int, "UInt32"]

Float64 = Annotated[float, "Float64"]

ArrayString = Annotated[List[str], "Array(String)"]

OptionalDatetime64_3 = Annotated[Optional[datetime], "Nullable(DateTime64(3, 'UTC'))"]
OptionalDatetime = Annotated[Optional[datetime], "Nullable(DateTime('UTC'))"]
Loading
Loading