# `product-staging`

This repository is an experiment in managing an `ows` service, `lambdas`, and `fargate` tasks with a `common` package, all using [`uv` workspaces](https://docs.astral.sh/uv/concepts/projects/workspaces/) and the latest and greatest bleeding edge tooling from [Astral](https://astral.sh).

```
.
└── packages
    ├── common
    ├── fargate
    │   └── validate_spreadsheet
    ├── lambda
    │   └── handle_failure
    └── ows
        └── ows-product-staging
```


## Development

[Install `uv`](https://docs.astral.sh/uv/getting-started/installation/)

Install the following VSCode extensions:
 * [Ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)
 * [ty](https://marketplace.visualstudio.com/items?itemName=astral-sh.ty)

`cd` into one of the `packages` leaf subdirectories, follow the README for the package, and run one of the make commands:

```shell
make pip_dev    # build environment w/ dependencies
make lint       # run linting (via ruff and ty)
make fmt        # run formatting (via ruff)
make clean      # remove .venv/ and dist/
make dev        # run development (except for common)
make build      # build the common wheel (only common)
```


## Known Issues

**tl;dr**: When in doubt `make clean`.

* [`ty`](https://github.com/astral-sh/ty) is only in preview and is not ready for production use.
* Occasionally packages that depend on `common` will become "stuck" with a cached version (not repsecting the watch, or any changes after restart). The current way to resolve this is to run `make clean` in any of the packages, which will remove the virtual environment.
* The `ty` plugin for VSCode can become confused about finding references in the virtual environment, and will sometimes report `unresolved-import` issues. You can also resolve this with a `make clean`.