-
Notifications
You must be signed in to change notification settings - Fork 5
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/filters #348
feature/filters #348
Conversation
- Adds `amora.filters.DateFilter` - Adds `amora.filters.ValueFilter`
…quired` so that data is grouped by source_name
🤖 Gandalf - Continuos AppSecEste repositório está sendo monitorando de forma automática e contínua em busca de achados que possam comprometer à segurança da aplicação. Para maiores detalhes, acesse aqui à plataforma. |
|
||
|
||
def test_dashboard_with_value_filter(mock_dashboard_with_value_filter): | ||
filtered_dashboard = mock_dashboard_with_value_filter.filter(source_name="iPhone") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tl;dr;
base = question.question_func().cte(question.question_func.__name__) | ||
return select(base).where(base.c[self.field] == value) | ||
|
||
question_func.__doc__ = question.question_func.__doc__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Não dá para usar https://docs.python.org/3.10/library/functools.html#functools.wraps ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O problema aqui é "como criar em runtime uma função com __name__
e __doc__
específicos". Não consegui ver como seria possível fazer isso com functools.wraps
. Consegue me ajudar?
amora.providers.bigquery.dry_run_query
amora.question.Question.answer_columns
amora.questions.parse_name
amora.filters.Filter
amora.filters.DateRangeFilter
amora.filters.AcceptedValuesFilter
amora.dashboard.Dashboard.filter
amora.dashboard.Dashboard.to_markdown
how_many_data_points_where_acquired
so that data is grouped by source_name