From b5c7fa5eb0d6fb941c7c2c3578ebfd014be62199 Mon Sep 17 00:00:00 2001 From: Joseph McKinsey Date: Mon, 13 Jan 2025 13:03:36 -0700 Subject: [PATCH 1/6] Add working doc string enum gen --- src/enums.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/enums.jl b/src/enums.jl index e68bddf..dc4c220 100644 --- a/src/enums.jl +++ b/src/enums.jl @@ -55,12 +55,12 @@ function _enum_doc_string(enum_type) final = String[] for (name, value) in CEnum.name_value_pairs(enum_type) - - n = String(name) - d = strip(string(Docs.doc(Base.Docs.Binding(HELICS, Symbol(n))))) + # macroexpanded @doc and dug into that. We shouldn't be doing this. + doc_string_svec = Docs.meta(HELICS)[Docs.Binding(HELICS, name)].docs[Union{}].text + d = join(doc_string_svec, "\n ") v = string(value) - push!(final, "- `$n`: $d ($v)") + push!(final, "- `$name`: $d ($v)") end join(final, "\n") @@ -505,4 +505,4 @@ HELICS_SEQUENCING_MODE_DEFAULT **enumeration of sequencing modes for queries and commands fast is the default, meaning the query travels along priority channels and takes precedence of over existing messages; ordered means it follows normal priority patterns and will be ordered along with existing messages** $(_enum_doc_string(HELICS.HelicsSequencingModes)) """ -HELICS.HelicsSequencingModes \ No newline at end of file +HELICS.HelicsSequencingModes From 966f4f4e3e5e5d1eb207c8303e99a64d6a3c7154 Mon Sep 17 00:00:00 2001 From: Joseph McKinsey Date: Mon, 13 Jan 2025 13:03:46 -0700 Subject: [PATCH 2/6] Fix tests broker output --- test/systemtests.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/systemtests.jl b/test/systemtests.jl index e92ea16..6da5bcf 100644 --- a/test/systemtests.jl +++ b/test/systemtests.jl @@ -41,13 +41,13 @@ end h.helicsBrokerSetGlobal(brk, "testglobal", globalVal) q = h.helicsCreateQuery("global", "testglobal") res = h.helicsQueryBrokerExecute(q, brk) - @test res == "{\n \"name\" : \"testglobal\",\n \"value\" : \"this is a string constant that functions as a global\"\n}" + @test res == "{\n \"name\": \"testglobal\",\n \"value\": \"this is a string constant that functions as a global\"\n}" h.helicsBrokerSetGlobal(brk, "testglobal2", globalVal2) h.helicsQueryFree(q) q = h.helicsCreateQuery("global", "testglobal2") res = h.helicsQueryBrokerExecute(q, brk) - @test res == "{\n \"name\" : \"testglobal2\",\n \"value\" : \"this is a second string constant that functions as a global\"\n}" + @test res == "{\n \"name\": \"testglobal2\",\n \"value\": \"this is a second string constant that functions as a global\"\n}" h.helicsBrokerDisconnect(brk) h.helicsQueryFree(q) @@ -109,7 +109,7 @@ end h.helicsFederateSetGlobal(fed, "testglobal", globalVal) q = h.helicsCreateQuery("global", "testglobal") res = h.helicsQueryExecute(q, fed) - @test res == "{\n \"name\" : \"testglobal\",\n \"value\" : \"this is a string constant that functions as a global\"\n}" + @test res == "{\n \"name\": \"testglobal\",\n \"value\": \"this is a string constant that functions as a global\"\n}" h.helicsFederateSetGlobal(fed, "testglobal2", globalVal2) h.helicsQueryFree(q) q = h.helicsCreateQuery("global", "testglobal2") @@ -118,7 +118,7 @@ end sleep(0.20) end res = h.helicsQueryExecuteComplete(q) - @test res == "{\n \"name\" : \"testglobal2\",\n \"value\" : \"this is a second string constant that functions as a global\"\n}" + @test res == "{\n \"name\": \"testglobal2\",\n \"value\": \"this is a second string constant that functions as a global\"\n}" q2 = h.helicsCreateQuery("", "isinit") h.helicsQueryExecuteAsync(q2, fed) From 39ee0ef4f9993fcf4fa2bce55f146abcfdeaf4be Mon Sep 17 00:00:00 2001 From: Joseph McKinsey Date: Mon, 13 Jan 2025 13:08:43 -0700 Subject: [PATCH 3/6] Revert "Fix tests broker output" This reverts commit 966f4f4e3e5e5d1eb207c8303e99a64d6a3c7154. --- test/systemtests.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/systemtests.jl b/test/systemtests.jl index 6da5bcf..e92ea16 100644 --- a/test/systemtests.jl +++ b/test/systemtests.jl @@ -41,13 +41,13 @@ end h.helicsBrokerSetGlobal(brk, "testglobal", globalVal) q = h.helicsCreateQuery("global", "testglobal") res = h.helicsQueryBrokerExecute(q, brk) - @test res == "{\n \"name\": \"testglobal\",\n \"value\": \"this is a string constant that functions as a global\"\n}" + @test res == "{\n \"name\" : \"testglobal\",\n \"value\" : \"this is a string constant that functions as a global\"\n}" h.helicsBrokerSetGlobal(brk, "testglobal2", globalVal2) h.helicsQueryFree(q) q = h.helicsCreateQuery("global", "testglobal2") res = h.helicsQueryBrokerExecute(q, brk) - @test res == "{\n \"name\": \"testglobal2\",\n \"value\": \"this is a second string constant that functions as a global\"\n}" + @test res == "{\n \"name\" : \"testglobal2\",\n \"value\" : \"this is a second string constant that functions as a global\"\n}" h.helicsBrokerDisconnect(brk) h.helicsQueryFree(q) @@ -109,7 +109,7 @@ end h.helicsFederateSetGlobal(fed, "testglobal", globalVal) q = h.helicsCreateQuery("global", "testglobal") res = h.helicsQueryExecute(q, fed) - @test res == "{\n \"name\": \"testglobal\",\n \"value\": \"this is a string constant that functions as a global\"\n}" + @test res == "{\n \"name\" : \"testglobal\",\n \"value\" : \"this is a string constant that functions as a global\"\n}" h.helicsFederateSetGlobal(fed, "testglobal2", globalVal2) h.helicsQueryFree(q) q = h.helicsCreateQuery("global", "testglobal2") @@ -118,7 +118,7 @@ end sleep(0.20) end res = h.helicsQueryExecuteComplete(q) - @test res == "{\n \"name\": \"testglobal2\",\n \"value\": \"this is a second string constant that functions as a global\"\n}" + @test res == "{\n \"name\" : \"testglobal2\",\n \"value\" : \"this is a second string constant that functions as a global\"\n}" q2 = h.helicsCreateQuery("", "isinit") h.helicsQueryExecuteAsync(q2, fed) From 5ffe9a643f142af6f7dcba7ffba6ec0112a55d18 Mon Sep 17 00:00:00 2001 From: Joseph McKinsey Date: Mon, 13 Jan 2025 13:14:49 -0700 Subject: [PATCH 4/6] Update project.toml to 3.6 --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index cd72160..277ec39 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "HELICS" uuid = "81524022-8764-5038-b61c-08cb1f58760f" authors = ["Dheepak Krishnamurthy "] -version = "3.4.0" +version = "3.6.0" [deps] CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82" @@ -13,7 +13,7 @@ Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" CEnum = "^0.2" DocStringExtensions = "^0.8" julia = "^1.3" -HELICS_jll = "^3.4.0" +HELICS_jll = "^3.6.0" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" From 5f6ce788f58dd9093f57b936e9d9f684f9253497 Mon Sep 17 00:00:00 2001 From: Joseph McKinsey Date: Mon, 13 Jan 2025 13:03:46 -0700 Subject: [PATCH 5/6] Fix tests broker output --- test/systemtests.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/systemtests.jl b/test/systemtests.jl index e92ea16..6da5bcf 100644 --- a/test/systemtests.jl +++ b/test/systemtests.jl @@ -41,13 +41,13 @@ end h.helicsBrokerSetGlobal(brk, "testglobal", globalVal) q = h.helicsCreateQuery("global", "testglobal") res = h.helicsQueryBrokerExecute(q, brk) - @test res == "{\n \"name\" : \"testglobal\",\n \"value\" : \"this is a string constant that functions as a global\"\n}" + @test res == "{\n \"name\": \"testglobal\",\n \"value\": \"this is a string constant that functions as a global\"\n}" h.helicsBrokerSetGlobal(brk, "testglobal2", globalVal2) h.helicsQueryFree(q) q = h.helicsCreateQuery("global", "testglobal2") res = h.helicsQueryBrokerExecute(q, brk) - @test res == "{\n \"name\" : \"testglobal2\",\n \"value\" : \"this is a second string constant that functions as a global\"\n}" + @test res == "{\n \"name\": \"testglobal2\",\n \"value\": \"this is a second string constant that functions as a global\"\n}" h.helicsBrokerDisconnect(brk) h.helicsQueryFree(q) @@ -109,7 +109,7 @@ end h.helicsFederateSetGlobal(fed, "testglobal", globalVal) q = h.helicsCreateQuery("global", "testglobal") res = h.helicsQueryExecute(q, fed) - @test res == "{\n \"name\" : \"testglobal\",\n \"value\" : \"this is a string constant that functions as a global\"\n}" + @test res == "{\n \"name\": \"testglobal\",\n \"value\": \"this is a string constant that functions as a global\"\n}" h.helicsFederateSetGlobal(fed, "testglobal2", globalVal2) h.helicsQueryFree(q) q = h.helicsCreateQuery("global", "testglobal2") @@ -118,7 +118,7 @@ end sleep(0.20) end res = h.helicsQueryExecuteComplete(q) - @test res == "{\n \"name\" : \"testglobal2\",\n \"value\" : \"this is a second string constant that functions as a global\"\n}" + @test res == "{\n \"name\": \"testglobal2\",\n \"value\": \"this is a second string constant that functions as a global\"\n}" q2 = h.helicsCreateQuery("", "isinit") h.helicsQueryExecuteAsync(q2, fed) From 0d1d80badee4b4252e9a3365478e676b31c5291e Mon Sep 17 00:00:00 2001 From: Joseph McKinsey Date: Mon, 13 Jan 2025 13:18:12 -0700 Subject: [PATCH 6/6] Remove Manifest.toml --- Manifest.toml | 169 -------------------------------------------------- 1 file changed, 169 deletions(-) delete mode 100644 Manifest.toml diff --git a/Manifest.toml b/Manifest.toml deleted file mode 100644 index 8d2fb6f..0000000 --- a/Manifest.toml +++ /dev/null @@ -1,169 +0,0 @@ -# This file is machine-generated - editing it directly is not advised - -[[ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" - -[[Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" - -[[Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" - -[[CEnum]] -git-tree-sha1 = "62847acab40e6855a9b5905ccb99c2b5cf6b3ebb" -uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" -version = "0.2.0" - -[[Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" - -[[DocStringExtensions]] -deps = ["LibGit2"] -git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.8.6" - -[[Downloads]] -deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" - -[[FileWatching]] -uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" - -[[HELICS_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "ZeroMQ_jll"] -git-tree-sha1 = "ee95326d9dbab2d3e58293bfcc7a41b01390e394" -uuid = "ef3b0bb0-9dc6-5204-90f3-946fd7d0da3e" -version = "3.5.2+0" - -[[InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - -[[JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.5.0" - -[[LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" - -[[LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" - -[[LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" - -[[LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "MbedTLS_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" - -[[Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" - -[[Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" - -[[MbedTLS_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+0" - -[[MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.10.11" - -[[NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.2.0" - -[[Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.9.0" - -[[Preferences]] -deps = ["TOML"] -git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.3" - -[[Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - -[[Random]] -deps = ["SHA", "Serialization"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - -[[TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[Tar]] -deps = ["ArgTools", "SHA"] -uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.0" - -[[UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" - -[[ZeroMQ_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "libsodium_jll"] -git-tree-sha1 = "42f97fb27394378591666ab0e9cee369e6d0e1f9" -uuid = "8f1865be-045e-5c20-9c9f-bfbfb0764568" -version = "4.3.5+0" - -[[Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+0" - -[[libsodium_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "848ab3d00fe39d6fbc2a8641048f8f272af1c51e" -uuid = "a9144af2-ca23-56d9-984f-0d03f7b5ccf8" -version = "1.0.20+0" - -[[nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" - -[[p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0"