RadioAstronomySoftwareGroup / pyuvsim

A ultra-high precision package for simulating radio interferometers in python on compute clusters.
https://pyuvsim.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
42 stars 7 forks source link

Allow psutil #511

Open steven-murray opened 2 days ago

steven-murray commented 2 days ago

Description

This adds psutil to the dependencies for the [sim] extra, and moves the import of resource / psutil into the only function that uses it. This means that Windows can now run sims.

Note that some tests still fail on windows (e.g. using miriad files). I haven't dug deep into it, but we could try putting xfails on thins we know will fail and start testing against windows if we want. For now, this update means all matvis tests pass on windows.

Motivation and Context

In testing matvis against pyuvsim, I was trying to use the GPU, and on my laptop that's easier to do on Windows. I found that the pyuvsim comparison tests broke on Windows however, simply because of the import of resource, which is unix-only. This fixes it.

Types of changes

Checklist:

For all pull requests:

Build or continuous integration change checklist:

codecov[bot] commented 2 days ago

Codecov Report

Attention: Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 99.80%. Comparing base (6ea6af1) to head (92bcd91).

Files with missing lines Patch % Lines
src/pyuvsim/mpi.py 66.66% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #511 +/- ## =========================================== - Coverage 100.00% 99.80% -0.20% =========================================== Files 10 10 Lines 2024 2031 +7 =========================================== + Hits 2024 2027 +3 - Misses 0 4 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

bhazelton commented 1 day ago

This is great! The myriad part of pyuvdata doesn't work on Windows, so that's why those break.