diff --git a/.gitignore b/.gitignore index 222df63c..8bfbc89c 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,7 @@ bin/kps-image-1.12.so.bak video/ output/parking_wind_dir.mp4 output/full_simulation.mp4 +examples/.CondaPkg/ +test/.CondaPkg/ +.CondaPkg/ + diff --git a/CHANGELOG.md b/CHANGELOG.md index deaca645..6d483c62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,27 +1,27 @@ # Changelog -## KiteControllers v0.2.27 - 2026-05-07 +## KiteControllers v0.2.28 - 2026-05-14 ### Added -- added `FFMPEG` to `examples/Project.toml` -- `parking_wind_dir.jl` creates now a video and stores it in the **output** folder -- `PLOT_RATES` option to `parking_wind_dir.jl` -- `analyse.jl` script to plot heading_rate and heading_turn_rate -- optional `azimuth` keyword argument to `calc_steering` +- `--update`, `--yes`, `--help` command-line options to `bin/install` +- `CondaPkg.toml` for managing matplotlib and pyqt via CondaPkg/pixi +- `JULIA_PYTHONCALL_EXE` environment variable in `setup_env` pointing to CondaPkg Python +- CondaPkg directories to `.gitignore` ### Changed -- further parameter tuning in `parking_4p.jl`, `parking_controller.jl`, and `parking_wind_dir.jl` -- updated documentation in `docs/src/projects.md` -- added updated documentation images `parking_wind_dir_T0.png` and `parking_wind_dir_T1.png` -- bump KiteModels to 0.11.11 -- improved parking controller, updated from KiteModels.jl -- moved plot from `autopilot.jl` to `analyse.jl` -- removed `get_default_turbulence` and `set_default_turbulence` (moved to KiteModels) +- switched from PyCall/PyPlot to PythonCall/CondaPkg for ControlPlots (bump ControlPlots to 0.3). Main advantage: The plotting library is now thread-safe. +- `bin/install_controlplots` now uses CondaPkg instead of Conda/PyCall; default backend changed to CondaPkg +- `bin/install`: added `--update` mode that removes manifests and runs `Pkg.update()` +- `bin/install`: improved error handling with automatic retry on resolve failures +- `bin/install`: passes `--yes` flag to `install_controlplots` in non-interactive mode +- `bin/setup_env`: improved OpenSSL handling (use LD_LIBRARY_PATH instead of force-preloading libcrypto) +- `bin/setup_env`: added libexpat handling for CondaPkg/pixi Python 3.13+ +- `bin/setup_env`: suppress verbose CondaPkg logs by default +- `bin/run_julia`: use `-t auto` instead of `-t 1` to utilize all CPU threads +- `bin/create_sys_image`: removed Python/matplotlib detection (no longer needed with CondaPkg) - updated default manifests ### Fixed -- fixed calculation of heading_rate in `systemstatecontrol.jl` and `autopilot.jl` -- fixed `autopilot.jl` -- fixed `parking_wind_dir.jl` to use `update_sys_state!` +- fixed OpenSSL symbol mismatch by not force-preloading libcrypto in launcher wrappers ## KiteControllers v0.2.26 - 2026-05-04 ### Changed diff --git a/Manifest-v1.11.toml.default b/Manifest-v1.11.toml.default index 6026620b..e4fdca2c 100644 --- a/Manifest-v1.11.toml.default +++ b/Manifest-v1.11.toml.default @@ -2,7 +2,7 @@ julia_version = "1.11.9" manifest_format = "2.0" -project_hash = "1e820e0907b067d3b2b4130a5328c7761179fb1e" +project_hash = "781045a89c7883257b2c12e61affba6f9d86a313" [[deps.ADTypes]] git-tree-sha1 = "bbc22a9a08a0ef6460041086d8a7b27940ed4ffd" @@ -68,10 +68,10 @@ version = "0.1.44" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "0761717147821d696c9470a7a86364b2fbd22fd8" +deps = ["LinearAlgebra"] +git-tree-sha1 = "28e1637322d4019ed2577cbec9268fab9b7da117" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.5.2" +version = "4.6.0" weakdeps = ["SparseArrays", "StaticArrays"] [deps.Adapt.extensions] @@ -101,9 +101,9 @@ version = "1.1.2" [[deps.ArrayInterface]] deps = ["Adapt", "LinearAlgebra"] -git-tree-sha1 = "54f895554d05c83e3dd59f6a396671dae8999573" +git-tree-sha1 = "3d0cabd25fab32390e3bcb82cd67e700aebd9816" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.24.0" +version = "7.25.0" [deps.ArrayInterface.extensions] ArrayInterfaceAMDGPUExt = "AMDGPU" @@ -248,9 +248,9 @@ version = "0.10.16" [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "d0efe2c6fdcdaa1c161d206aa8b933788397ec71" +git-tree-sha1 = "1fa950ebc3e37eccd51c6a8fe1f92f7d86263522" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.18.6+0" +version = "1.18.7+0" [[deps.ChainRulesCore]] deps = ["Compat", "LinearAlgebra"] @@ -387,11 +387,11 @@ git-tree-sha1 = "21d088c496ea22914fe80906eb5bce65755e5ec8" uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" version = "2.5.1" -[[deps.Conda]] -deps = ["Downloads", "JSON", "VersionParsing"] -git-tree-sha1 = "8f06b0cfa4c514c7b9546756dbae91fcfbc92dc9" -uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d" -version = "1.10.3" +[[deps.CondaPkg]] +deps = ["JSON", "Markdown", "MicroMamba", "Pidfile", "Pkg", "Preferences", "Scratch", "TOML", "pixi_jll"] +git-tree-sha1 = "0300af904a8c8d41ff715a60a6959136d22b8572" +uuid = "992eb4ea-22a4-4c89-a5bb-47a3300528ab" +version = "0.2.34" [[deps.ConstructionBase]] git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb" @@ -410,10 +410,10 @@ uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" version = "0.6.3" [[deps.ControlPlots]] -deps = ["JLD2", "LaTeXStrings", "Pkg", "Printf", "PyPlot", "StaticArraysCore"] -git-tree-sha1 = "e2df85353a8457a0a18d9248a50a13bef3287389" +deps = ["JLD2", "LaTeXStrings", "Pkg", "Printf", "PythonPlot", "StaticArraysCore"] +git-tree-sha1 = "6cbab46fef00616339eb4c3e10faeb11b408a9cc" uuid = "23c2ee80-7a9e-4350-b264-8e670f12517c" -version = "0.2.14" +version = "0.3.0" [deps.ControlPlots.extensions] ControlPlotsExt = "ControlSystemsBase" @@ -546,9 +546,9 @@ version = "1.15.1" [[deps.DifferentiationInterface]] deps = ["ADTypes", "LinearAlgebra"] -git-tree-sha1 = "d0250552e42bf7cc36479fd38a6e30004c9e8c2b" +git-tree-sha1 = "2147a95a217cc8a78ec96ee03581adf129468e49" uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" -version = "0.7.17" +version = "0.7.18" [deps.DifferentiationInterface.extensions] DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" @@ -560,6 +560,7 @@ version = "0.7.17" DifferentiationInterfaceForwardDiffExt = ["ForwardDiff", "DiffResults"] DifferentiationInterfaceGPUArraysCoreExt = ["GPUArraysCore", "Adapt"] DifferentiationInterfaceGTPSAExt = "GTPSA" + DifferentiationInterfaceHyperHessiansExt = "HyperHessians" DifferentiationInterfaceMooncakeExt = "Mooncake" DifferentiationInterfacePolyesterForwardDiffExt = ["PolyesterForwardDiff", "ForwardDiff", "DiffResults"] DifferentiationInterfaceReverseDiffExt = ["ReverseDiff", "DiffResults"] @@ -584,6 +585,7 @@ version = "0.7.17" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" + HyperHessians = "06b494a0-c8e0-40cc-ad32-d99506a00a6c" Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" @@ -1172,9 +1174,9 @@ weakdeps = ["UnPack"] [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "0533e564aae234aff59ab625543145446d8b6ec2" +git-tree-sha1 = "7204148362dafe5fe6a273f855b8ccbe4df8173e" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.1" +version = "1.8.0" [[deps.JSON]] deps = ["Dates", "Logging", "Parsers", "PrecompileTools", "StructUtils", "UUIDs", "Unicode"] @@ -1220,13 +1222,13 @@ version = "0.6.11" deps = ["DiscretePIDs", "JLD2", "KiteUtils", "NLSolversBase", "NLsolve", "Observables", "Parameters", "Pkg", "Printf", "Reexport", "Rotations", "StaticArrays", "StatsBase", "StructTypes", "Timers", "WinchControllers", "WinchModels", "YAML"] path = ".." uuid = "b19fd437-5b3a-4cca-b199-c3ded0f20ded" -version = "0.2.25" +version = "0.2.28" [[deps.KiteModels]] deps = ["AtmosphericModels", "Dierckx", "DiffEqBase", "DiscretePIDs", "DocStringExtensions", "Interpolations", "KitePodModels", "KiteUtils", "LinearAlgebra", "LinearSolve", "Logging", "NLSolversBase", "NLsolve", "NonlinearSolve", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqNonlinearSolve", "Parameters", "Pkg", "PrecompileTools", "REPL", "Reexport", "Rotations", "StaticArrays", "Statistics", "Sundials", "Suppressor", "WinchModels"] -git-tree-sha1 = "342420c3607d7cc84e4305ee1093f1bf98838fdb" +git-tree-sha1 = "f85d3db792d967ccab5105e51f9e45a668af3802" uuid = "b94af626-7959-4878-9336-2adc27959007" -version = "0.11.10" +version = "0.11.13" [[deps.KitePodModels]] deps = ["DocStringExtensions", "KiteUtils", "Reexport"] @@ -1236,9 +1238,9 @@ version = "0.4.0" [[deps.KiteUtils]] deps = ["Arrow", "CSV", "DocStringExtensions", "LinearAlgebra", "OrderedCollections", "Parameters", "Parsers", "Pkg", "PrecompileTools", "RecursiveArrayTools", "ReferenceFrameRotations", "Rotations", "StaticArrays", "StructArrays", "StructTypes", "YAML"] -git-tree-sha1 = "0d4160c6f845b7e19f754f4b9179d4e51b96f43f" +git-tree-sha1 = "edd32b16440b162db774dc42604f7faa921541e6" uuid = "90980105-b163-44e5-ba9f-8b1c83bb0533" -version = "0.11.7" +version = "0.11.8" [[deps.KiteViewers]] deps = ["FileIO", "GLMakie", "GeometryBasics", "Joysticks", "KiteUtils", "LinearAlgebra", "Parameters", "Pkg", "PrecompileTools", "Printf", "Reexport", "Rotations", "StaticArrays", "StructArrays", "Timers"] @@ -1413,9 +1415,9 @@ version = "2.13.0" [[deps.LinearSolve]] deps = ["ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "OpenBLAS_jll", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLLogging", "SciMLOperators", "Setfield", "StaticArraysCore"] -git-tree-sha1 = "42b5cb44317e89ef75dd841c9c8eba9045bf9ff0" +git-tree-sha1 = "97a6bf19ef32518268ba15f166fc030df43b619a" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "3.75.0" +version = "3.79.0" [deps.LinearSolve.extensions] LinearSolveAMDGPUExt = "AMDGPU" @@ -1440,12 +1442,12 @@ version = "3.75.0" LinearSolveKrylovKitExt = "KrylovKit" LinearSolveMetalExt = "Metal" LinearSolveMooncakeExt = "Mooncake" - LinearSolvePETScCSRExt = ["PETSc", "SparseArrays", "SparseMatricesCSR"] - LinearSolvePETScExt = ["PETSc", "SparseArrays"] + LinearSolvePETScExt = ["PETSc", "SparseArrays", "SparseMatricesCSR"] LinearSolvePETScMPIExt = ["PETSc", "PartitionedArrays", "SparseArrays", "SparseMatricesCSR"] LinearSolveParUExt = ["ParU_jll", "SparseArrays"] LinearSolvePardisoExt = ["Pardiso", "SparseArrays"] LinearSolveRecursiveFactorizationExt = "RecursiveFactorization" + LinearSolveSTRUMPACKExt = ["SparseArrays", "STRUMPACK_jll"] LinearSolveSparseArraysExt = "SparseArrays" LinearSolveSparspakExt = ["SparseArrays", "Sparspak"] @@ -1477,6 +1479,7 @@ version = "3.75.0" Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" PartitionedArrays = "5a9dfac6-5c52-46f7-8278-5e2210713be9" RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" + STRUMPACK_jll = "86fbd0b9-476f-557c-b766-62c724b42d8c" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1" Sparspak = "e56a9233-b9d6-4f03-8d0f-1825330902ac" @@ -1598,6 +1601,12 @@ git-tree-sha1 = "c009236e222df68e554c7ce5c720e4a33cc0c23f" uuid = "7269a6da-0436-5bbc-96c2-40638cbb6118" version = "0.5.3" +[[deps.MicroMamba]] +deps = ["Pkg", "Scratch", "micromamba_jll"] +git-tree-sha1 = "535656ce55266bfed0575cd051acc4f36dc869a0" +uuid = "0b3b1443-0f03-428d-bdfb-f27f9c1191ea" +version = "0.1.15" + [[deps.Missings]] deps = ["DataAPI"] git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" @@ -1817,10 +1826,10 @@ uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" version = "1.3.6+0" [[deps.OpenBLAS32_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "dd0d9979377e43918a80486a562ddedcc6d9bdf3" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "libblastrampoline_jll"] +git-tree-sha1 = "565175ce692c065e50ad32efbb61ba69b1586593" uuid = "656ef2d0-ae68-5445-9ca0-591084a874a2" -version = "0.3.33+0" +version = "0.3.33+1" [[deps.OpenBLASConsistentFPCSR_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] @@ -1966,11 +1975,17 @@ git-tree-sha1 = "5d5e0a78e971354b1c7bff0655d11fdc1b0e12c8" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.4" +[[deps.Pidfile]] +deps = ["FileWatching", "Test"] +git-tree-sha1 = "2d8aaf8ee10df53d0dfb9b8ee44ae7c04ced2b03" +uuid = "fa939f87-e72e-5be4-a000-7fc836dbe307" +version = "1.3.0" + [[deps.Pixman_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] -git-tree-sha1 = "db76b1ecd5e9715f3d043cec13b2ec93ce015d53" +git-tree-sha1 = "e4a6721aa89e62e5d4217c0b21bd714263779dda" uuid = "30392449-352a-5448-841d-b1acce4e97dc" -version = "0.44.2+0" +version = "0.46.4+0" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] @@ -2066,17 +2081,25 @@ git-tree-sha1 = "4fbbafbc6251b883f4d2705356f3641f3652a7fe" uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" version = "1.4.0" -[[deps.PyCall]] -deps = ["Conda", "Dates", "Libdl", "LinearAlgebra", "MacroTools", "Serialization", "VersionParsing"] -git-tree-sha1 = "9816a3826b0ebf49ab4926e2b18842ad8b5c8f04" -uuid = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" -version = "1.96.4" +[[deps.PythonCall]] +deps = ["CondaPkg", "Dates", "Libdl", "MacroTools", "Markdown", "Pkg", "Serialization", "Tables", "UnsafePointers"] +git-tree-sha1 = "982f3f017f08d31202574ef6bdcf8b3466430bea" +uuid = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" +version = "0.9.31" + + [deps.PythonCall.extensions] + CategoricalArraysExt = "CategoricalArrays" + PyCallExt = "PyCall" -[[deps.PyPlot]] -deps = ["Colors", "LaTeXStrings", "PyCall", "Sockets", "Test", "VersionParsing"] -git-tree-sha1 = "d2c2b8627bbada1ba00af2951946fb8ce6012c05" -uuid = "d330b81b-6aea-500a-939a-2ce795aea3ee" -version = "2.11.6" + [deps.PythonCall.weakdeps] + CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597" + PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" + +[[deps.PythonPlot]] +deps = ["Colors", "CondaPkg", "LaTeXStrings", "PythonCall", "Sockets", "Test", "VersionParsing"] +git-tree-sha1 = "409884283434a04092ddf1d9594c22bc097d5d9a" +uuid = "274fc56d-3b97-40fa-a1cd-1b4a50311bf9" +version = "1.0.6" [[deps.QOI]] deps = ["ColorTypes", "FileIO", "FixedPointNumbers"] @@ -2259,6 +2282,11 @@ git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" uuid = "94e857df-77ce-4151-89e5-788b33177be4" version = "0.1.0" +[[deps.SafeTestsets]] +git-tree-sha1 = "81ec49d645af090901120a1542e67ecbbe044db3" +uuid = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +version = "0.1.0" + [[deps.SciMLBase]] deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PreallocationTools", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLLogging", "SciMLOperators", "SciMLPublic", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] git-tree-sha1 = "a017ed325ac5e11438c888864fe83b124bb171b7" @@ -2312,9 +2340,9 @@ version = "0.1.13" [[deps.SciMLLogging]] deps = ["Logging", "LoggingExtras", "Preferences"] -git-tree-sha1 = "0161be062570af4042cf6f69e3d5d0b0555b6927" +git-tree-sha1 = "4e1e21f14a284f892eb62923a356c70a2a0c68e1" uuid = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1" -version = "1.9.1" +version = "1.10.1" [deps.SciMLLogging.extensions] SciMLLoggingTracyExt = "Tracy" @@ -2323,16 +2351,21 @@ version = "1.9.1" Tracy = "e689c965-62c8-4b79-b2c5-8359227902fd" [[deps.SciMLOperators]] -deps = ["Accessors", "ArrayInterface", "DocStringExtensions", "LinearAlgebra"] -git-tree-sha1 = "0e34162268883db01c04f988895a80d0659071bb" +deps = ["Accessors", "Adapt", "ArrayInterface", "DocStringExtensions", "LinearAlgebra", "SafeTestsets"] +git-tree-sha1 = "50e6ec6879eab12b039924d5a10b91c95bf9bf7f" uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" -version = "1.17.0" -weakdeps = ["SparseArrays", "StaticArraysCore"] +version = "1.21.0" [deps.SciMLOperators.extensions] + SciMLOperatorsLoopVectorizationExt = "LoopVectorization" SciMLOperatorsSparseArraysExt = "SparseArrays" SciMLOperatorsStaticArraysCoreExt = "StaticArraysCore" + [deps.SciMLOperators.weakdeps] + LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" + [[deps.SciMLPublic]] git-tree-sha1 = "0ba076dbdce87ba230fff48ca9bca62e1f345c9b" uuid = "431bcebd-1456-4ced-9d72-93c2757fff0b" @@ -2647,9 +2680,9 @@ version = "0.2.8" [[deps.SymbolicIndexingInterface]] deps = ["Accessors", "ArrayInterface", "RuntimeGeneratedFunctions", "StaticArraysCore"] -git-tree-sha1 = "94c58884e013efff548002e8dc2fdd1cb74dfce5" +git-tree-sha1 = "173ecfe5f7c5a36043b5f2b8cecaa30a4fc958ef" uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.3.46" +version = "0.3.47" [deps.SymbolicIndexingInterface.extensions] SymbolicIndexingInterfacePrettyTablesExt = "PrettyTables" @@ -2801,6 +2834,11 @@ version = "1.28.0" NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" +[[deps.UnsafePointers]] +git-tree-sha1 = "c81331b3b2e60a982be57c046ec91f599ede674a" +uuid = "e17b2a0c-0bdf-430a-bd0c-3a23cae4ff39" +version = "1.0.0" + [[deps.VersionParsing]] git-tree-sha1 = "58d6e80b4ee071f5efd07fda82cb9fbe17200868" uuid = "81def892-9a0e-5fdd-b105-ffc91e053289" @@ -3004,9 +3042,9 @@ version = "2.38.0+0" [[deps.at_spi2_core_jll]] deps = ["Artifacts", "Dbus_jll", "Glib_jll", "JLLWrappers", "Libdl", "Xorg_libXtst_jll"] -git-tree-sha1 = "df050402e2db17f534c97032be5a907bfc8fbf7d" +git-tree-sha1 = "75a09aa217cbd6e81a8c337462a335ab78556bd7" uuid = "0fc3237b-ac94-5853-b45c-d43d59a06200" -version = "2.58.2+0" +version = "2.60.3+0" [[deps.gdk_pixbuf_jll]] deps = ["Artifacts", "Glib_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Xorg_libX11_jll", "libpng_jll"] @@ -3091,6 +3129,12 @@ git-tree-sha1 = "4e4282c4d846e11dce56d74fa8040130b7a95cb3" uuid = "c5f90fcd-3b7e-5836-afba-fc50a0988cb2" version = "1.6.0+0" +[[deps.micromamba_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "717df6f6892af4ee13279a73aa58474e58a88667" +uuid = "f8abcde7-e9b7-5caa-b8af-a437887ae8e4" +version = "2.3.1+0" + [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" @@ -3098,15 +3142,21 @@ version = "1.59.0+0" [[deps.oneTBB_jll]] deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] -git-tree-sha1 = "1350188a69a6e46f799d3945beef36435ed7262f" +git-tree-sha1 = "da8c1f6eee04831f14edcfa5dae611d309807e57" uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" -version = "2022.0.0+1" +version = "2022.3.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" version = "17.4.0+2" +[[deps.pixi_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "f349584316617063160a947a82638f7611a8ef0f" +uuid = "4d7b5844-a134-5dcd-ac86-c8f19cd51bed" +version = "0.41.3+0" + [[deps.x264_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "14cc7083fc6dff3cc44f2bc435ee96d06ed79aa7" diff --git a/Manifest-v1.12.toml.default b/Manifest-v1.12.toml.default index c20cfdd2..16cc7c19 100644 --- a/Manifest-v1.12.toml.default +++ b/Manifest-v1.12.toml.default @@ -2,7 +2,7 @@ julia_version = "1.12.6" manifest_format = "2.0" -project_hash = "94a559add8da4311426f23e9eace949dcb3f048f" +project_hash = "d97aab4c40f01d791d9411e0e4163be4a3874dec" [[deps.ADTypes]] git-tree-sha1 = "bbc22a9a08a0ef6460041086d8a7b27940ed4ffd" @@ -112,9 +112,9 @@ version = "1.1.2" [[deps.ArrayInterface]] deps = ["Adapt", "LinearAlgebra"] -git-tree-sha1 = "54f895554d05c83e3dd59f6a396671dae8999573" +git-tree-sha1 = "3d0cabd25fab32390e3bcb82cd67e700aebd9816" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.24.0" +version = "7.25.0" [deps.ArrayInterface.extensions] ArrayInterfaceAMDGPUExt = "AMDGPU" @@ -196,10 +196,10 @@ uuid = "18cc8868-cbac-4acf-b575-c8ff214dc66f" version = "1.3.2" [[deps.BenchmarkTools]] -deps = ["Compat", "JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"] -git-tree-sha1 = "7fecfb1123b8d0232218e2da0c213004ff15358d" +deps = ["Compat", "JSON", "Logging", "PrecompileTools", "Printf", "Profile", "Statistics", "UUIDs"] +git-tree-sha1 = "9670d3febc2b6da60a0ae57846ba74670290653f" uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" -version = "1.6.3" +version = "1.8.0" [[deps.BitFlags]] git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" @@ -409,11 +409,11 @@ git-tree-sha1 = "21d088c496ea22914fe80906eb5bce65755e5ec8" uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" version = "2.5.1" -[[deps.Conda]] -deps = ["Downloads", "JSON", "VersionParsing"] -git-tree-sha1 = "8f06b0cfa4c514c7b9546756dbae91fcfbc92dc9" -uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d" -version = "1.10.3" +[[deps.CondaPkg]] +deps = ["JSON", "Markdown", "MicroMamba", "Pidfile", "Pkg", "Preferences", "Scratch", "TOML", "pixi_jll"] +git-tree-sha1 = "0300af904a8c8d41ff715a60a6959136d22b8572" +uuid = "992eb4ea-22a4-4c89-a5bb-47a3300528ab" +version = "0.2.34" [[deps.ConstructionBase]] git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb" @@ -432,10 +432,10 @@ uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" version = "0.6.3" [[deps.ControlPlots]] -deps = ["JLD2", "LaTeXStrings", "Pkg", "Printf", "PyPlot", "StaticArraysCore"] -git-tree-sha1 = "fb1cf8d1213c9f2908f8682f58f7ec252f6cc171" +deps = ["JLD2", "LaTeXStrings", "Pkg", "Printf", "PythonPlot", "StaticArraysCore"] +git-tree-sha1 = "6cbab46fef00616339eb4c3e10faeb11b408a9cc" uuid = "23c2ee80-7a9e-4350-b264-8e670f12517c" -version = "0.2.15" +version = "0.3.0" [deps.ControlPlots.extensions] ControlPlotsExt = "ControlSystemsBase" @@ -568,9 +568,9 @@ version = "1.15.1" [[deps.DifferentiationInterface]] deps = ["ADTypes", "LinearAlgebra"] -git-tree-sha1 = "d0250552e42bf7cc36479fd38a6e30004c9e8c2b" +git-tree-sha1 = "2147a95a217cc8a78ec96ee03581adf129468e49" uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" -version = "0.7.17" +version = "0.7.18" [deps.DifferentiationInterface.extensions] DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" @@ -582,6 +582,7 @@ version = "0.7.17" DifferentiationInterfaceForwardDiffExt = ["ForwardDiff", "DiffResults"] DifferentiationInterfaceGPUArraysCoreExt = ["GPUArraysCore", "Adapt"] DifferentiationInterfaceGTPSAExt = "GTPSA" + DifferentiationInterfaceHyperHessiansExt = "HyperHessians" DifferentiationInterfaceMooncakeExt = "Mooncake" DifferentiationInterfacePolyesterForwardDiffExt = ["PolyesterForwardDiff", "ForwardDiff", "DiffResults"] DifferentiationInterfaceReverseDiffExt = ["ReverseDiff", "DiffResults"] @@ -606,6 +607,7 @@ version = "0.7.17" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" + HyperHessians = "06b494a0-c8e0-40cc-ad32-d99506a00a6c" Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" @@ -1021,9 +1023,9 @@ uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" version = "2.86.3+0" [[deps.Glob]] -git-tree-sha1 = "83cb0092e2792b9e3a865b6655e88f5b862607e2" +git-tree-sha1 = "246c628cec062230b7d183aab88841fa94fcabe9" uuid = "c27321d9-0574-5035-807b-f59d2c89b15c" -version = "1.4.0" +version = "1.5.0" [[deps.Graphite2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1239,9 +1241,9 @@ weakdeps = ["UnPack"] [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "0533e564aae234aff59ab625543145446d8b6ec2" +git-tree-sha1 = "7204148362dafe5fe6a273f855b8ccbe4df8173e" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.1" +version = "1.8.0" [[deps.JSON]] deps = ["Dates", "Logging", "Parsers", "PrecompileTools", "StructUtils", "UUIDs", "Unicode"] @@ -1490,9 +1492,9 @@ version = "2.13.0" [[deps.LinearSolve]] deps = ["ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "OpenBLAS_jll", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLLogging", "SciMLOperators", "Setfield", "StaticArraysCore"] -git-tree-sha1 = "42b5cb44317e89ef75dd841c9c8eba9045bf9ff0" +git-tree-sha1 = "3ccb9eaa37e39f54a93d0ef1ad58491ab68dbf5b" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "3.75.0" +version = "3.78.0" [deps.LinearSolve.extensions] LinearSolveAMDGPUExt = "AMDGPU" @@ -1517,12 +1519,12 @@ version = "3.75.0" LinearSolveKrylovKitExt = "KrylovKit" LinearSolveMetalExt = "Metal" LinearSolveMooncakeExt = "Mooncake" - LinearSolvePETScCSRExt = ["PETSc", "SparseArrays", "SparseMatricesCSR"] - LinearSolvePETScExt = ["PETSc", "SparseArrays"] + LinearSolvePETScExt = ["PETSc", "SparseArrays", "SparseMatricesCSR"] LinearSolvePETScMPIExt = ["PETSc", "PartitionedArrays", "SparseArrays", "SparseMatricesCSR"] LinearSolveParUExt = ["ParU_jll", "SparseArrays"] LinearSolvePardisoExt = ["Pardiso", "SparseArrays"] LinearSolveRecursiveFactorizationExt = "RecursiveFactorization" + LinearSolveSTRUMPACKExt = ["SparseArrays", "STRUMPACK_jll"] LinearSolveSparseArraysExt = "SparseArrays" LinearSolveSparspakExt = ["SparseArrays", "Sparspak"] @@ -1554,6 +1556,7 @@ version = "3.75.0" Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" PartitionedArrays = "5a9dfac6-5c52-46f7-8278-5e2210713be9" RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" + STRUMPACK_jll = "86fbd0b9-476f-557c-b766-62c724b42d8c" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1" Sparspak = "e56a9233-b9d6-4f03-8d0f-1825330902ac" @@ -1699,6 +1702,12 @@ git-tree-sha1 = "c009236e222df68e554c7ce5c720e4a33cc0c23f" uuid = "7269a6da-0436-5bbc-96c2-40638cbb6118" version = "0.5.3" +[[deps.MicroMamba]] +deps = ["Pkg", "Scratch", "micromamba_jll"] +git-tree-sha1 = "535656ce55266bfed0575cd051acc4f36dc869a0" +uuid = "0b3b1443-0f03-428d-bdfb-f27f9c1191ea" +version = "0.1.15" + [[deps.Missings]] deps = ["DataAPI"] git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" @@ -1918,10 +1927,10 @@ uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" version = "1.3.6+0" [[deps.OpenBLAS32_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "dd0d9979377e43918a80486a562ddedcc6d9bdf3" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "libblastrampoline_jll"] +git-tree-sha1 = "565175ce692c065e50ad32efbb61ba69b1586593" uuid = "656ef2d0-ae68-5445-9ca0-591084a874a2" -version = "0.3.33+0" +version = "0.3.33+1" [[deps.OpenBLASConsistentFPCSR_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] @@ -2050,9 +2059,9 @@ version = "0.4.4" [[deps.PackageCompiler]] deps = ["Artifacts", "Glob", "LazyArtifacts", "Libdl", "Pkg", "Printf", "RelocatableFolders", "TOML", "UUIDs", "p7zip_jll"] -git-tree-sha1 = "7b2dbae3d0eda41dad445b5f36f40588c208a942" +git-tree-sha1 = "5193091a937c1e84cab042d55f8071dd2116c6f2" uuid = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" -version = "2.2.5" +version = "2.3.0" [[deps.Packing]] deps = ["GeometryBasics"] @@ -2084,6 +2093,12 @@ git-tree-sha1 = "5d5e0a78e971354b1c7bff0655d11fdc1b0e12c8" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.4" +[[deps.Pidfile]] +deps = ["FileWatching", "Test"] +git-tree-sha1 = "2d8aaf8ee10df53d0dfb9b8ee44ae7c04ced2b03" +uuid = "fa939f87-e72e-5be4-a000-7fc836dbe307" +version = "1.3.0" + [[deps.Pixman_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] git-tree-sha1 = "e4a6721aa89e62e5d4217c0b21bd714263779dda" @@ -2152,9 +2167,9 @@ version = "1.2.0" [[deps.PrecompileTools]] deps = ["Preferences"] -git-tree-sha1 = "07a921781cab75691315adc645096ed5e370cb77" +git-tree-sha1 = "edbeefc7a4889f528644251bdb5fc9ab5348bc2c" uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.3.3" +version = "1.3.4" [[deps.Preferences]] deps = ["TOML"] @@ -2189,17 +2204,25 @@ git-tree-sha1 = "4fbbafbc6251b883f4d2705356f3641f3652a7fe" uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" version = "1.4.0" -[[deps.PyCall]] -deps = ["Conda", "Dates", "Libdl", "LinearAlgebra", "MacroTools", "Serialization", "VersionParsing"] -git-tree-sha1 = "9816a3826b0ebf49ab4926e2b18842ad8b5c8f04" -uuid = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" -version = "1.96.4" +[[deps.PythonCall]] +deps = ["CondaPkg", "Dates", "Libdl", "MacroTools", "Markdown", "Pkg", "Serialization", "Tables", "UnsafePointers"] +git-tree-sha1 = "982f3f017f08d31202574ef6bdcf8b3466430bea" +uuid = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" +version = "0.9.31" -[[deps.PyPlot]] -deps = ["Colors", "LaTeXStrings", "PyCall", "Sockets", "Test", "VersionParsing"] -git-tree-sha1 = "d2c2b8627bbada1ba00af2951946fb8ce6012c05" -uuid = "d330b81b-6aea-500a-939a-2ce795aea3ee" -version = "2.11.6" + [deps.PythonCall.extensions] + CategoricalArraysExt = "CategoricalArrays" + PyCallExt = "PyCall" + + [deps.PythonCall.weakdeps] + CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597" + PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" + +[[deps.PythonPlot]] +deps = ["Colors", "CondaPkg", "LaTeXStrings", "PythonCall", "Sockets", "Test", "VersionParsing"] +git-tree-sha1 = "409884283434a04092ddf1d9594c22bc097d5d9a" +uuid = "274fc56d-3b97-40fa-a1cd-1b4a50311bf9" +version = "1.0.6" [[deps.QOI]] deps = ["ColorTypes", "FileIO", "FixedPointNumbers"] @@ -2388,6 +2411,11 @@ git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" uuid = "94e857df-77ce-4151-89e5-788b33177be4" version = "0.1.0" +[[deps.SafeTestsets]] +git-tree-sha1 = "81ec49d645af090901120a1542e67ecbbe044db3" +uuid = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +version = "0.1.0" + [[deps.SciMLBase]] deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PreallocationTools", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLLogging", "SciMLOperators", "SciMLPublic", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] git-tree-sha1 = "a017ed325ac5e11438c888864fe83b124bb171b7" @@ -2441,9 +2469,9 @@ version = "0.1.13" [[deps.SciMLLogging]] deps = ["Logging", "LoggingExtras", "Preferences"] -git-tree-sha1 = "0161be062570af4042cf6f69e3d5d0b0555b6927" +git-tree-sha1 = "4e1e21f14a284f892eb62923a356c70a2a0c68e1" uuid = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1" -version = "1.9.1" +version = "1.10.1" [deps.SciMLLogging.extensions] SciMLLoggingTracyExt = "Tracy" @@ -2452,16 +2480,21 @@ version = "1.9.1" Tracy = "e689c965-62c8-4b79-b2c5-8359227902fd" [[deps.SciMLOperators]] -deps = ["Accessors", "ArrayInterface", "DocStringExtensions", "LinearAlgebra"] -git-tree-sha1 = "4a3bd21622633a70fde04bc6d072f59e482ff66f" +deps = ["Accessors", "Adapt", "ArrayInterface", "DocStringExtensions", "LinearAlgebra", "SafeTestsets"] +git-tree-sha1 = "50e6ec6879eab12b039924d5a10b91c95bf9bf7f" uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" -version = "1.18.0" -weakdeps = ["SparseArrays", "StaticArraysCore"] +version = "1.21.0" [deps.SciMLOperators.extensions] + SciMLOperatorsLoopVectorizationExt = "LoopVectorization" SciMLOperatorsSparseArraysExt = "SparseArrays" SciMLOperatorsStaticArraysCoreExt = "StaticArraysCore" + [deps.SciMLOperators.weakdeps] + LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" + [[deps.SciMLPublic]] git-tree-sha1 = "0ba076dbdce87ba230fff48ca9bca62e1f345c9b" uuid = "431bcebd-1456-4ced-9d72-93c2757fff0b" @@ -2940,6 +2973,11 @@ version = "1.28.0" NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" +[[deps.UnsafePointers]] +git-tree-sha1 = "c81331b3b2e60a982be57c046ec91f599ede674a" +uuid = "e17b2a0c-0bdf-430a-bd0c-3a23cae4ff39" +version = "1.0.0" + [[deps.VersionParsing]] git-tree-sha1 = "58d6e80b4ee071f5efd07fda82cb9fbe17200868" uuid = "81def892-9a0e-5fdd-b105-ffc91e053289" @@ -3230,6 +3268,12 @@ git-tree-sha1 = "4e4282c4d846e11dce56d74fa8040130b7a95cb3" uuid = "c5f90fcd-3b7e-5836-afba-fc50a0988cb2" version = "1.6.0+0" +[[deps.micromamba_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "717df6f6892af4ee13279a73aa58474e58a88667" +uuid = "f8abcde7-e9b7-5caa-b8af-a437887ae8e4" +version = "2.3.1+0" + [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" @@ -3237,15 +3281,21 @@ version = "1.64.0+1" [[deps.oneTBB_jll]] deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] -git-tree-sha1 = "1350188a69a6e46f799d3945beef36435ed7262f" +git-tree-sha1 = "da8c1f6eee04831f14edcfa5dae611d309807e57" uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" -version = "2022.0.0+1" +version = "2022.3.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" version = "17.7.0+0" +[[deps.pixi_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "f349584316617063160a947a82638f7611a8ef0f" +uuid = "4d7b5844-a134-5dcd-ac86-c8f19cd51bed" +version = "0.41.3+0" + [[deps.x264_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "14cc7083fc6dff3cc44f2bc435ee96d06ed79aa7" diff --git a/Project.toml b/Project.toml index e1864aef..69c1ab66 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "KiteControllers" uuid = "b19fd437-5b3a-4cca-b199-c3ded0f20ded" -version = "0.2.27" +version = "0.2.28" authors = ["Uwe Fechner and contributors"] [workspace] diff --git a/bin/create_sys_image b/bin/create_sys_image index 5e2c556a..d985a688 100755 --- a/bin/create_sys_image +++ b/bin/create_sys_image @@ -75,39 +75,6 @@ else juliaup default 1.11 fi -PYTHON_PATH=$(which python3) -if [ -x "$PYTHON_PATH" ]; then - echo "Python is found at $PYTHON_PATH" - if $PYTHON_PATH -c "import matplotlib" &> /dev/null; then - echo "Matplotlib found. Using existing installation." - export PYTHON=$PYTHON_PATH - else - echo "Matplotlib is not found." - if [[ $_yes_to_all == true ]]; then - echo "Installing matplotlib with Conda..." - export PYTHON="" - else - read -p "Do you want to install matplotlib with Conda? (y/n): " choice - case "$choice" in - y|Y ) - export PYTHON="" - ;; - n|N ) - echo "Exiting without installing matplotlib." - exit 1 - ;; - * ) - echo "Invalid choice. Exiting." - exit 1 - ;; - esac - fi - fi -else - echo "Python is not found." - exit 1 -fi - # create a logfile for the sysimage creation process ./bin/batch_pilot hydra20_600 @@ -137,8 +104,6 @@ else fi fi - - $JULIA_CMD --startup-file=no --project -e "using Pkg; Pkg.instantiate();" $JULIA_CMD --startup-file=no --project=test --heap-size-hint=8000M -e "include(\"./test/create_sys_image.jl\")" diff --git a/bin/install b/bin/install index c02155f2..84836f4f 100755 --- a/bin/install +++ b/bin/install @@ -2,6 +2,43 @@ # SPDX-FileCopyrightText: 2025 Uwe Fechner # SPDX-License-Identifier: MIT +_yes_to_all=false +update=false + +print_usage() { + echo "Usage:" + echo "./install" + echo "./install --update" + echo "./install -y" + echo "./install --yes" + echo "./install --update -y" + echo "./install -h" + echo "./install --help" +} + +# Parse command line arguments +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + print_usage + exit 0 + ;; + --update) + update=true + shift + ;; + -y|--yes) + _yes_to_all=true + shift + ;; + *) + echo "Invalid parameter! Use:" + print_usage + exit 1 + ;; + esac +done + if [[ $(basename $(pwd)) == "bin" ]]; then cd .. fi @@ -40,38 +77,45 @@ if (( _available_kb < _required_kb )); then fi unset _required_kb _available_kb _available_gb -# Ask which Julia version to use -# Default to 1.12 if it is already installed and is the current default, otherwise 1.11 -if juliaup status 2>/dev/null | grep '^\s*\*' | grep -q '1\.12'; then - _default_choice=2 - _default_julia="1.12" +# Determine which Julia version to use +if [[ $_yes_to_all == true ]]; then + # Non-interactive mode: use the currently active Julia version + _desired_julia=$(julia --startup-file=no -e 'print("$(VERSION.major).$(VERSION.minor)")') + echo "Using currently active Julia ${_desired_julia}..." else - _default_choice=1 - _default_julia="1.11" + # Interactive mode: ask which Julia version to use + # Default to 1.12 if it is already installed and is the current default, otherwise 1.11 + if juliaup status 2>/dev/null | grep '^\s*\*' | grep -q '1\.12'; then + _default_choice=2 + _default_julia="1.12" + else + _default_choice=1 + _default_julia="1.11" + fi + echo "Which Julia version do you want to use?" + echo " 1) Julia 1.11" + echo " 2) Julia 1.12" + read -rp "Enter 1 or 2 [default: ${_default_choice}]: " _julia_choice + case "${_julia_choice}" in + 1) + _desired_julia="1.11" + ;; + 2) + _desired_julia="1.12" + ;; + "") + _desired_julia="${_default_julia}" + ;; + *) + echo "Invalid choice: '${_julia_choice}'. Please enter 1 or 2." + exit 1 + ;; + esac + echo "Installing and activating Julia ${_desired_julia}..." + juliaup add "${_desired_julia}" + juliaup default "${_desired_julia}" + echo "Julia ${_desired_julia} is now the default." fi -echo "Which Julia version do you want to use?" -echo " 1) Julia 1.11" -echo " 2) Julia 1.12" -read -rp "Enter 1 or 2 [default: ${_default_choice}]: " _julia_choice -case "${_julia_choice}" in - 1) - _desired_julia="1.11" - ;; - 2) - _desired_julia="1.12" - ;; - "") - _desired_julia="${_default_julia}" - ;; - *) - echo "Invalid choice: '${_julia_choice}'. Please enter 1 or 2." - exit 1 - ;; -esac -echo "Installing and activating Julia ${_desired_julia}..." -juliaup add "${_desired_julia}" -juliaup default "${_desired_julia}" -echo "Julia ${_desired_julia} is now the default." echo echo "Checking whether Revise is installed in the global Julia environment..." @@ -104,7 +148,7 @@ export JULIA_PKG_SERVER_REGISTRY_PREFERENCE=eager . ./bin/setup_env if [[ "$(uname -s)" == "Darwin" ]]; then - # Avoid Tk backend issues on macOS (e.g. non-responsive close button in PyPlot windows). + # Avoid Tk backend issues on macOS (e.g. non-responsive close button in ControlPlots windows). # Keep user override if MPLBACKEND is already set. if [[ -z "${MPLBACKEND:-}" ]]; then export MPLBACKEND=qtagg @@ -134,24 +178,30 @@ if [[ $julia_major != "1.11" ]] && [[ $julia_major != "1.12" ]]; then exit 1 fi -# Copy the appropriate default manifest -if [[ $julia_major == "1.11" ]]; then - if [ -f "Manifest-v1.11.toml.default" ]; then - cp Manifest-v1.11.toml.default Manifest-v1.11.toml - echo "Copied Manifest-v1.11.toml.default to Manifest-v1.11.toml" +# Copy the appropriate default manifest (skip in --update mode: start clean) +if [[ $update == false ]]; then + if [[ $julia_major == "1.11" ]]; then + if [ -f "Manifest-v1.11.toml.default" ]; then + cp Manifest-v1.11.toml.default Manifest-v1.11.toml + echo "Copied Manifest-v1.11.toml.default to Manifest-v1.11.toml" + else + echo "Warning: Manifest-v1.11.toml.default not found" + exit 1 + fi else - echo "Warning: Manifest-v1.11.toml.default not found" - exit 1 + # Default to 1.12 for newer versions + if [ -f "Manifest-v1.12.toml.default" ]; then + cp Manifest-v1.12.toml.default Manifest-v1.12.toml + echo "Copied Manifest-v1.12.toml.default to Manifest-v1.12.toml" + else + echo "Warning: Manifest-v1.12.toml.default not found" + exit 1 + fi fi else - # Default to 1.12 for newer versions - if [ -f "Manifest-v1.12.toml.default" ]; then - cp Manifest-v1.12.toml.default Manifest-v1.12.toml - echo "Copied Manifest-v1.12.toml.default to Manifest-v1.12.toml" - else - echo "Warning: Manifest-v1.12.toml.default not found" - exit 1 - fi + # Update mode: start from a clean state without a manifest and let Pkg.update() generate it. + rm -f Manifest.toml "Manifest-v${julia_major}.toml" + echo "--update selected: removed existing manifests for Julia ${julia_major}" fi # Remove any existing Manifest.toml symlink (left by a previous install run) so Julia @@ -264,8 +314,60 @@ normalize_manifest_name() { # Instantiate the project FAILED_RESOLVES=() RETRIED_RESOLVES=() -echo "Instantiating project..." -_ec=0; run_resolve_with_retry "" 1 || _ec=$? +if [[ $update == true ]]; then + echo "Updating main project..." +else + echo "Instantiating project..." +fi +_ec=0; KITECONTROLLERS_INSTALL_UPDATE="$update" julia --project -e ' +using Pkg + +const UPDATE_MODE = get(ENV, "KITECONTROLLERS_INSTALL_UPDATE", "false") == "true" + +function ensure_general_registry() + regs = try + Pkg.Registry.reachable_registries() + catch + Pkg.Registry.update() + Pkg.Registry.reachable_registries() + end + if !any(r -> r.name == "General", regs) + Pkg.Registry.add("General") + else + Pkg.Registry.update() + end +end + +function clean_active_manifest!(proj_dir) + active_manifest = "Manifest-v$(VERSION.major).$(VERSION.minor).toml" + for f in readdir(proj_dir) + if f == "Manifest.toml" || f == active_manifest + rm(joinpath(proj_dir, f), force=true) + end + end +end + +try + ensure_general_registry() + if UPDATE_MODE + Pkg.update() + else + Pkg.resolve() + end + Pkg.instantiate() +catch e + @warn "Main project package operation failed, attempting clean retry..." exception=e + clean_active_manifest!(dirname(Base.active_project())) + ensure_general_registry() + if UPDATE_MODE + Pkg.update() + else + Pkg.resolve() + end + Pkg.instantiate() + exit(2) +end +' || _ec=$? if [[ $_ec -eq 2 ]]; then RETRIED_RESOLVES+=("main project") elif [[ $_ec -ne 0 ]]; then FAILED_RESOLVES+=("main project"); fi # If Pkg.resolve() created a plain Manifest.toml (Julia 1.12 behavior), rename it @@ -297,7 +399,11 @@ if [[ $julia_major == "1.11" ]]; then else echo "ControlPlots is not working. Running install_controlplots..." if [[ -x "bin/install_controlplots" ]]; then - bash bin/install_controlplots + if [[ $_yes_to_all == true ]]; then + bash bin/install_controlplots --yes + else + bash bin/install_controlplots + fi else echo "Warning: bin/install_controlplots not found. Please run it manually." fi @@ -306,8 +412,9 @@ if [[ $julia_major == "1.11" ]]; then _ec=0; run_resolve_with_retry "test" 0 || _ec=$? if [[ $_ec -eq 2 ]]; then RETRIED_RESOLVES+=("test (1.11)") elif [[ $_ec -ne 0 ]]; then FAILED_RESOLVES+=("test (1.11)"); fi - echo "Precompiling test project..." + echo "Precompiling test project and running the tests..." julia --project=test -e 'using Pkg; Pkg.precompile()' + julia --project -e 'using Pkg; Pkg.test()' _ec=0; run_resolve_with_retry "docs" 0 || _ec=$? if [[ $_ec -eq 2 ]]; then RETRIED_RESOLVES+=("docs (1.11)") elif [[ $_ec -ne 0 ]]; then FAILED_RESOLVES+=("docs (1.11)"); fi @@ -343,7 +450,11 @@ else else echo "ControlPlots is not working. Running install_controlplots..." if [[ -x "bin/install_controlplots" ]]; then - bash bin/install_controlplots + if [[ $_yes_to_all == true ]]; then + bash bin/install_controlplots --yes + else + bash bin/install_controlplots + fi else echo "Warning: bin/install_controlplots not found. Please run it manually." fi @@ -369,31 +480,52 @@ fi julia --project=examples -e 'using KiteControllers, KiteViewers, ControlPlots, NOMAD' if [[ "$(uname -s)" == "Darwin" ]]; then - echo - echo "Installing QtAgg dependencies for PyPlot on macOS..." - julia -e ' + if julia --project=examples -e ' +try + using PythonCall + pyimport("matplotlib") + pyimport("matplotlib.backends.backend_qtagg") +catch + exit(1) +end +'; then + echo + echo "QtAgg already installed; skipping QtAgg dependency installation." + else + _install_matplotlib_condapkg_macos() { + julia --project=examples -e ' using Pkg - -for pkg in ["PyCall", "PyPlot", "Conda"] +for pkg in ["PythonCall", "CondaPkg"] if Base.find_package(pkg) === nothing Pkg.add(pkg) end end - -if get(ENV, "PYTHON", nothing) != "" - ENV["PYTHON"] = "" - Pkg.build("PyCall") -end - -using Conda -Conda.add("matplotlib") -Conda.add("pyqt") - -Pkg.build("PyPlot") - -println("Installed matplotlib + pyqt in Conda.jl environment.") -println("QtAgg should now be available for matplotlib/PyPlot.jl.") +using CondaPkg +CondaPkg.add("matplotlib") +CondaPkg.add("pyqt") +CondaPkg.resolve() +println("Installed matplotlib + pyqt in CondaPkg environment.") +println("QtAgg should now be available for matplotlib/PythonCall.") ' + } + if [[ $_yes_to_all == true ]]; then + echo + echo "Installing QtAgg dependencies for ControlPlots on macOS..." + _install_matplotlib_condapkg_macos + else + echo + echo "Installing QtAgg dependencies for ControlPlots on macOS..." + read -rp "Do you want to install matplotlib and pyqt? (y/n) [default: y]: " _install_choice + case "${_install_choice}" in + n|N) + echo "Skipping QtAgg dependency installation." + ;; + *) + _install_matplotlib_condapkg_macos + ;; + esac + fi + fi fi echo diff --git a/bin/install_controlplots b/bin/install_controlplots index 0702992d..d70ae1e5 100755 --- a/bin/install_controlplots +++ b/bin/install_controlplots @@ -2,12 +2,12 @@ # SPDX-FileCopyrightText: 2025 Uwe Fechner # SPDX-License-Identifier: MIT # -# Install and configure matplotlib for ControlPlots.jl (via PyCall/PyPlot). +# Install and configure matplotlib for ControlPlots.jl (via PythonCall). # # Two backends are supported: # 1) System Python – uses the matplotlib package installed by Ubuntu/Debian (apt). # Fastest option; shares the system Python install. -# 2) Conda – installs matplotlib into Julia's own Conda environment. +# 2) CondaPkg – installs matplotlib into a pixi-managed Conda environment. # Self-contained; does not require root / sudo. # # Both options configure the Qt (qtagg) backend for interactive plot windows. @@ -18,7 +18,7 @@ print_usage() { echo "" echo "Options:" echo " --system Use the system Python and matplotlib (Ubuntu/Debian apt)" - echo " --conda Use Julia's Conda environment to install matplotlib" + echo " --conda Use CondaPkg (pixi) to install matplotlib" echo " -y, --yes Non-interactive; accept defaults" echo " -h, --help Show this help message" } @@ -71,17 +71,17 @@ if [[ -z "$_backend" ]]; then echo " - Requires sudo" echo " - Shares the system-wide Python installation" echo "" - echo " 2) Conda (installs matplotlib into Julia's own Conda environment)" + echo " 2) CondaPkg (installs matplotlib into a pixi-managed Conda environment)" echo " - No sudo required" echo " - Self-contained; downloads ~200 MB on first use" echo "" if [[ "$_yes" == true ]]; then - _choice="1" - echo "Using default: 1 (system Python)" + _choice="2" + echo "Using default: 2 (CondaPkg)" else - read -rp "Enter 1 or 2 [default: 1]: " _choice + read -rp "Enter 1 or 2 [default: 2]: " _choice fi - case "${_choice:-1}" in + case "${_choice:-2}" in 1) _backend="system" ;; 2) _backend="conda" ;; *) @@ -95,36 +95,21 @@ echo "" echo "Selected backend: $_backend" echo "" -# ── Helper: rebuild PyCall and verify matplotlib ────────────────────────────── +# ── Helper: install matplotlib via CondaPkg ─────────────────────────────────── -_rebuild_pycall_and_verify() { - # $1 = PYTHON value to pass (empty string → Conda, path → system) - local _pyval="$1" - echo "Rebuilding PyCall with PYTHON='${_pyval}'..." - env -u LD_PRELOAD -u LD_LIBRARY_PATH \ - PYTHON="$_pyval" \ - julia --project=examples -e ' +_install_matplotlib_condapkg() { + echo "Installing matplotlib and pyqt into CondaPkg (pixi) environment..." + julia --project=examples -e ' using Pkg -ENV["PYTHON"] = get(ENV, "PYTHON", "") -Pkg.build("PyCall") -println("PyCall rebuilt successfully.") -' -} - -_install_matplotlib_conda() { - echo "Installing matplotlib and pyqt into Julia's Conda environment..." - env -u LD_PRELOAD -u LD_LIBRARY_PATH \ - PYTHON="" \ - julia --project=examples -e ' -using Pkg -# Ensure Conda is available -if Base.find_package("Conda") === nothing - Pkg.add("Conda") +# Ensure CondaPkg is available +if Base.find_package("CondaPkg") === nothing + Pkg.add("CondaPkg") end -using Conda -Conda.add("matplotlib") -Conda.add("pyqt") -println("matplotlib and pyqt installed in Conda environment.") +using CondaPkg +CondaPkg.add("matplotlib") +CondaPkg.add("pyqt") +CondaPkg.resolve() +println("matplotlib and pyqt installed in CondaPkg environment.") ' } @@ -221,35 +206,34 @@ if [[ "$_backend" == "system" ]]; then fi echo "Found system Python: $_syspython" - # Point PyCall at the system Python and rebuild. - env -u LD_PRELOAD -u LD_LIBRARY_PATH \ - PYTHON="$_syspython" \ - julia --project=examples -e ' -using Pkg -ENV["PYTHON"] = ENV["PYTHON"] # already set by the shell -Pkg.build("PyCall") -println("PyCall rebuilt to use system Python: " * ENV["PYTHON"]) -' + # Remove the CondaPkg-managed environment so that setup_env does not set + # JULIA_PYTHONCALL_EXE to the conda Python, which would override the system + # Python configured below. + if [[ -d "examples/.CondaPkg" ]]; then + echo "Removing examples/.CondaPkg (switching from CondaPkg to system Python)..." + rm -rf "examples/.CondaPkg" + fi echo "" - echo "Saving PYTHON=$_syspython to examples/LocalPreferences.toml..." + echo "Saving python_exe=$_syspython to examples/LocalPreferences.toml..." # Write (or update) LocalPreferences.toml in the examples directory so that - # Julia's PyCall always uses the system Python when running examples. + # PythonCall always uses the system Python when running examples. _prefs_file="examples/LocalPreferences.toml" if [[ -f "$_prefs_file" ]]; then - # Remove any existing [PyCall] section (naive sed approach). + # Remove any existing [PythonCall] and legacy [PyCall] sections. _tmp=$(mktemp) awk ' - /^\[PyCall\]/ { in_pycall=1; next } - in_pycall && /^\[/ { in_pycall=0 } - !in_pycall { print } + /^\[PythonCall\]/ { in_pc=1; next } + /^\[PyCall\]/ { in_pc=1; next } + in_pc && /^\[/ { in_pc=0 } + !in_pc { print } ' "$_prefs_file" > "$_tmp" mv "$_tmp" "$_prefs_file" fi { echo "" - echo "[PyCall]" - echo "python = \"$_syspython\"" + echo "[PythonCall]" + echo "exe = \"$_syspython\"" } >> "$_prefs_file" echo "Written to $_prefs_file." @@ -257,44 +241,35 @@ println("PyCall rebuilt to use system Python: " * ENV["PYTHON"]) _verify_controlplots echo "" - echo "Done. ControlPlots will use the system Python matplotlib with the Qt (qtagg) backend." + echo "Done. ControlPlots will use the system Python (PythonCall) matplotlib with the Qt (qtagg) backend." -# ── Conda backend ───────────────────────────────────────────────────────────── +# ── CondaPkg backend ────────────────────────────────────────────────────────── elif [[ "$_backend" == "conda" ]]; then - # Remove any LocalPreferences.toml [PyCall] section so PyCall uses Conda. + # Remove any [PythonCall] exe setting and legacy [PyCall] section so that + # PythonCall falls back to the CondaPkg-managed Python. _prefs_file="examples/LocalPreferences.toml" if [[ -f "$_prefs_file" ]]; then _tmp=$(mktemp) awk ' - /^\[PyCall\]/ { in_pycall=1; next } - in_pycall && /^\[/ { in_pycall=0 } - !in_pycall { print } + /^\[PythonCall\]/ { in_pc=1; next } + /^\[PyCall\]/ { in_pc=1; next } + in_pc && /^\[/ { in_pc=0 } + !in_pc { print } ' "$_prefs_file" > "$_tmp" - # If PyCall section existed, update; otherwise leave unchanged. if ! diff -q "$_prefs_file" "$_tmp" &>/dev/null; then mv "$_tmp" "$_prefs_file" - echo "Removed [PyCall] section from $_prefs_file (switching to Conda)." + echo "Removed [PythonCall]/[PyCall] section from $_prefs_file (switching to CondaPkg)." else rm -f "$_tmp" fi fi - # Rebuild PyCall with PYTHON="" to trigger Conda mode. - env -u LD_PRELOAD -u LD_LIBRARY_PATH \ - PYTHON="" \ - julia --project=examples -e ' -using Pkg -ENV["PYTHON"] = "" -Pkg.build("PyCall") -println("PyCall rebuilt to use Conda-managed Python.") -' - - _install_matplotlib_conda + _install_matplotlib_condapkg _set_mplbackend_qtagg _verify_controlplots echo "" - echo "Done. ControlPlots will use the Conda-managed matplotlib with the Qt (qtagg) backend." + echo "Done. ControlPlots will use the CondaPkg-managed matplotlib with the Qt (qtagg) backend." fi diff --git a/bin/run_julia b/bin/run_julia index a83a3d28..fc7e9664 100755 --- a/bin/run_julia +++ b/bin/run_julia @@ -82,15 +82,15 @@ julia_init+='using KiteControllers; test_menu() = Base.include(Main, joinpath(pk if test -f "bin/kps-image-${julia_major}.so"; then echo "Found system image!" if [[ -n "$script_file" ]]; then - PLOT=1 julia -J bin/kps-image-${julia_major}.so -t 1 $GCT --project "$script_file" "$@" + PLOT=1 julia -J bin/kps-image-${julia_major}.so -t auto $GCT --project "$script_file" "$@" else - PLOT=1 julia -J bin/kps-image-${julia_major}.so -t 1 $GCT --project -i -e "$julia_init" + PLOT=1 julia -J bin/kps-image-${julia_major}.so -t auto $GCT --project -i -e "$julia_init" fi else if [[ -n "$script_file" ]]; then - PLOT=1 julia --project -t 1 $GCT "$script_file" "$@" + PLOT=1 julia --project -t auto $GCT "$script_file" "$@" else - PLOT=1 julia --project -t 1 $GCT -i -e "$julia_init" + PLOT=1 julia --project -t auto $GCT -i -e "$julia_init" fi # julia --project fi diff --git a/bin/setup_env b/bin/setup_env index 7dbf6e93..148a6400 100644 --- a/bin/setup_env +++ b/bin/setup_env @@ -10,6 +10,25 @@ export LD_PRELOAD="${LD_PRELOAD:-}" export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}" +# Suppress verbose CondaPkg logs +export JULIA_CONDAPKG_VERBOSITY="0" +export JULIA_CONDAPKG_LOG="warn" + +# Point PythonCall to the single shared Python environment (examples/.CondaPkg). +# This ensures a consistent Python is used regardless of which --project is active, +# including when a sysimage compiled with ControlPlots is loaded. +_setup_env_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +_pythoncall_exe="$_setup_env_root/examples/.CondaPkg/.pixi/envs/default/bin/python" +if [[ -x "$_pythoncall_exe" ]]; then + export JULIA_PYTHONCALL_EXE="$_pythoncall_exe" +fi +unset _setup_env_root _pythoncall_exe + +# Avoid OpenMP duplicate-runtime conflict on Windows (libiomp5md.dll vs libomp.dll) +case "$(uname -s)" in + MINGW*|MSYS*|CYGWIN*) export KMP_DUPLICATE_LIB_OK=TRUE ;; +esac + if [[ "$(uname -s)" == "Linux" ]]; then export FONTCONFIG_FILE=/etc/fonts/fonts.conf @@ -22,24 +41,40 @@ if [[ "$(uname -s)" == "Linux" ]]; then # (c) libglib preloads are placed FIRST so they win the SONAME race. # # Libraries handled: - # - libcrypto.so.3: override stale system OpenSSL via LD_PRELOAD + # - libcrypto.so.3, + # libssl.so.3: add artifact dirs to LD_LIBRARY_PATH so OpenSSL_jll + # resolves a matched pair (do not force-preload libcrypto) # - libiconv.so.2, # libintl.so.8, # libffi.so.6: absent/wrong version on Ubuntu 22.04+; added to LD_LIBRARY_PATH # - libfontconfig.so.1: override version missing FcConfigSetDefaultSubstitute via LD_PRELOAD # - libglib-2.0.so.0: override version missing g_string_copy via LD_PRELOAD (placed first) + # - libexpat.so.1: CondaPkg/pixi env copy used when it provides + # XML_SetAllocTrackerActivationThreshold (Python 3.13+/pyexpat) # # All Julia invocations are handled by forwarding every argument to `command julia`, # so both `julia +1.11 ...` and `$JULIA_CMD` with `JULIA_CMD="julia +1.11"` work. julia() { local _jpreloads=() _jlibdirs=() local _jdepots=() + local _jbase_preload="" _jp IFS=':' read -ra _jdepots <<< "${JULIA_DEPOT_PATH:-$HOME/.julia}" + # Drop externally preloaded OpenSSL libs to avoid mixing system/conda and JLL variants. + IFS=':' read -ra _jpre_parts <<< "${LD_PRELOAD:-}" + for _jp in "${_jpre_parts[@]}"; do + [[ -z "$_jp" ]] && continue + case "$_jp" in + *libcrypto.so.3*|*libssl.so.3*) continue ;; + esac + _jbase_preload+="${_jbase_preload:+:}$_jp" + done + # Find the first artifact matching NAME (optionally requiring SYMBOL via nm -D). _jfind_artifact() { local name="$1" sym="${2:-}" _d _f for _d in "${_jdepots[@]}"; do + [[ -d "$_d/artifacts" ]] || continue while IFS= read -r _f; do if [[ -z "$sym" ]] || nm -D "$_f" 2>/dev/null | grep -q "$sym"; then echo "$_f"; return 0 @@ -52,40 +87,18 @@ if [[ "$(uname -s)" == "Linux" ]]; then # Add dirname of a path to _jlibdirs (deduped). _jadd_libdir() { local _d; _d=$(dirname "$1") - [[ ":${_jlibdirs[*]}:" != *":$_d:"* ]] && _jlibdirs+=("$_d") + if [[ ":${_jlibdirs[*]}:" != *":$_d:"* ]]; then + _jlibdirs+=("$_d") + fi } local _jf - # libcrypto: prefer Julia's own bundled libcrypto (guaranteed compatible with its - # own libssl). Julia 1.12+ ships libcrypto in lib/julia/; older versions don't, - # so fall back to the artifact for those. - # Use type -P to bypass the julia shell function and find the real binary in PATH. - # (command -v julia returns the function name when julia is a shell function.) - _julia_real=$(type -P julia 2>/dev/null || command -v julia) - [[ -L "$_julia_real" ]] && _julia_real=$(readlink -f "$_julia_real") - # juliaup installs a launcher shim (julialauncher) rather than a real julia - # binary, so dirname-relative paths are wrong. Find the actual julia install - # directory by querying `juliaup status` for the active version. - if [[ "$(basename "$_julia_real")" == "julialauncher" ]] && command -v juliaup &>/dev/null; then - _jver=$(juliaup status 2>/dev/null | awk '$1 == "*" {print $3}' | head -1) - if [[ -n "$_jver" ]]; then - _jdepot=$(printf '%s' "${JULIA_DEPOT_PATH:-$HOME/.julia}" | cut -d: -f1) - _julia_real="$_jdepot/juliaup/julia-${_jver}/bin/julia" - fi - fi - _julia_bundled_crypto="$(dirname "$_julia_real")/../lib/julia/libcrypto.so.3" - if [[ -f "$_julia_bundled_crypto" ]]; then - _jpreloads+=("$(realpath "$_julia_bundled_crypto")") - else - # Prefer a libcrypto that provides OPENSSL_3.3.0 (needed by OpenSSL_jll >=3.3) - # so that preloading an older 3.0.x artifact does not conflict with a newer - # libssl.so that requires OPENSSL_3.3.0 symbols. Fall back to any available - # libcrypto only when no 3.3.0-capable artifact is present. - _jf=$(_jfind_artifact libcrypto.so.3 OPENSSL_3.3.0) \ - || _jf=$(_jfind_artifact libcrypto.so.3) - [[ -n "$_jf" ]] && _jpreloads+=("$_jf") - fi + # OpenSSL: add both libssl and libcrypto artifact dirs to LD_LIBRARY_PATH. + # Keep them out of LD_PRELOAD so OpenSSL_jll can load a matched pair naturally. + for _jlib in libcrypto.so.3 libssl.so.3; do + _jf=$(_jfind_artifact "$_jlib") && _jadd_libdir "$_jf" + done # libiconv + libintl + libffi: add dirs to LD_LIBRARY_PATH # (libffi.so.6 is needed by Glib_jll on modern distros that only ship libffi.so.8) @@ -98,26 +111,41 @@ if [[ "$(uname -s)" == "Linux" ]]; then _jadd_libdir "$_jf"; _jpreloads+=("$_jf") } + # CondaPkg pixi env: add libexpat dir when it provides symbols newer than + # the system copy (e.g. XML_SetAllocTrackerActivationThreshold, needed by + # Python 3.13+ via pyexpat). + for _jcondapkg_lib in \ + "$PWD/examples/.CondaPkg/.pixi/envs/default/lib" \ + "$PWD/.CondaPkg/.pixi/envs/default/lib"; do + if [[ -f "$_jcondapkg_lib/libexpat.so.1" ]] && \ + nm -D "$_jcondapkg_lib/libexpat.so.1" 2>/dev/null | grep -q "XML_SetAllocTrackerActivationThreshold"; then + _jadd_libdir "$_jcondapkg_lib/libexpat.so.1" + break + fi + done + # libglib: needs g_string_copy; placed FIRST in LD_PRELOAD to win the SONAME race local _jglib _jglib_dir _jfinal_preload="" _jfinal_libpath="" - _jglib=$(_jfind_artifact libglib-2.0.so.0 g_string_copy) + _jglib=$(_jfind_artifact libglib-2.0.so.0 g_string_copy || true) if [[ -n "$_jglib" ]]; then _jglib_dir=$(dirname "$_jglib") # libintl co-located with libglib takes precedence (needed by libglib itself) [[ -f "$_jglib_dir/libintl.so.8" ]] && _jfinal_preload="$_jglib_dir/libintl.so.8:" _jfinal_preload+="$_jglib" [[ ${#_jpreloads[@]} -gt 0 ]] && _jfinal_preload+=":$(IFS=:; echo "${_jpreloads[*]}")" - [[ -n "${LD_PRELOAD:-}" ]] && _jfinal_preload+=":$LD_PRELOAD" + [[ -n "$_jbase_preload" ]] && _jfinal_preload+=":$_jbase_preload" # Add glib dir first in LD_LIBRARY_PATH - [[ ":${_jlibdirs[*]}:" != *":$_jglib_dir:"* ]] && _jlibdirs=("$_jglib_dir" "${_jlibdirs[@]}") + if [[ ":${_jlibdirs[*]}:" != *":$_jglib_dir:"* ]]; then + _jlibdirs=("$_jglib_dir" "${_jlibdirs[@]}") + fi elif [[ ${#_jpreloads[@]} -gt 0 ]]; then - _jfinal_preload="$(IFS=:; echo "${_jpreloads[*]}")${LD_PRELOAD:+:$LD_PRELOAD}" + _jfinal_preload="$(IFS=:; echo "${_jpreloads[*]}")${_jbase_preload:+:$_jbase_preload}" fi [[ ${#_jlibdirs[@]} -gt 0 ]] && \ _jfinal_libpath="$(IFS=:; echo "${_jlibdirs[*]}")${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" - LD_PRELOAD="${_jfinal_preload:-${LD_PRELOAD:-}}" \ + LD_PRELOAD="${_jfinal_preload:-${_jbase_preload:-}}" \ LD_LIBRARY_PATH="${_jfinal_libpath:-${LD_LIBRARY_PATH:-}}" \ command julia "$@" } diff --git a/bin/update_default_manifest b/bin/update_default_manifest index d5381cd8..ad2914f7 100755 --- a/bin/update_default_manifest +++ b/bin/update_default_manifest @@ -1,87 +1,71 @@ #!/bin/bash -eu +# SPDX-FileCopyrightText: 2025 Uwe Fechner +# SPDX-License-Identifier: MIT -if [[ $(basename "$(pwd)") == "bin" ]]; then +if [[ $(basename $(pwd)) == "bin" ]]; then cd .. fi -julia_major=$(julia --startup-file=no -e 'print("$(VERSION.major).$(VERSION.minor)")') -manifest_name="Manifest-v${julia_major}.toml" -default_manifest="${manifest_name}.default" -projects=("." "examples" "test") -manifest_projects=("." "examples" "test") - -if [[ $julia_major == "1.12" ]]; then - manifest_projects=(".") +# Ask which Julia version to use +# Default to 1.12 if it is already installed and is the current default, otherwise 1.11 +if juliaup status 2>/dev/null | grep '^\s*\*' | grep -q '1\.12'; then + _default_choice=2 + _default_julia="1.12" +else + _default_choice=1 + _default_julia="1.11" fi -delete_manifests() { - local project_dir=$1 - rm -f "$project_dir/$manifest_name" "$project_dir/Manifest.toml" -} - -rename_manifest() { - local project_dir=$1 - if [[ -f "$project_dir/Manifest.toml" ]]; then - mv "$project_dir/Manifest.toml" "$project_dir/$manifest_name" - fi -} +echo "Which Julia version do you want to update the manifest for?" +echo " 1) Julia 1.11" +echo " 2) Julia 1.12" +read -rp "Enter 1 or 2 [default: ${_default_choice}]: " _julia_choice -copy_default_manifest() { - local project_dir=$1 - if [[ -f "$project_dir/$manifest_name" ]]; then - cp "$project_dir/$manifest_name" "$project_dir/$default_manifest" - fi -} - -require_manifest() { - local project_dir=$1 - if [[ ! -f "$project_dir/$manifest_name" ]]; then - echo "Expected $project_dir/$manifest_name to exist, but it was not created." +case "${_julia_choice}" in + 1) + _desired_julia="1.11" + ;; + 2) + _desired_julia="1.12" + ;; + "") + _desired_julia="${_default_julia}" + ;; + *) + echo "Invalid choice: '${_julia_choice}'. Please enter 1 or 2." exit 1 - fi -} + ;; +esac +echo "Using Julia version: ${_desired_julia}" -for project_dir in "${projects[@]}"; do - delete_manifests "$project_dir" -done +# Temporarily switch to the chosen Julia version +juliaup default "${_desired_julia}" +echo "Switched to Julia ${_desired_julia}." +echo -if [[ $julia_major == "1.12" ]]; then - julia --startup-file=no --project -e ' - using Pkg - Pkg.Registry.update() - for project in [".", "examples", "test"] - Pkg.activate(project) - Pkg.update(; update_registry=false) - end - ' -else - julia --startup-file=no --project -e 'using Pkg; Pkg.instantiate()' - julia --startup-file=no --project=examples -e 'using Pkg; Pkg.instantiate()' - julia --startup-file=no --project=test -e 'using Pkg; Pkg.instantiate()' -fi - -for project_dir in "${manifest_projects[@]}"; do - rename_manifest "$project_dir" - require_manifest "$project_dir" - if [[ "$project_dir" == "." ]]; then - copy_default_manifest "$project_dir" - fi -done +cd bin +./install --update -y -if [[ $julia_major == "1.12" ]]; then - # Keep sub-projects manifest-free for Julia 1.12 workspace-based resolution. - rm -f "examples/$manifest_name" "examples/Manifest.toml" "examples/$default_manifest" - rm -f "test/$manifest_name" "test/Manifest.toml" "test/$default_manifest" +julia_version=$(julia --version | awk '{print($3)}') +julia_major=${julia_version:0:3} +if [[ $julia_major == "1.1" ]]; then + julia_major=${julia_version:0:4} fi -# TODO run tests - -rm -rf ~/.julia/compiled/v${julia_major}/KiteControllers/ -if [[ $julia_major == "1.12" ]]; then - echo "Updated ${manifest_name} in root only for Julia ${julia_major}." - echo "No manifest files are kept in examples/ and test/ for Julia ${julia_major}." +cd .. +if [[ $julia_major == "1.10" ]]; then + cp examples/Manifest-v1.10.toml Manifest-v1.10.toml.default + rm -rf ~/.julia/compiled/v1.10/KiteControllers/ + echo "Updated Manifest-v1.10.toml.default !" + echo "Make sure to run the tests before committing the new version!" +elif [[ $julia_major == "1.11" ]]; then + cp examples/Manifest-v1.11.toml Manifest-v1.11.toml.default + rm -rf ~/.julia/compiled/v1.11/KiteControllers/ + echo "Updated Manifest-v1.11.toml.default !" + echo "Make sure to run the tests before committing the new version!" else - echo "Updated ${manifest_name} files for Julia ${julia_major} in root, examples, and test!" -fi -echo "Updated ${default_manifest} in root only." -echo "Make sure to run install before committing the new version!" \ No newline at end of file + cp Manifest-v1.12.toml Manifest-v1.12.toml.default + rm -rf ~/.julia/compiled/v1.12/KiteControllers/ + echo "Updated Manifest-v1.12.toml.default !" + echo "Make sure to run the tests before committing the new version!" +fi \ No newline at end of file diff --git a/examples/CondaPkg.toml b/examples/CondaPkg.toml new file mode 100644 index 00000000..59e86d2a --- /dev/null +++ b/examples/CondaPkg.toml @@ -0,0 +1,3 @@ +[deps] +matplotlib = "" +pyqt = "" diff --git a/examples/Project.toml b/examples/Project.toml index 68c5167d..88a95d79 100644 --- a/examples/Project.toml +++ b/examples/Project.toml @@ -1,7 +1,8 @@ [deps] +CondaPkg = "992eb4ea-22a4-4c89-a5bb-47a3300528ab" ControlPlots = "23c2ee80-7a9e-4350-b264-8e670f12517c" -FFMPEG_jll = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" DiscretePIDs = "c1363496-6848-4723-8758-079b737f6baf" +FFMPEG_jll = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" Joysticks = "82f05805-4863-42dc-b1a7-0852bd62c632" KiteControllers = "b19fd437-5b3a-4cca-b199-c3ded0f20ded" @@ -10,8 +11,8 @@ KitePodModels = "9de5dc81-f971-414a-927b-652b2f41c539" KiteUtils = "90980105-b163-44e5-ba9f-8b1c83bb0533" KiteViewers = "2e593061-95e7-45e4-95f4-df0491f2e601" LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -NativeFileDialog = "e1fe445b-aa65-4df4-81c1-2041507f0fd4" NOMAD = "02130f1c-4665-5b79-af82-ff1385104aa0" +NativeFileDialog = "e1fe445b-aa65-4df4-81c1-2041507f0fd4" NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a" Rotations = "6038ab10-8711-5258-84ad-4b1120ba62dc" @@ -24,7 +25,7 @@ YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" KiteControllers = {path = ".."} [compat] -ControlPlots = "0.2.14" +ControlPlots = "0.3.0" Joysticks = "0.1.4" KiteModels = "0.11.12" KitePodModels = "0.4.0" diff --git a/test/Project.toml b/test/Project.toml index 94f83a57..77cd1032 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -30,7 +30,7 @@ KiteControllers = {path = ".."} [compat] Aqua = "0.8.11" BenchmarkTools = "1.6" -ControlPlots = "0.2.14" +ControlPlots = "0.3.0" Joysticks = "0.1.4" KiteModels = "0.11.8" KitePodModels = "0.4.0"