qpv-research-group / rayflare

Open-source, integrated optical modelling of complex stacks
Other
31 stars 11 forks source link

Updates for S4 installation on macOS #39

Closed phoebe-p closed 2 years ago

phoebe-p commented 2 years ago

As referenced in #37, there were installation issues with S4 on macOS which thus affected the use of RayFlare. There seem to have been two causes for this issue:

  1. An issue caused by two code snippets in main_python.c in S4, which contained implicit function declaration which cause on error on at least some versions of macOS (it is unclear why these did not cause an error on Linux even though the C99 code standard is used in both cases). This has been fixed in the S4 repository
  2. An issue with the boost libraries. Previously, it was recommended that users run make boost before make S4_pyext which automatically downloads and compiles the boost libraries for your system. However, it seems that on macOS this library is not actually linked successfully while compiling S4 and this causes an error in the installation. In addition, running make boost is very time-consuming and prone to errors as it requires downloading from a URL, so the installation instructions now instead recommend installing the boost libraries through Homebrew (on macOS) or apt-get (Ubuntu).

The documentation has been updated to reflect the second change. To help with catching errors like these immediately in the future, the S4/RCWA-related tests now also run on mac-latest in GitHub Actions when changes are pushed. There was an issue where these tests would hang with the plotting functions, so the plotting has been removed, which will decrease coverage a bit.

codecov[bot] commented 2 years ago

Codecov Report

Merging #39 (0f4192b) into devel (b169ec8) will decrease coverage by 1.44%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel      #39      +/-   ##
==========================================
- Coverage   92.74%   91.30%   -1.45%     
==========================================
  Files          20       20              
  Lines        2495     2495              
==========================================
- Hits         2314     2278      -36     
- Misses        181      217      +36     
Impacted Files Coverage Δ
rayflare/rigorous_coupled_wave_analysis/rcwa.py 84.54% <0.00%> (-5.80%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b169ec8...0f4192b. Read the comment docs.