devitocodes / devito

DSL and compiler framework for automated finite-differences and stencil computation
http://www.devitoproject.org
MIT License
537 stars 221 forks source link

arch: Ensure compiler check catches permission errors #2340

Closed gbruer15 closed 2 months ago

gbruer15 commented 3 months ago

I added a test for #2336, but I'm not sure if it will actually error on the bug I was encountering, so I'd like to run the standard test suite to make sure.

Closes #2336

gbruer15 commented 3 months ago

I tested locally and it's fine. The issue is I'm not sure how I should consistently trigger the PermissionDenied error to ensure it's being caught.

I could make a file without execute permissions and delete it afterwards. I'm not sure if that will be portable for the OS's that Devito supports, though.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 66.18%. Comparing base (e2743e0) to head (a1dabe9).

Files Patch % Lines
devito/arch/compiler.py 50.00% 1 Missing :warning:
devito/mpi/distributed.py 80.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2340 +/- ## =========================================== - Coverage 86.72% 66.18% -20.54% =========================================== Files 232 184 -48 Lines 43641 28818 -14823 Branches 8075 6381 -1694 =========================================== - Hits 37848 19074 -18774 - Misses 5084 8891 +3807 - Partials 709 853 +144 ```

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

FabioLuporini commented 2 months ago

there are a few pep8 issues to be resolved: https://github.com/devitocodes/devito/actions/runs/8525302940/job/23365391849?pr=2340