ratt-ru / shadeMS

Rapid Measurement Set plotting with dask-ms and datashader
20 stars 6 forks source link

os.sched_getaffinity is only available on Linux #109

Closed AlecThomson closed 1 year ago

AlecThomson commented 1 year ago

Hi there,

The core initialisation line in __innit__.py https://github.com/ratt-ru/shadeMS/blob/4026ff44e5831c3369905a80205e8b08035ccfbe/shade_ms/__init__.py#L6 breaks on non-linux systems. e.g. on macOS it produces

AttributeError: module 'os' has no attribute 'sched_getaffinity'

I'd recommend a simple change to use os.cpu_count() - I'll open a little PR to solve this issue.