Skip to content

Commit 0d788ff

Browse files
committed
fix: Add Python 3.12 compatibility
- Update requires-python to >=3.11,<3.13 to explicitly support Python 3.12 - Update huggingface_hub from 0.17.3 to 0.21.4 for Py3.12 compatibility - Disable HuggingfaceHubIntegration in sentry_sdk to fix version conflicts Fixes #333
1 parent e26a827 commit 0d788ff

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dynamic = ["version"]
88
description = "Open Source Solar Forecasting for a Site"
99
authors = [{ name = "Peter Dudfield", email = "info@openclimatefix.org" }]
1010
readme = "README.md"
11-
requires-python = ">=3.11"
11+
requires-python = ">=3.11,<3.13"
1212
license = { text = "MIT" }
1313

1414
dependencies = [
@@ -27,7 +27,7 @@ dependencies = [
2727
"pydantic_settings",
2828
"httpx",
2929
"sentry_sdk",
30-
"huggingface_hub==0.17.3"
30+
"huggingface_hub==0.21.4"
3131
]
3232

3333
[project.urls]

quartz_solar_forecast/utils/sentry_logging.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
import sentry_sdk
77

8+
from sentry_sdk.integrations.huggingface_hub import HuggingfaceHubIntegration
9+
810
from quartz_solar_forecast.pydantic_models import PVSite
911

1012
version = importlib.metadata.version("quartz_solar_forecast")
@@ -14,7 +16,11 @@
1416
)
1517

1618
SENTRY_DSN = "https://b2b6f3c97299f81464bc16ad0d516d0b@o400768.ingest.us.sentry.io/4508439933157376"
17-
sentry_sdk.init(dsn=SENTRY_DSN, traces_sample_rate=1.0)
19+
sentry_sdk.init(
20+
dsn=SENTRY_DSN,
21+
traces_sample_rate=1.0,
22+
disabled_integrations=[HuggingfaceHubIntegration],
23+
)
1824

1925

2026
def write_sentry(params):

0 commit comments

Comments
 (0)