# ows-{{cookiecutter.repo_name}}

{{cookiecutter.description}}

## Setup

We use uv to manage dependencies. Go to https://docs.astral.sh/uv/getting-started/installation/ to follow the steps to install uv, or use Docker.

### Possibly:

Ensure you have python{{cookiecutter.python_version}} installed.

```sh
$ brew update
$ brew install pyenv
$ pyenv install {{cookiecutter.python_version}}
$ pyenv local {{cookiecutter.python_version}}
```

## Usage

```sh
$ git clone git@github.com:theorchard/ows-{{cookiecutter.repo_name}}.git
$ cd ows-{{cookiecutter.repo_name}}
$ make clean env lint fmt test_unit

$ make dev
```

If you find you want to have DataDog trace enabled while running `make dev`, make sure you've copied your `.env.shadow` to `.env`. Then run `make trace-dev`

## Docker Usage

```sh
$ awsume prod
$ make docker_unit_lint
```

Force Docker images to build:

```sh
$ docker compose build
```

Run the service with hot-reloading:

```sh
$ make up_dev
$ curl http://localhost:8888/hello/
```

Run the service like it would run in deployed environment:

```sh
$ make up_deploy
$ curl http://localhost:8889/hello/
```

Run integration tests[^1]:

```sh
$ make docker_integration_test
```

[^1]: Integration tests are dockerized and run against the `{{cookiecutter.app_name | replace("_", "-")}}-deploy` container. If you want to run integration tests against a deployed QA service, change the `QA_BASE_URL` in the `docker-compose.yml`.
