From 30a2e63ded04048102e23f2ebb31109682a27bf0 Mon Sep 17 00:00:00 2001 From: Connor Cameron Date: Mon, 18 Nov 2024 10:38:26 -0700 Subject: [PATCH] updated README.md to include seperate docker and developer sections. #629 --- fasta_api/README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/fasta_api/README.md b/fasta_api/README.md index 7f4d5305..f5fa84b6 100644 --- a/fasta_api/README.md +++ b/fasta_api/README.md @@ -1,8 +1,25 @@ Minimal example of a partial [FastAPI](https://fastapi.tiangolo.com/)-generated API for querying a BGZF-compressed & faidx-indexed FASTA file using [pysam](https://pysam.readthedocs.io/). -## Example +# Docker +Run local development build from cwd. + +`docker compose -f compose.yaml -f compose.dev.yaml up` + +Run production build from tagged image. + +`docker compose -f compose.yaml -f compose.prod.yaml up` + +# Development + +## Install Pre-commit Hooks + +Install pre-commit hooks before developing. The github will force you to subscribe on PR if you don't so please do! + +`pre-commit install` + +## install fasta_api ``` $ python3 -m venv fasta_api_env $ source ./fasta_api_env/bin/activate @@ -13,6 +30,8 @@ $ source ./fasta_api_env/bin/activate (Press CTRL+C to quit) ``` +## Testing + In another terminal, manually enter the following command: ``` $ curl localhost:8080/fasta/references/https%3A%2F%2Fdata.legumeinfo.org%2FGlycine%2Fmax%2Fgenomes%2FWm82.gnm2.DTC4%2Fglyma.Wm82.gnm2.DTC4.genome_main.fna.gz