refactors logging and config

This commit is contained in:
2025-02-10 16:34:11 +01:00
parent d1f562ce94
commit 33621bdec4
14 changed files with 114 additions and 147 deletions

View File

@@ -2,7 +2,6 @@ import os
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from flask import url_for
from abc import ABC, abstractmethod
from .base import BaseAnalysis

View File

@@ -1,7 +1,6 @@
import os
import pandas as pd
import plotly.graph_objects as go
from flask import url_for
from abc import ABC, abstractmethod
from .base import BaseAnalysis

View File

@@ -4,13 +4,9 @@ import seaborn as sns
from .basePlotAnalysis import BasePlotAnalysis
from flask import current_app, url_for
from app.logging_config import get_logger
import matplotlib
matplotlib.use('Agg')
logger = get_logger()
class PlotTopActiveUsers(BasePlotAnalysis):
"""
Class for analyzing the most active users and generating a bar chart.

View File

@@ -3,7 +3,6 @@ import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from .basePlotAnalysis import BasePlotAnalysis
from flask import current_app, url_for
import matplotlib
matplotlib.use('Agg')

View File

@@ -4,13 +4,9 @@ import seaborn as sns
from .basePlotAnalysis import BasePlotAnalysis
from flask import current_app, url_for
from app.logging_config import get_logger
import matplotlib
matplotlib.use('Agg')
logger = get_logger()
class PlotLineActivityAllUsers(BasePlotAnalysis):
"""
Class for analyzing user activity trends over multiple days and generating a line graph.

View File

@@ -5,10 +5,6 @@ import plotly.graph_objects as go
from .basePlotlyAnalysis import BasePlotlyAnalysis
from flask import current_app, url_for
from app.logging_config import get_logger
logger = get_logger()
class PlotlyActivityHeatmap(BasePlotlyAnalysis):
"""
Class for analyzing user activity trends over multiple days and generating an interactive heatmap.

View File

@@ -4,10 +4,6 @@ from plotly.subplots import make_subplots
from .basePlotlyAnalysis import BasePlotlyAnalysis
from flask import current_app, url_for
from app.logging_config import get_logger
logger = get_logger()
class PlotlyLineActivityAllUsers(BasePlotlyAnalysis):
"""
Class for analyzing user activity trends over multiple days and generating an interactive line graph.