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
8 changes: 4 additions & 4 deletions opal/services/tests/test_charts.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_generate_line_chart_missing_columns(caplog: LogCaptureFixture) -> None:
error = (
'An error occurred in ChartService::generate_line_chart(chart_data: ChartData):\n'
+ 'chart_data.data should contain the following columns: x, y, legend\n'
+ "The columns received: Index(['not_x', 'not_y', 'not_legend'], dtype='object')\n\n"
+ "The columns received: Index(['not_x', 'not_y', 'not_legend'], dtype='str')\n\n"
)
chart = chart_service.generate_line_chart(chart_data)
assert caplog.records[0].message == error
Expand All @@ -55,7 +55,7 @@ def test_generate_line_chart_missing_columns(caplog: LogCaptureFixture) -> None:
error = (
'An error occurred in ChartService::generate_line_chart(chart_data: ChartData):\n'
+ 'chart_data.data should contain the following columns: x, y, legend\n'
+ "The columns received: Index(['x', 'y', 'not_legend'], dtype='object')\n\n"
+ "The columns received: Index(['x', 'y', 'not_legend'], dtype='str')\n\n"
)
chart = chart_service.generate_line_chart(chart_data)
assert caplog.records[1].message == error
Expand Down Expand Up @@ -102,7 +102,7 @@ def test_generate_error_bar_chart_missing_columns(caplog: LogCaptureFixture) ->
error = (
'An error occurred in ChartService::generate_error_bar_chart(chart_data: ChartData):\n'
+ 'chart_data.data should contain the following columns: x, error_max, error_min, legend\n'
+ "The columns received: Index(['not_x', 'not_error_max', 'not_error_min', 'not_legend'], dtype='object')\n\n"
+ "The columns received: Index(['not_x', 'not_error_max', 'not_error_min', 'not_legend'], dtype='str')\n\n"
)
chart = chart_service.generate_error_bar_chart(chart_data)
assert caplog.records[0].message == error
Expand All @@ -120,7 +120,7 @@ def test_generate_error_bar_chart_missing_columns(caplog: LogCaptureFixture) ->
error = (
'An error occurred in ChartService::generate_error_bar_chart(chart_data: ChartData):\n'
+ 'chart_data.data should contain the following columns: x, error_max, error_min, legend\n'
+ "The columns received: Index(['x', 'error_max', 'error_min', 'not_legend'], dtype='object')\n\n"
+ "The columns received: Index(['x', 'error_max', 'error_min', 'not_legend'], dtype='str')\n\n"
)
chart = chart_service.generate_error_bar_chart(chart_data)
assert caplog.records[1].message == error
Expand Down
3 changes: 1 addition & 2 deletions opal/usage_statistics/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import pandas as pd
import pytest
import pytz
from pytest_django.asserts import assertRaisesMessage

from opal.caregivers import factories as caregiver_factories
Expand Down Expand Up @@ -1064,7 +1063,7 @@ def test_export_data_invalid_file_name(tmp_path: Path) -> None:

def test_convert_to_naive() -> None:
"""Ensure that datetime conversion function remove the timezone information."""
sample_datetime = pd.Timestamp(dt.datetime.now(pytz.utc))
sample_datetime = pd.Timestamp(dt.datetime.now(dt.UTC))
assert sample_datetime.tz
sample_datetime = stats_utils._convert_to_naive(sample_datetime)
assert not sample_datetime.tz
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependencies = [
"kaleido==1.2.0",
"mysqlclient==2.2.8",
"openpyxl==3.1.5",
"pandas==2.3.3",
"pandas==3.0.1",
# required for ImageFields
"pillow==12.1.1",
"plotly==6.5.2",
Expand Down Expand Up @@ -67,7 +67,7 @@ dev = [
"djangorestframework-stubs==3.16.8",
"factory-boy==3.3.3",
"mypy[faster-cache]==1.19.1",
"pandas-stubs==2.3.3.260113",
"pandas-stubs==3.0.0.260204",
"prek==0.3.4",
"pytest==9.0.2",
"pytest-django==4.11.1",
Expand Down
5 changes: 5 additions & 0 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
"matchPackageNames": ["django-stubs", "django-stubs-ext", "djangorestframework-stubs"],
"groupName": "django-stubs"
},
// Group pandas updates together
{
"matchPackageNames": ["pandas", "pandas-stubs"],
"groupName": "pandas packages"
},
// Group all pytest package updates together
{
"matchPackageNames": ["/pytest/"],
Expand Down
69 changes: 28 additions & 41 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.