From d7d53bb9d6fd7cc8ab8356108f139021c84164eb Mon Sep 17 00:00:00 2001 From: afisher1 <4552674+afisher1@users.noreply.github.com> Date: Fri, 19 Jul 2024 15:58:54 -0700 Subject: [PATCH 1/5] Updating Matlab/Octave bindings for v3.5.3. Adding poetry project file for matHELICS python environment. --- matlabBindings/+helics/HelicsFederateFlags.m | 1 + matlabBindings/+helics/HelicsHandleOptions.m | 1 + poetry.lock | 92 ++++++++++++++++++++ pyproject.toml | 16 ++++ 4 files changed, 110 insertions(+) create mode 100644 poetry.lock create mode 100644 pyproject.toml diff --git a/matlabBindings/+helics/HelicsFederateFlags.m b/matlabBindings/+helics/HelicsFederateFlags.m index bffaa89..db4f208 100644 --- a/matlabBindings/+helics/HelicsFederateFlags.m +++ b/matlabBindings/+helics/HelicsFederateFlags.m @@ -15,6 +15,7 @@ % HELICS_FLAG_SINGLE_THREAD_FEDERATE: value:27 flag indicating that the federate will only interact on a single thread % HELICS_FLAG_MULTI_THREAD_CORE: value:28 flag indicating use of a thread safe core % HELICS_FLAG_SINGLE_THREAD_CORE: value:29 flag indicating use of a single threaded core +% HELICS_FLAG_REENTRANT: value:38 flag indicating the federate can be reentrant % HELICS_FLAG_IGNORE_TIME_MISMATCH_WARNINGS: value:67 used to not display warnings on mismatched requested times % HELICS_FLAG_STRICT_CONFIG_CHECKING: value:75 specify that checking on configuration files should be strict and throw and error on any invalid values % HELICS_FLAG_USE_JSON_SERIALIZATION: value:79 specify that the federate should use json serialization for all data types diff --git a/matlabBindings/+helics/HelicsHandleOptions.m b/matlabBindings/+helics/HelicsHandleOptions.m index 5037fc9..a59bd28 100644 --- a/matlabBindings/+helics/HelicsHandleOptions.m +++ b/matlabBindings/+helics/HelicsHandleOptions.m @@ -6,6 +6,7 @@ % HELICS_HANDLE_OPTION_SINGLE_CONNECTION_ONLY: value:407 specify that only a single connection is allowed for an interface % HELICS_HANDLE_OPTION_MULTIPLE_CONNECTIONS_ALLOWED: value:409 specify that multiple connections are allowed for an interface % HELICS_HANDLE_OPTION_BUFFER_DATA: value:411 specify that the last data should be buffered and sent on subscriptions after init +% HELICS_HANDLE_OPTION_RECONNECTABLE: value:412 specify that the handle can be reconnected for reentrant federates % HELICS_HANDLE_OPTION_STRICT_TYPE_CHECKING: value:414 specify that the types should be checked strictly for pub/sub and filters % HELICS_HANDLE_OPTION_RECEIVE_ONLY: value:422 specify that the handle is receive only % HELICS_HANDLE_OPTION_SOURCE_ONLY: value:423 specify that the handle is source only diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..6e302ed --- /dev/null +++ b/poetry.lock @@ -0,0 +1,92 @@ +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. + +[[package]] +name = "cffi" +version = "1.16.0" +description = "Foreign Function Interface for Python calling C code." +optional = false +python-versions = ">=3.8" +files = [ + {file = "cffi-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b3d6606d369fc1da4fd8c357d026317fbb9c9b75d36dc16e90e84c26854b088"}, + {file = "cffi-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ac0f5edd2360eea2f1daa9e26a41db02dd4b0451b48f7c318e217ee092a213e9"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e61e3e4fa664a8588aa25c883eab612a188c725755afff6289454d6362b9673"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a72e8961a86d19bdb45851d8f1f08b041ea37d2bd8d4fd19903bc3083d80c896"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b50bf3f55561dac5438f8e70bfcdfd74543fd60df5fa5f62d94e5867deca684"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7651c50c8c5ef7bdb41108b7b8c5a83013bfaa8a935590c5d74627c047a583c7"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4108df7fe9b707191e55f33efbcb2d81928e10cea45527879a4749cbe472614"}, + {file = "cffi-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:32c68ef735dbe5857c810328cb2481e24722a59a2003018885514d4c09af9743"}, + {file = "cffi-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:673739cb539f8cdaa07d92d02efa93c9ccf87e345b9a0b556e3ecc666718468d"}, + {file = "cffi-1.16.0-cp310-cp310-win32.whl", hash = "sha256:9f90389693731ff1f659e55c7d1640e2ec43ff725cc61b04b2f9c6d8d017df6a"}, + {file = "cffi-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:e6024675e67af929088fda399b2094574609396b1decb609c55fa58b028a32a1"}, + {file = "cffi-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b84834d0cf97e7d27dd5b7f3aca7b6e9263c56308ab9dc8aae9784abb774d404"}, + {file = "cffi-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b8ebc27c014c59692bb2664c7d13ce7a6e9a629be20e54e7271fa696ff2b417"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ee07e47c12890ef248766a6e55bd38ebfb2bb8edd4142d56db91b21ea68b7627"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8a9d3ebe49f084ad71f9269834ceccbf398253c9fac910c4fd7053ff1386936"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e70f54f1796669ef691ca07d046cd81a29cb4deb1e5f942003f401c0c4a2695d"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5bf44d66cdf9e893637896c7faa22298baebcd18d1ddb6d2626a6e39793a1d56"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b78010e7b97fef4bee1e896df8a4bbb6712b7f05b7ef630f9d1da00f6444d2e"}, + {file = "cffi-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c6a164aa47843fb1b01e941d385aab7215563bb8816d80ff3a363a9f8448a8dc"}, + {file = "cffi-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e09f3ff613345df5e8c3667da1d918f9149bd623cd9070c983c013792a9a62eb"}, + {file = "cffi-1.16.0-cp311-cp311-win32.whl", hash = "sha256:2c56b361916f390cd758a57f2e16233eb4f64bcbeee88a4881ea90fca14dc6ab"}, + {file = "cffi-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:db8e577c19c0fda0beb7e0d4e09e0ba74b1e4c092e0e40bfa12fe05b6f6d75ba"}, + {file = "cffi-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:fa3a0128b152627161ce47201262d3140edb5a5c3da88d73a1b790a959126956"}, + {file = "cffi-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:68e7c44931cc171c54ccb702482e9fc723192e88d25a0e133edd7aff8fcd1f6e"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abd808f9c129ba2beda4cfc53bde801e5bcf9d6e0f22f095e45327c038bfe68e"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88e2b3c14bdb32e440be531ade29d3c50a1a59cd4e51b1dd8b0865c54ea5d2e2"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcc8eb6d5902bb1cf6dc4f187ee3ea80a1eba0a89aba40a5cb20a5087d961357"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b7be2d771cdba2942e13215c4e340bfd76398e9227ad10402a8767ab1865d2e6"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e715596e683d2ce000574bae5d07bd522c781a822866c20495e52520564f0969"}, + {file = "cffi-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:2d92b25dbf6cae33f65005baf472d2c245c050b1ce709cc4588cdcdd5495b520"}, + {file = "cffi-1.16.0-cp312-cp312-win32.whl", hash = "sha256:b2ca4e77f9f47c55c194982e10f058db063937845bb2b7a86c84a6cfe0aefa8b"}, + {file = "cffi-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:68678abf380b42ce21a5f2abde8efee05c114c2fdb2e9eef2efdb0257fba1235"}, + {file = "cffi-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0c9ef6ff37e974b73c25eecc13952c55bceed9112be2d9d938ded8e856138bcc"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a09582f178759ee8128d9270cd1344154fd473bb77d94ce0aeb2a93ebf0feaf0"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e760191dd42581e023a68b758769e2da259b5d52e3103c6060ddc02c9edb8d7b"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80876338e19c951fdfed6198e70bc88f1c9758b94578d5a7c4c91a87af3cf31c"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a6a14b17d7e17fa0d207ac08642c8820f84f25ce17a442fd15e27ea18d67c59b"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6602bc8dc6f3a9e02b6c22c4fc1e47aa50f8f8e6d3f78a5e16ac33ef5fefa324"}, + {file = "cffi-1.16.0-cp38-cp38-win32.whl", hash = "sha256:131fd094d1065b19540c3d72594260f118b231090295d8c34e19a7bbcf2e860a"}, + {file = "cffi-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:31d13b0f99e0836b7ff893d37af07366ebc90b678b6664c955b54561fc36ef36"}, + {file = "cffi-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:582215a0e9adbe0e379761260553ba11c58943e4bbe9c36430c4ca6ac74b15ed"}, + {file = "cffi-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b29ebffcf550f9da55bec9e02ad430c992a87e5f512cd63388abb76f1036d8d2"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dc9b18bf40cc75f66f40a7379f6a9513244fe33c0e8aa72e2d56b0196a7ef872"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cb4a35b3642fc5c005a6755a5d17c6c8b6bcb6981baf81cea8bfbc8903e8ba8"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b86851a328eedc692acf81fb05444bdf1891747c25af7529e39ddafaf68a4f3f"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c0f31130ebc2d37cdd8e44605fb5fa7ad59049298b3f745c74fa74c62fbfcfc4"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f8e709127c6c77446a8c0a8c8bf3c8ee706a06cd44b1e827c3e6a2ee6b8c098"}, + {file = "cffi-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:748dcd1e3d3d7cd5443ef03ce8685043294ad6bd7c02a38d1bd367cfd968e000"}, + {file = "cffi-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8895613bcc094d4a1b2dbe179d88d7fb4a15cee43c052e8885783fac397d91fe"}, + {file = "cffi-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed86a35631f7bfbb28e108dd96773b9d5a6ce4811cf6ea468bb6a359b256b1e4"}, + {file = "cffi-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:3686dffb02459559c74dd3d81748269ffb0eb027c39a6fc99502de37d501faa8"}, + {file = "cffi-1.16.0.tar.gz", hash = "sha256:bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0"}, +] + +[package.dependencies] +pycparser = "*" + +[[package]] +name = "clang" +version = "14.0" +description = "libclang python bindings" +optional = false +python-versions = "*" +files = [ + {file = "clang-14.0-py3-none-any.whl", hash = "sha256:049c7f7740f46f733fc96b5395910ffc57f56d4d61bca65b5556e9772d146deb"}, + {file = "clang-14.0.tar.gz", hash = "sha256:0fe241386d3b780666e032d8c2e482b1d434880185c685071aa38b78317e969f"}, +] + +[[package]] +name = "pycparser" +version = "2.21" +description = "C parser in Python" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, +] + +[metadata] +lock-version = "2.0" +python-versions = "^3.10" +content-hash = "153b72b909db78e22ec7108416eb46a97d0acbc3ed3f9f904cd9a3da7618f0e0" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2996fca --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,16 @@ +[tool.poetry] +name = "mathelics" +version = "0.1.0" +description = "" +authors = ["afisher1"] +readme = "README.md" + +[tool.poetry.dependencies] +python = "^3.10" +cffi = "^1.15.1" +clang = "14" + + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" From 2c2c1e48842f0d206eb70c4aa817b940cdcd0210 Mon Sep 17 00:00:00 2001 From: afisher1 <4552674+afisher1@users.noreply.github.com> Date: Mon, 22 Jul 2024 13:30:09 -0700 Subject: [PATCH 2/5] Forgot to update buildHelicsInterface.m --- buildHelicsInterface.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildHelicsInterface.m b/buildHelicsInterface.m index a1f1d4a..57ab259 100644 --- a/buildHelicsInterface.m +++ b/buildHelicsInterface.m @@ -38,7 +38,7 @@ function buildHelicsInterface(targetPath,makePackage) end inputPath=fileparts(mfilename('fullpath')); isOctave = (exist('OCTAVE_VERSION', 'builtin') ~= 0); - HelicsVersion='3.5.2'; + HelicsVersion='3.5.3'; % set up platform specific names and locations targetTarFile=fullfile(targetPath,['helicsTar',HelicsVersion,'.tar.gz']); if ismac From f34df1c3585de5b2fa78cbd135129227d242cd8f Mon Sep 17 00:00:00 2001 From: Mast Date: Thu, 10 Oct 2024 13:53:00 -0700 Subject: [PATCH 3/5] Update macOS CI runner to macos-13 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fbdd318..95b8894 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-2019,macos-11,ubuntu-20.04] + os: [windows-2019,macos-13,ubuntu-20.04] runs-on: ${{ matrix.os }} steps: - name: Check out repository From 27b1bcb0de5a1f6a20afc27ca3569abd817e87ec Mon Sep 17 00:00:00 2001 From: Mast Date: Thu, 10 Oct 2024 14:15:57 -0700 Subject: [PATCH 4/5] Bump up matlab CI workflow action versions --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95b8894..188001d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,32 +18,32 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install latest HELICS release uses: gmlc-tdc/helics-action/install@main - name: Set up MATLAB - uses: matlab-actions/setup-matlab@v1.1.1 + uses: matlab-actions/setup-matlab@v2.2.0 with: release: R2021a - name: Set up MEX - uses: matlab-actions/run-command@v1 + uses: matlab-actions/run-command@v2 with: command: mex -setup - name: Build matHELICS - uses: matlab-actions/run-command@v1 + uses: matlab-actions/run-command@v2 with: command: buildHelicsInterface('helics',true) - name: store package - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.os }}-matHELICS path: matHELICS.* - name: run startup - uses: matlab-actions/run-command@v1 + uses: matlab-actions/run-command@v2 with: command: addpath('helics'), helicsStartup - name: run tests - uses: matlab-actions/run-command@v1 + uses: matlab-actions/run-command@v2 with: command: addpath('tests'),addpath('helics'),runAllTests From 31e921f0d49bf61c4e3348eb13b2f858165c0611 Mon Sep 17 00:00:00 2001 From: Mast Date: Thu, 10 Oct 2024 14:21:21 -0700 Subject: [PATCH 5/5] Update matlab version for CI tests to 2023b (first with native Apple Silicon support) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 188001d..3d2cd60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: - name: Set up MATLAB uses: matlab-actions/setup-matlab@v2.2.0 with: - release: R2021a + release: R2023b - name: Set up MEX uses: matlab-actions/run-command@v2 with: