Skip to content

Commit

Permalink
updated README.md to include seperate docker and developer sections. #…
Browse files Browse the repository at this point in the history
  • Loading branch information
ctcncgr committed Nov 18, 2024
1 parent 66c5aa1 commit 30a2e63
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion fasta_api/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down

0 comments on commit 30a2e63

Please sign in to comment.