From d8654753beed1b569cde3410ed1d6d393fed37df Mon Sep 17 00:00:00 2001 From: Orso Meneghini Date: Wed, 31 Jul 2024 09:36:37 -0700 Subject: [PATCH] FXP --> FuseExchangeProtocol --- NOTICE.md | 6 +++--- Project.toml | 5 +++-- README.md | 8 ++++---- docs/make.jl | 17 +++++++++-------- src/{FXP.jl => FuseExchangeProtocol.jl} | 8 ++++---- test/Project.toml | 2 +- test/runtests.jl | 2 +- 7 files changed, 25 insertions(+), 23 deletions(-) rename src/{FXP.jl => FuseExchangeProtocol.jl} (97%) diff --git a/NOTICE.md b/NOTICE.md index ff75655..f08a3fb 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -1,10 +1,10 @@ -# FXP.jl Notice +# FuseExchangeProtocoleExchangeProtocol.jl Notice -The purpose of this NOTICE file is to provide legal notices and acknowledgments that must be displayed to users in any derivative works or distributions. This file does not alter the terms of the Apache 2.0 license that governs the use and distribution of the FXP.jl package. +The purpose of this NOTICE file is to provide legal notices and acknowledgments that must be displayed to users in any derivative works or distributions. This file does not alter the terms of the Apache 2.0 license that governs the use and distribution of the FuseExchangeProtocol.jl package. ## Development Attribution -FXP.jl was originally developed under the FUSE project by the Magnetic Fusion Energy group at General Atomics. +FuseExchangeProtocol.jl was originally developed under the FUSE project by the Magnetic Fusion Energy group at General Atomics. ## Citation diff --git a/Project.toml b/Project.toml index 8ab14b7..c8f886d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,5 +1,5 @@ -name = "FXP" -uuid = "e356478e-5a30-45f6-9775-70cc66e4fbd4" +name = "FuseExchangeProtocol" +uuid = "43dcb517-7681-482a-b959-351932bd0b36" authors = ["Orso Meneghini "] version = "1.0.0" @@ -10,3 +10,4 @@ Jedis = "b89ccfe0-2c5f-46f6-b89b-da3e1c2e286f" [compat] Jedis = "0.3" JSON = "0.21" +julia = "1" diff --git a/README.md b/README.md index 7103726..33591ff 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# FXP.jl +# FuseExchangeProtocol.jl FUSE eXchange Protocol defines the handshake for processes interfacing with FUSE, for example for co-simulation purposes with a controller. @@ -37,7 +37,7 @@ sequenceDiagram end ``` -## FXP builds on top of REDIS +## FuseExchangeProtocol builds on top of REDIS * High Performance (operates in-memory) <1ms latency when run locally * Support large data volumes (<512 MB per message) * Distributed (ie. not geo-located) @@ -55,6 +55,6 @@ sequenceDiagram * Unlike Hazelcast and etcd, which are more focused on distributed computing and configuration management respectively, REDIS offers a more general-purpose approach with its data structure support and performance. ## Online documentation -For more details, see the [online documentation](https://projecttorreypines.github.io/FXP.jl/dev). +For more details, see the [online documentation](https://projecttorreypines.github.io/FuseExchangeProtocol.jl/dev). -![Docs](https://github.com/ProjectTorreyPines/FXP.jl/actions/workflows/make_docs.yml/badge.svg) +![Docs](https://github.com/ProjectTorreyPines/FuseExchangeProtocol.jl/actions/workflows/make_docs.yml/badge.svg) diff --git a/docs/make.jl b/docs/make.jl index b9d387c..e007085 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,15 +1,16 @@ -using Documenter, FXP +using Documenter +import FuseExchangeProtocol # Call functions open(joinpath(@__DIR__, "src/api.md"), "w") do f println(f, "# API Reference\n") - for page in keys(FXP.document) + for page in keys(FuseExchangeProtocol.document) if page == :Expressions continue end println(f, "## $page\n") println(f, "```@docs") - for item in FXP.document[page] + for item in FuseExchangeProtocol.document[page] println(f, "$item") end println(f, "```") @@ -17,9 +18,9 @@ open(joinpath(@__DIR__, "src/api.md"), "w") do f end makedocs(; - modules=[FXP], + modules=[FuseExchangeProtocol], format=Documenter.HTML(), - sitename="FXP", + sitename="FuseExchangeProtocol", checkdocs=:none, pages=["index.md", "api.md", "License" => "license.md", "Notice" => "notice.md"] ) @@ -27,15 +28,15 @@ makedocs(; # Deploy docs # This function deploys the documentation to the gh-pages branch of the repository. # The main documentation that will be hosted on -# https://projecttorreypines.github.io/FXP.jl/stable +# https://projecttorreypines.github.io/FuseExchangeProtocol.jl/stable # will be built from latest release tagged with a version number. # The development documentation that will be hosted on -# https://projecttorreypines.github.io/FXP.jl/dev +# https://projecttorreypines.github.io/FuseExchangeProtocol.jl/dev # will be built from the latest commit on the chosen devbranch argument below. # For testing purposes, the devbranch argument can be set to WIP branch like "docs". # While merging with master, the devbranch argument should be set to "master". deploydocs(; - repo="github.com/ProjectTorreyPines/FXP.jl.git", + repo="github.com/ProjectTorreyPines/FuseExchangeProtocol.jl.git", target="build", branch="gh-pages", devbranch="master", diff --git a/src/FXP.jl b/src/FuseExchangeProtocol.jl similarity index 97% rename from src/FXP.jl rename to src/FuseExchangeProtocol.jl index 25ac0cd..829b435 100644 --- a/src/FXP.jl +++ b/src/FuseExchangeProtocol.jl @@ -1,4 +1,4 @@ -module FXP +module FuseExchangeProtocol import JSON import Jedis @@ -105,7 +105,7 @@ function register_service(client::Jedis.Client, service_name::String, service_fu @async Jedis.subscribe(service_name; client=subscriber_client) do msg session_id = msg[3] service_name = msg[2] - new_client = FXP.new_client_copy(client) + new_client = new_client_copy(client) try service_function(new_client, session_id, service_name; timeout) return nothing @@ -113,7 +113,7 @@ function register_service(client::Jedis.Client, service_name::String, service_fu println(e) rethrow(e) finally - FXP.disconnect!(new_client) + disconnect!(new_client) end end @@ -167,4 +167,4 @@ export json_sprint const document = Dict() document[Symbol(@__MODULE__)] = [name for name in Base.names(@__MODULE__; all=false, imported=false) if name != Symbol(@__MODULE__)] -end # module FXP +end # module FuseExchangeProtocol diff --git a/test/Project.toml b/test/Project.toml index 19bbf1c..9c6cac8 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,4 +1,4 @@ [deps] BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" -FXP = "e356478e-5a30-45f6-9775-70cc66e4fbd4" +FuseExchangeProtocol = "e356478e-5a30-45f6-9775-70cc66e4fbd4" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/test/runtests.jl b/test/runtests.jl index 6480a12..e1e588e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,6 +1,6 @@ import Pkg Pkg.activate(@__DIR__) -import FXP +import FuseExchangeProtocol as FXP import BenchmarkTools REDIS_HOST = "localhost"