|
| 1 | +# Contributing to sql-redis |
| 2 | + |
| 3 | +Thanks for your interest in contributing! `sql-redis` is an early-stage, |
| 4 | +proof-of-concept SQL-to-Redis translator and we welcome bug reports, feature |
| 5 | +ideas, and pull requests from the community. |
| 6 | + |
| 7 | +## Reporting bugs and requesting features |
| 8 | + |
| 9 | +- Open a [GitHub issue](https://github.com/redis-developer/sql-redis/issues) |
| 10 | + describing the problem or idea. |
| 11 | +- For bug reports, include: |
| 12 | + - The SQL input that misbehaved. |
| 13 | + - The translated Redis command (`SQLQuery.redis_query_string()` output) or |
| 14 | + the actual results, plus what you expected. |
| 15 | + - The `sql-redis` and `redis` versions you're running. |
| 16 | +- For security-sensitive reports, follow [SECURITY.md](./SECURITY.md) instead |
| 17 | + of opening a public issue. |
| 18 | + |
| 19 | +## Development setup |
| 20 | + |
| 21 | +`sql-redis` uses [uv](https://docs.astral.sh/uv/) for dependency management |
| 22 | +and [hatchling](https://hatch.pypa.io/latest/) as the build backend. |
| 23 | + |
| 24 | +```bash |
| 25 | +# Clone and install |
| 26 | +git clone https://github.com/redis-developer/sql-redis.git |
| 27 | +cd sql-redis |
| 28 | +uv sync |
| 29 | + |
| 30 | +# Common tasks (see the Makefile for the full list) |
| 31 | +make format # black + isort |
| 32 | +make lint # format + mypy |
| 33 | +make test # pytest |
| 34 | +make test-cov # pytest with coverage |
| 35 | +make build # wheel + sdist |
| 36 | +``` |
| 37 | + |
| 38 | +Tests use [`testcontainers`](https://testcontainers.com/) to spin up an |
| 39 | +ephemeral Redis instance, so a local Docker daemon is required to run the |
| 40 | +full suite. |
| 41 | + |
| 42 | +## Pull requests |
| 43 | + |
| 44 | +1. Fork and create a branch off `main`. |
| 45 | +2. Make your change, including tests for any new behavior. |
| 46 | +3. Run `make lint test` and confirm everything passes. |
| 47 | +4. Open a pull request against `main`. Apply one of the |
| 48 | + [`auto:` labels](./.autorc) to indicate the intended version bump |
| 49 | + (`auto:major`, `auto:minor`, `auto:patch`, or `auto:skip-release`). |
| 50 | + Maintainers add `auto:release` when the change is ready to ship; the |
| 51 | + release workflow handles the version bump, tag, GitHub release, and |
| 52 | + PyPI publish automatically. |
| 53 | + |
| 54 | +## Code style |
| 55 | + |
| 56 | +- Black and isort are enforced via `make format` and pre-commit hooks. |
| 57 | +- Type hints required on new public APIs; `mypy` runs in CI. |
| 58 | +- Keep new modules focused and add tests in the corresponding `tests/test_*.py`. |
0 commit comments