Expand README
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
# Raft
|
||||
|
||||
A Raft implementation in F#.
|
||||
It allows pluggable persistent-store back-ends and communication channels, but out of the box you get an in-memory store and a simulated network.
|
||||
|
||||
You can play around with it via a command-line interface (`RaftExplorer`, which you can simply `dotnet run`), or a Fable web UI (`cd RaftFable && npm install && npm start`).
|
||||
|
||||
# Development tips
|
||||
|
||||
The Node ecosystem being what it is, it is *strongly* recommended that you use the associated Nix flake to give you an environment in which you can run the Fable UI.
|
||||
Simply `nix develop` (optionally `--profile .profile` if you want to persist the configuration into a [profile](https://nixos.org/manual/nix/stable/package-management/profiles.html) so that it doesn't get garbage-collected).
|
||||
If you're running on a non-`aarch64-darwin` platform, please feel free to contribute the appropriate changes to `flake.nix`; it should be easy to generalise using e.g. `flake-utils`.
|
||||
|
||||
There are pull request checks on this repo, enforcing [Fantomas](https://github.com/fsprojects/fantomas/)-compliant formatting.
|
||||
After checking out the repo, you may wish to add a pre-push hook to ensure locally that formatting is complete, rather than having to wait for the CI checks to tell you that you haven't formatted your code.
|
||||
Consider performing the following command to set this up in the repo:
|
||||
|
@@ -9,8 +9,16 @@ def check_fantomas():
|
||||
raise Exception(f"Formatting incomplete (return code: {result.returncode}). Consider running `dotnet tool run fantomas -r .`")
|
||||
|
||||
|
||||
def check_alejandra():
|
||||
result = subprocess.run(["alejandra", "--check", "--quiet", "*.nix"])
|
||||
if result.returncode != 0:
|
||||
print(result.stdout)
|
||||
raise Exception(f"Formatting incomplete (return code: {result.returncode}). Consider running `alejandra *.nix`")
|
||||
|
||||
|
||||
def main():
|
||||
check_fantomas()
|
||||
check_alejandra()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Reference in New Issue
Block a user