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
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fail-fast: false
matrix:
os:
# - macos-12
- macos-15-intel # intel
- macos-latest # arm64
# - windows-latest
- ubuntu-latest
Expand Down
28 changes: 0 additions & 28 deletions src/con_duct/duct_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,10 @@
import time
from types import FrameType
from typing import IO, Any, Callable, Optional, TextIO
import warnings

__version__ = version("con-duct")
__schema_version__ = "0.2.2"

_true_set = {"yes", "true", "t", "y", "1"}
_false_set = {"no", "false", "f", "n", "0"}


def _str2bool(value: str | bool | None) -> bool | None:
if value is None:
return False
if isinstance(value, bool):
return value

val_lower = value.lower()
if val_lower in _true_set:
return True
elif val_lower in _false_set:
return False
else:
raise ValueError(f"Cannot interpret '{value}' as boolean.")


is_mac_intel = sys.platform == "darwin" and os.uname().machine == "x86_64"
if is_mac_intel and not _str2bool(value=os.getenv("DUCT_IGNORE_INTEL_WARNING")):
message = (
"Detected system macOS running on intel architecture - "
"duct may experience issues with sampling and signal handling.\n\n"
"Set the environment variable `DUCT_IGNORE_INTEL_WARNING` to suppress this warning.\n"
)
warnings.warn(message=message, stacklevel=2)
SYSTEM = platform.system()

lgr = logging.getLogger("con-duct")
Expand Down
Loading