Skip to content
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
13 changes: 0 additions & 13 deletions arch/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ class Aggregation:
"""How source observations are aggregated into the fact value."""

method: str
count_entity: str | None = None
denominator: str | None = None


Expand Down Expand Up @@ -406,18 +405,6 @@ def validate_fact(fact: AggregateFact) -> tuple[ValidationIssue, ...]:
"aggregation.method",
)
)
if (
fact.aggregation.count_entity is not None
and fact.aggregation.count_entity not in ALLOWED_ENTITIES
):
errors.append(
_issue(
"malformed_aggregation",
"Unsupported aggregation count entity: "
f"{fact.aggregation.count_entity!r}",
"aggregation.count_entity",
)
)

_validate_value(errors, fact.value)
_validate_filters(errors, fact.filters)
Expand Down
5 changes: 1 addition & 4 deletions arch/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ def _create_schema(connection: sqlite3.Connection) -> None:
measure_legal_vintage TEXT,
measure_unit TEXT NOT NULL,
aggregation_method TEXT NOT NULL,
aggregation_count_entity TEXT,
aggregation_denominator TEXT,
domain TEXT NOT NULL,
filters_json TEXT NOT NULL,
Expand Down Expand Up @@ -835,7 +834,6 @@ def _insert_aggregate_fact(
measure_legal_vintage,
measure_unit,
aggregation_method,
aggregation_count_entity,
aggregation_denominator,
domain,
filters_json,
Expand All @@ -849,7 +847,7 @@ def _insert_aggregate_fact(
source_extraction_method,
source_method_notes
)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
""",
(
fact_key,
Expand Down Expand Up @@ -890,7 +888,6 @@ def _insert_aggregate_fact(
fact.measure.legal_vintage,
fact.measure.unit,
fact.aggregation.method,
fact.aggregation.count_entity,
fact.aggregation.denominator,
fact.domain,
_json_dumps(fact.filters),
Expand Down
Loading
Loading