From 3d4a34611b8b077321f8df53e08831c351370372 Mon Sep 17 00:00:00 2001 From: Matthew Gordon Date: Sat, 2 Mar 2024 20:14:46 -0400 Subject: [PATCH] Add basic build instructions to README.md --- README.md | 27 ++++++++++++++++++++++++++- dev.py | 2 +- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 278a276..1404d47 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,27 @@ -# localhub +# Locality +The [dev](./dev) script starts a Docker image for the Postgres server, +runs `cargo run` or `cargo test`, and then removes the created Docker +container. + +Docker must be set up to run rootless for this script to work. + +The script is able to install it's own dependencies into a Python +virtual environment: + +```sh +# Install +./dev devupdate +``` + +Build and run the server locally: + +```sh +./dev run +``` + +Run unit tests: + +```sh +./dev unittest +``` diff --git a/dev.py b/dev.py index 180f1d7..8695519 100644 --- a/dev.py +++ b/dev.py @@ -39,7 +39,7 @@ run_parser = subparsers.add_parser( ) run_parser.set_defaults(func=run) run_parser = subparsers.add_parser( - 'unit_test', help='Run unit tests' + 'unittest', help='Run unit tests' ) run_parser.set_defaults(func=unit_tests) devupdate_parser = subparsers.add_parser(