SpinW / spinw

SpinW Matlab library for spin wave calculation
http://www.spinw.org
GNU General Public License v3.0
35 stars 15 forks source link

RELEASE PySpinW v4 #190

Closed mducle closed 3 months ago

mducle commented 3 months ago

Now uses the new matlab2python script from libpymcr to generate Python wrappers for Matlab code so you don't need to use m. and so the pydoc system works.

Also fixed some small bugs:


To test, download the files in this zip: pyspinw4_checks.zip

It has an IPython notebook spinw_test.ipynb, a CIF file needed for the notebook and a spinw wheel to install this release. Then create a new conda/mamba environment and run:

mamba create -n pyspinw python=3.11
mamba activate pyspinw
python -m pip install libpymcr
python -m pip install spinw-3.2.0.post32+0121850-py3-none-any.whl
python -m pip install matplotlib notebook
jupyter notebook

Then open the spinw_test.ipynb file and check that it runs without errors.


To compile this release do (from the root folder of the spinw repo)

python -m pip install libpymcr
matlab2python -a swfiles -a external --preamble "import pyspinw; m = pyspinw.Matlab()"
mv matlab_wrapped python/pyspinw/
cd python
mkdir ctf
python mcc_all.py
mkdir pyspinw/ctfs
mv ctf/SpinW*ctf pyspinw/ctfs
python -m pip install .

(to create a wheel use python -m pip wheel . --no-deps instead of the last command).

github-actions[bot] commented 3 months ago

Test Results

    4 files  ±0    112 suites  ±0   4m 45s :stopwatch: - 2m 7s   713 tests ±0    695 :white_check_mark: ±0  18 :zzz: ±0  0 :x: ±0  2 024 runs  ±0  1 988 :white_check_mark: ±0  36 :zzz: ±0  0 :x: ±0 

Results for commit 4795d097. ± Comparison against base commit 3b929c4a.

:recycle: This comment has been updated with latest results.

codecov-commenter commented 3 months ago

Codecov Report

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

Project coverage is 42.14%. Comparing base (3705737) to head (4795d09). Report is 1 commits behind head on master.

Files Patch % Lines
swfiles/sw_plotspec.m 0.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #190 +/- ## ========================================== + Coverage 42.11% 42.14% +0.03% ========================================== Files 240 240 Lines 16079 16091 +12 ========================================== + Hits 6771 6782 +11 - Misses 9308 9309 +1 ```

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