Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
micpst committed Sep 2, 2024
1 parent db368ca commit d3cbc37
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 136 deletions.
7 changes: 0 additions & 7 deletions src/dbally/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,3 @@ class DbAllyError(Exception):
"""
Base class for all exceptions raised by db-ally.
"""


class UnsupportedAggregationError(DbAllyError):
"""
Error raised when AggregationFormatter is unable to construct a query
with given aggregation.
"""
Empty file.
122 changes: 0 additions & 122 deletions src/dbally/prompt/aggregation.py

This file was deleted.

4 changes: 1 addition & 3 deletions src/dbally/views/structured.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import abc
from collections import defaultdict
from typing import Any, Dict, List, Optional, TypeVar
from typing import Dict, List, Optional

from dbally.audit.event_tracker import EventTracker
from dbally.collection.results import ViewExecutionResult
Expand All @@ -14,8 +14,6 @@
from ..similarity import AbstractSimilarityIndex
from .base import BaseView, IndexLocation

DataT = TypeVar("DataT", bound=Any)


class BaseStructuredView(BaseView):
"""
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/views/test_pandas_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ class MockDataFrameView(DataFrameBaseView):

@view_filter()
def filter_city(self, city: str) -> pd.Series:
return self.data["city"] == city
return self.df["city"] == city

@view_filter()
def filter_year(self, year: int) -> pd.Series:
return self.data["year"] == year
return self.df["year"] == year

@view_filter()
def filter_age(self, age: int) -> pd.Series:
return self.data["age"] == age
return self.df["age"] == age

@view_filter()
def filter_name(self, name: str) -> pd.Series:
return self.data["name"] == name
return self.df["name"] == name

@view_aggregation()
def mean_age_by_city(self) -> AggregationGroup:
Expand Down

0 comments on commit d3cbc37

Please sign in to comment.