Skip to content

Commit

Permalink
Merge branch 'master' into issue/856
Browse files Browse the repository at this point in the history
  • Loading branch information
DecFox committed Aug 14, 2024
2 parents 78b53f0 + 48aa72e commit ab26179
Show file tree
Hide file tree
Showing 61 changed files with 2,778 additions and 3,829 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/test_ooniapi_oonimeasurements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: test ooniapi/oonimeasurements
on: push
jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install hatch
run: pip install hatch

- name: Run all tests
run: make test-cov
working-directory: ./ooniapi/services/oonimeasurements/

- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
flags: oonimeasurements
working-directory: ./ooniapi/services/oonimeasurements/
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ def upgrade() -> None:

def downgrade() -> None:
op.drop_table("oonirun_nettest")
op.drop_table("oonirun")
op.drop_table("oonirun")
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
"""init oonifindings
Revision ID: a037e908f3a0
Revises: c9119c05cf42
Create Date: 2024-07-17 16:45:25.752551
"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'a037e908f3a0'
down_revision: Union[str, None] = "c9119c05cf42"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
op.create_table(
"oonifinding",
sa.Column(
"finding_id",
sa.String(),
nullable=False,
primary_key=True,
),
sa.Column("finding_slug", sa.String(), nullable=True),
sa.Column("create_time", sa.DateTime(timezone=True), nullable=False),
sa.Column("update_time", sa.DateTime(timezone=True), nullable=False),
sa.Column("start_time", sa.DateTime(timezone=True), nullable=True),
sa.Column("end_time", sa.DateTime(timezone=True), nullable=True),
sa.Column("creator_account_id", sa.String(), nullable=False),
sa.Column("title", sa.String(), nullable=False),
sa.Column("short_description", sa.String(), nullable=False),
sa.Column("text", sa.String(), nullable=False),
sa.Column("reported_by", sa.String(), nullable=False),
sa.Column("email_address", sa.String(), nullable=False),
sa.Column("event_type", sa.String(), nullable=False),
sa.Column("published", sa.Integer(), nullable=False),
sa.Column("deleted", sa.Integer(), nullable=False, default=0),
sa.Column("country_codes", sa.JSON(), nullable=True),
sa.Column("asns", sa.JSON(), nullable=True),
sa.Column("domains", sa.JSON(), nullable=True),
sa.Column("tags", sa.JSON(), nullable=True),
sa.Column("links", sa.JSON(), nullable=True),
sa.Column("test_names", sa.JSON(), nullable=True),
)


def downgrade() -> None:
op.drop_table("oonifinding")
1 change: 0 additions & 1 deletion ooniapi/common/src/common/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from datetime import datetime, timezone
from typing import List, Dict, Any
from sqlalchemy.types import DateTime, TypeDecorator


Expand Down
54 changes: 0 additions & 54 deletions ooniapi/services/measurements/pyproject.toml

This file was deleted.

This file was deleted.

53 changes: 0 additions & 53 deletions ooniapi/services/measurements/src/measurements/main.py

This file was deleted.

100 changes: 0 additions & 100 deletions ooniapi/services/measurements/tests/conftest.py

This file was deleted.

44 changes: 0 additions & 44 deletions ooniapi/services/measurements/tests/fixtures/1_schema.sql

This file was deleted.

Loading

0 comments on commit ab26179

Please sign in to comment.