forked from tsdev/spinw
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix upload paths in release.py * Add toolbox creation functions * Copy CITATION and license file for mltbx instead * Fix build failure * Release script now errors if no wheels or mltbx exist Also move eigen folder outside of external/ so it is not included in the ctf file (bloats it by 20MB) * Dummy release 4.0.1 to test script * Bugfixes to release.py * [no ci] Add developer docs on release workflow * [no ci] Revert version in CITATION and CHANGELOG
- Loading branch information
Showing
10 changed files
with
249 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Release workflow | ||
|
||
The release workflow is mostly automated using continuous integration builds, | ||
but some actions and triggering a release needs to be done manually by the developer. | ||
|
||
To create a release: | ||
|
||
1. Create a branch and edit the `CHANGELOG.md` and `CITATION.cff` files to update it with a new version number. | ||
2. Create a new PR from the branch. The PR must have `RELEASE` in the title. | ||
3. This will trigger a build with multiple versions of python. | ||
4. Review the branch, check that all tests for all python versions pass and if so merge. | ||
5. Once merged, the CI should create a github release in "Draft" mode. | ||
6. Check that the release page is correct (has the wheel and `mltbx` files and the release notes are ok). | ||
7. Check that the wheel and `mltbx` toolbox can be installed and work. | ||
8. Then manually trigger the `Publish to PyPI` action to upload the wheel to PyPI. | ||
|
||
|
||
In particular, in step 1: | ||
|
||
* in `CHANGELOG.md` the first title line must have the form: | ||
|
||
``` | ||
# [<newver>](https://github.com/spinw/spinw/compare/<oldver>...<newver>) | ||
``` | ||
|
||
* in `CITATION.cff` the `version` field must be updated with a new version | ||
|
||
If the version string in these two files do not match, or if the version string matches an existing git tag, | ||
then the CI build will fail. | ||
|
||
Also note that in step 8, after uploading to PyPI the release cannot be changed on PyPI (only deleted). | ||
If a release is deleted, you have to then create a new release version (PyPI does not allow overwriting previous releases). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
currdir = fileparts(mfilename('fullpath')); | ||
mltbx_dir = fullfile(currdir, 'mltbx'); | ||
if exist(mltbx_dir) | ||
rmdir(mltbx_dir, 's'); | ||
end | ||
mkdir(fullfile(currdir, 'mltbx')); | ||
copyfile(fullfile(currdir, '..', 'CITATION.cff'), fullfile(currdir, 'mltbx')); | ||
copyfile(fullfile(currdir, '..', 'license.txt'), fullfile(currdir, 'mltbx')); | ||
copyfile(fullfile(currdir, '..', 'swfiles'), fullfile(currdir, 'mltbx', 'swfiles')); | ||
copyfile(fullfile(currdir, '..', 'external'), fullfile(currdir, 'mltbx', 'external')); | ||
copyfile(fullfile(currdir, '..', 'dat_files'), fullfile(currdir, 'mltbx', 'dat_files')); | ||
copyfile(fullfile(currdir, 'spinw_on.m'), fullfile(currdir, 'mltbx')); | ||
matlab.addons.toolbox.packageToolbox("spinw.prj", "spinw.mltbx"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<deployment-project plugin="plugin.toolbox" plugin-version="1.0"> | ||
<configuration file="spinw.prj" location="" name="spinw" target="target.toolbox" target-name="Package Toolbox"> | ||
<param.appname>SpinW</param.appname> | ||
<param.authnamewatermark>Duc Le</param.authnamewatermark> | ||
<param.email>duc.le@stfc.ac.uk</param.email> | ||
<param.company /> | ||
<param.summary>A library for spin wave calculation</param.summary> | ||
<param.description>A library for spin wave calculation</param.description> | ||
<param.screenshot /> | ||
<param.version>4.0</param.version> | ||
<param.output>${PROJECT_ROOT}/spinW.mltbx</param.output> | ||
<param.products.name /> | ||
<param.products.id /> | ||
<param.products.version /> | ||
<param.platforms /> | ||
<param.guid>859ef126-ff2e-4f45-8bff-60126ff3ff61</param.guid> | ||
<param.exclude.filters /> | ||
<param.exclude.pcodedmfiles>true</param.exclude.pcodedmfiles> | ||
<param.examples /> | ||
<param.demosxml /> | ||
<param.apps /> | ||
<param.registered.apps /> | ||
<param.docs /> | ||
<param.getting.started.guide /> | ||
<param.matlabpath.excludes /> | ||
<param.javaclasspath.excludes /> | ||
<param.exported.on.package>false</param.exported.on.package> | ||
<param.required.addons /> | ||
<param.matlab.project.id /> | ||
<param.matlab.project.name /> | ||
<param.release.start /> | ||
<param.release.end /> | ||
<param.release.current.only>false</param.release.current.only> | ||
<param.compatiblity.windows>true</param.compatiblity.windows> | ||
<param.compatiblity.macos>true</param.compatiblity.macos> | ||
<param.compatiblity.linux>true</param.compatiblity.linux> | ||
<param.compatiblity.matlabonline>true</param.compatiblity.matlabonline> | ||
<param.installation.map /> | ||
<param.additional.sw.names /> | ||
<param.additional.sw.licenses /> | ||
<param.additional.sw.win.url /> | ||
<param.additional.sw.mac.url /> | ||
<param.additional.sw.linux.url /> | ||
<unset> | ||
<param.company /> | ||
<param.screenshot /> | ||
<param.output /> | ||
<param.products.name /> | ||
<param.products.id /> | ||
<param.products.version /> | ||
<param.platforms /> | ||
<param.exclude.filters /> | ||
<param.exclude.pcodedmfiles /> | ||
<param.examples /> | ||
<param.demosxml /> | ||
<param.apps /> | ||
<param.registered.apps /> | ||
<param.docs /> | ||
<param.getting.started.guide /> | ||
<param.matlabpath.excludes /> | ||
<param.javaclasspath.excludes /> | ||
<param.exported.on.package /> | ||
<param.required.addons /> | ||
<param.matlab.project.id /> | ||
<param.matlab.project.name /> | ||
<param.release.start /> | ||
<param.release.end /> | ||
<param.release.current.only /> | ||
<param.compatiblity.windows /> | ||
<param.compatiblity.macos /> | ||
<param.compatiblity.linux /> | ||
<param.compatiblity.matlabonline /> | ||
<param.installation.map /> | ||
<param.additional.sw.names /> | ||
<param.additional.sw.licenses /> | ||
<param.additional.sw.win.url /> | ||
<param.additional.sw.mac.url /> | ||
<param.additional.sw.linux.url /> | ||
</unset> | ||
<fileset.rootdir> | ||
<file>${PROJECT_ROOT}/mltbx</file> | ||
</fileset.rootdir> | ||
<fileset.rootfiles /> | ||
<fileset.depfun.included /> | ||
<fileset.depfun.excluded /> | ||
<fileset.package /> | ||
<build-deliverables> | ||
<file location="${PROJECT_ROOT}" name="spinW.mltbx" optional="false">spinW.mltbx</file> | ||
</build-deliverables> | ||
<workflow /> | ||
<matlab> | ||
<root>D:/MATLAB/R2024a</root> | ||
<toolboxes /> | ||
</matlab> | ||
<platform> | ||
<unix>false</unix> | ||
<mac>false</mac> | ||
<windows>true</windows> | ||
<win2k>false</win2k> | ||
<winxp>false</winxp> | ||
<vista>false</vista> | ||
<linux>false</linux> | ||
<solaris>false</solaris> | ||
<osver>10.0</osver> | ||
<os32>false</os32> | ||
<os64>true</os64> | ||
<arch>win64</arch> | ||
<matlab>true</matlab> | ||
</platform> | ||
</configuration> | ||
</deployment-project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
if exist('spinw', 'class') ~= 8 | ||
currdir = fileparts(mfilename('fullpath')); | ||
addpath(genpath(fullfile(currdir, 'swfiles'))); | ||
addpath(genpath(fullfile(currdir, 'external'))); | ||
addpath(genpath(fullfile(currdir, 'dat_files'))); | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters