File tree Expand file tree Collapse file tree 6 files changed +422
-624
lines changed Expand file tree Collapse file tree 6 files changed +422
-624
lines changed Original file line number Diff line number Diff line change 4343 run : |
4444 python -m pip install --upgrade uv
4545 uv venv
46- uv pip install maturin pytest pytest-cov pytest-xdist
46+ # Install maturin first to build the package
47+ uv pip install maturin
48+
49+ - name : Build and install Python package with dev dependencies
50+ run : |
51+ # Build and install the package with all dev dependencies
52+ uv run maturin develop --extras=dev
4753
4854 - name : Rust format check
4955 run : cargo fmt --all -- --check
5460 - name : Run Rust tests
5561 run : cargo test --verbose
5662
57- - name : Build and install Python package
58- run : uv run maturin develop
59-
6063 - name : Run Python tests
6164 run : uv run pytest tests/ -v --cov=logxide --cov-report=xml
6265
Original file line number Diff line number Diff line change 2424import time
2525from typing import Any
2626
27- # Configure Sentry BEFORE importing LogXide
28- import sentry_sdk
29- from sentry_sdk .integrations .logging import LoggingIntegration
27+ # Check if Sentry SDK is available
28+ try :
29+ import sentry_sdk
30+ from sentry_sdk .integrations .logging import LoggingIntegration
31+
32+ HAS_SENTRY_SDK = True
33+ except ImportError :
34+ HAS_SENTRY_SDK = False
35+ print ("⚠️ sentry-sdk is not installed." )
36+ print (" Install it with: pip install logxide[sentry]" )
37+ print (" Exiting example." )
38+ sys .exit (1 )
3039
3140# Get Sentry DSN from environment or use a demo DSN
3241SENTRY_DSN = os .getenv ("SENTRY_DSN" )
Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ features = ["pyo3/extension-module"]
5757module-name = " logxide"
5858
5959[project .optional-dependencies ]
60+ sentry = [
61+ " sentry-sdk>=1.40.0" ,
62+ ]
6063dev = [
6164 " pytest" ,
6265 " pytest-cov" ,
You can’t perform that action at this time.
0 commit comments