-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PySpinW implementation #143
Conversation
Pyspinw (Initial Version)
Remove R2020a, R2020b as too old
Try to fix upload
Try full build script
Add ctf directory as it was removed
Fix depreciation warning
Add Tag from version
Codecov Report
@@ Coverage Diff @@
## master #143 +/- ##
==========================================
- Coverage 38.73% 38.67% -0.06%
==========================================
Files 239 239
Lines 15795 15829 +34
==========================================
+ Hits 6118 6122 +4
- Misses 9677 9707 +30
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. A couple of typos in the code, and some comments regarding versions and the actions yml file...
At the moment a release will be created on the SpinW repo if there is a tag.
So to create a release you would do git tag v0.0.3 && git push origin v0.0.3
? (But you have to manually change the version number in the toml
file?
The find command does not seem to be working on windows, even with a bash shell
Can @mducle or @RichardWaiteSTFC have a look at the failed test. It is probably a tolerance issue, but I do not know if it is known to be temperamental. |
@wardsimon Yes, it's a flaky test of diff --git a/+sw_tests/+unit_tests/unittest_spinw_optmagk.m b/+sw_tests/+unit_tests/unittest_spinw_optmagk.m
index 4d184cf..2d04862 100644
--- a/+sw_tests/+unit_tests/unittest_spinw_optmagk.m
+++ b/+sw_tests/+unit_tests/unittest_spinw_optmagk.m
@@ -55,7 +55,7 @@ classdef unittest_spinw_optmagk < sw_tests.unit_tests.unittest_super
function test_fm_chain_optk(testCase)
testCase.swobj.addmatrix('label', 'J1', 'value', -1);
testCase.swobj.addcoupling('mat', 'J1', 'bond', 1);
- out = testCase.swobj.optmagk;
+ out = testCase.swobj.optmagk('seed', 1);
out.stat = rmfield(out.stat, 'nFunEvals');
expected_mag_str = testCase.default_mag_str; |
This pull request deals with the creation of a python wheel.
A wheel is created in the following steps:
At the moment a release will be created on the SpinW repo if there is a tag.
In order to run the code a version of MATLAB (R2021a-R2023a) or corresponding runtime must be installed.
Please install with
pip install pyspinw*.whl
This package can now be used in python if you have a version of MATLAB or MCR available on the machine.
The package will try to automatically detect your installation, however if it is in a non-standard location, the path and version will have to be especified.
Example
An example would be:
Known limitations
At the moment graphics will not work on macOS systems and is disabled.