Add confidence intervals to Forecast model

- add `.low80`, `.high80`, `.low95`, and `.high95` columns
- add check contraints for the confidence intervals
- rename the `.method` column into `.model` for consistency
This commit is contained in:
Alexander Hess 2021-01-20 16:57:39 +01:00
commit f37d8adb9d
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
7 changed files with 461 additions and 25 deletions

View file

@ -21,7 +21,11 @@ log_config.fileConfig(context.config.config_file_name)
def include_object(obj, _name, type_, _reflected, _compare_to):
"""Only include the clean schema into --autogenerate migrations."""
if type_ in {'table', 'column'} and obj.schema != umd_config.CLEAN_SCHEMA:
if ( # noqa:WPS337
type_ in {'table', 'column'}
and hasattr(obj, 'schema') # noqa:WPS421 => fix for rare edge case
and obj.schema != umd_config.CLEAN_SCHEMA
):
return False
return True