Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 314635a

Browse files
committedJun 19, 2025
update to use uv and improve CI
1 parent 89e4c00 commit 314635a

File tree

8 files changed

+5690
-6812
lines changed

8 files changed

+5690
-6812
lines changed
 

‎.github/workflows/test.yml

Lines changed: 45 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ on:
1414

1515
env:
1616
PYTHON_VERSION: "3.11"
17-
POETRY_VERSION: "2.0.1"
17+
UV_VERSION: "0.7.13"
18+
DEFAULT_REDIS_IMAGE: "8.0.2"
1819

1920
jobs:
2021
service-tests:
@@ -24,11 +25,10 @@ jobs:
2425
HF_HOME: ${{ github.workspace }}/hf_cache
2526
steps:
2627
- name: Check out repository
27-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2829

2930
- name: Cache HuggingFace Models
30-
id: hf-cache
31-
uses: actions/cache@v3
31+
uses: actions/cache@v4
3232
with:
3333
path: hf_cache
3434
key: ${{ runner.os }}-hf-cache
@@ -38,20 +38,24 @@ jobs:
3838
mkdir -p ~/.huggingface
3939
echo '{"token":"${{ secrets.HF_TOKEN }}"}' > ~/.huggingface/token
4040
41-
- name: Set up Python 3.11
42-
uses: actions/setup-python@v4
41+
- name: Install Python
42+
uses: actions/setup-python@v5
4343
with:
4444
python-version: ${{ env.PYTHON_VERSION }}
45-
cache: pip
4645

47-
- name: Install Poetry
48-
uses: snok/install-poetry@v1
46+
- name: Install uv
47+
uses: astral-sh/setup-uv@v6
4948
with:
50-
version: ${{ env.POETRY_VERSION }}
49+
version: ${{ env.UV_VERSION }}
50+
enable-cache: true
51+
python-version: ${{ env.PYTHON_VERSION }} # sets UV_PYTHON
52+
cache-dependency-glob: |
53+
pyproject.toml
54+
uv.lock
5155
5256
- name: Install dependencies
5357
run: |
54-
poetry install --all-extras
58+
uv sync --group test --frozen
5559
5660
- name: Authenticate to Google Cloud
5761
uses: google-github-actions/auth@v1
@@ -61,7 +65,6 @@ jobs:
6165
- name: Run full test suite and prime the HF cache
6266
env:
6367
HF_TOKEN: ${{ secrets.HF_TOKEN }}
64-
HF_HOME: ${{ github.workspace }}/hf_cache
6568
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
6669
GCP_LOCATION: ${{ secrets.GCP_LOCATION }}
6770
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
@@ -87,45 +90,48 @@ jobs:
8790
fail-fast: false
8891
matrix:
8992
# 3.11 tests are run in the service-tests job
90-
python-version: ["3.9", "3.10", 3.12, 3.13]
93+
python-version: ["3.9", "3.10", "3.12", "3.13"]
9194
redis-py-version: ["5.x", "6.x"]
92-
redis-version: ["6.2.6-v9", "latest", "8.0.1"]
93-
95+
redis-version: ["6.2.6-v9", "latest", "${{ env.DEFAULT_REDIS_IMAGE }}"]
9496
steps:
9597
- name: Check out repository
96-
uses: actions/checkout@v3
98+
uses: actions/checkout@v4
9799

98100
- name: Cache HuggingFace Models
99-
uses: actions/cache@v3
101+
uses: actions/cache@v4
100102
with:
101103
path: hf_cache
102104
key: ${{ runner.os }}-hf-cache
103105

104-
- name: Set up Python ${{ matrix.python-version }}
105-
uses: actions/setup-python@v4
106+
- name: Install Python
107+
uses: actions/setup-python@v5
106108
with:
107109
python-version: ${{ matrix.python-version }}
108-
cache: pip
109110

110-
- name: Install Poetry
111-
uses: snok/install-poetry@v1
111+
- name: Install uv
112+
uses: astral-sh/setup-uv@v6
112113
with:
113-
version: ${{ env.POETRY_VERSION }}
114+
version: ${{ env.UV_VERSION }}
115+
enable-cache: true
116+
python-version: ${{ matrix.python-version }} # sets UV_PYTHON
117+
cache-dependency-glob: |
118+
pyproject.toml
119+
uv.lock
114120
115121
- name: Install dependencies
116122
run: |
117-
poetry install --all-extras
123+
uv sync --group test --frozen
118124
119125
# Install right redis version based on redis py
120126
if [[ "${{ matrix.redis-py-version }}" == "5.x" ]]; then
121-
poetry run pip install "redis>=5.0.0,<6.0.0"
127+
uv pip install "redis>=5,<6"
122128
else
123-
poetry run pip install "redis>=6.0.0,<7.0.0"
129+
uv pip install "redis>=6,<7"
124130
fi
125131
126132
- name: Set Redis image name
127133
run: |
128-
if [[ "${{ matrix.redis-version }}" == "8.0.1" ]]; then
134+
if [[ "${{ matrix.redis-version }}" == "${{ env.DEFAULT_REDIS_IMAGE }}" ]]; then
129135
echo "REDIS_IMAGE=redis:${{ matrix.redis-version }}" >> $GITHUB_ENV
130136
else
131137
echo "REDIS_IMAGE=redis/redis-stack-server:${{ matrix.redis-version }}" >> $GITHUB_ENV
@@ -138,7 +144,6 @@ jobs:
138144

139145
- name: Run tests
140146
env:
141-
HF_HOME: ${{ github.workspace }}/hf_cache
142147
GCP_LOCATION: ${{ secrets.GCP_LOCATION }}
143148
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
144149
run: |
@@ -147,7 +152,6 @@ jobs:
147152
- name: Run notebooks
148153
if: matrix.redis-py-version == '6.x' && matrix.redis-version == 'latest'
149154
env:
150-
HF_HOME: ${{ github.workspace }}/hf_cache
151155
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
152156
GCP_LOCATION: ${{ secrets.GCP_LOCATION }}
153157
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
@@ -171,20 +175,24 @@ jobs:
171175
- name: Check out repository
172176
uses: actions/checkout@v3
173177

174-
- name: Set up Python
175-
uses: actions/setup-python@v4
178+
- name: Install Python
179+
uses: actions/setup-python@v5
176180
with:
177181
python-version: ${{ env.PYTHON_VERSION }}
178-
cache: pip
179182

180-
- name: Install Poetry
181-
uses: snok/install-poetry@v1
183+
- name: Install uv
184+
uses: astral-sh/setup-uv@v6
182185
with:
183-
version: ${{ env.POETRY_VERSION }}
184-
186+
version: ${{ env.UV_VERSION }}
187+
enable-cache: true
188+
python-version: ${{ env.PYTHON_VERSION }} # sets UV_PYTHON
189+
cache-dependency-glob: |
190+
pyproject.toml
191+
uv.lock
192+
185193
- name: Install dependencies
186194
run: |
187-
poetry install --all-extras
195+
uv sync --group docs --frozen
188196
189197
- name: Build docs
190198
run: |

‎.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
repos:
22
- repo: local
33
hooks:
4-
- id: poetry-checks
4+
- id: code-quality-checks
55
name: Run pre-commit checks (format, sort-imports, check-mypy)
6-
entry: bash -c 'poetry run format && poetry run sort-imports && poetry run check-mypy'
6+
entry: bash -c 'make format && make check-sort-imports && make check-types'
77
language: system
8-
pass_filenames: false
8+
pass_filenames: false

‎CONTRIBUTING.md

Lines changed: 216 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -2,172 +2,286 @@
22

33
## Introduction
44

5-
First off, thank you for considering contributions. We value community contributions!
5+
First off, thank you for considering contributions to RedisVL! We value community contributions and appreciate your interest in helping make this project better.
66

7-
## Contributions We Need
7+
## Types of Contributions We Need
88

9-
You may already know what you want to contribute \-- a fix for a bug you
10-
encountered, or a new feature your team wants to use.
9+
You may already know what you want to contribute -- a fix for a bug you encountered, or a new feature your team wants to use.
1110

12-
If you don't know what to contribute, keep an open mind! Improving
13-
documentation, bug triaging, and writing tutorials are all examples of
14-
helpful contributions that mean less work for you.
11+
If you don't know what to contribute, keep an open mind! Here are some valuable ways to contribute:
1512

16-
## Your First Contribution
17-
18-
Unsure where to begin contributing? You can start by looking through some of our issues [listed here](https://github.com/redis/redis-vl-python/issues).
13+
- **Bug fixes**: Help us identify and resolve issues
14+
- **Feature development**: Add new functionality that benefits the community
15+
- **Documentation improvements**: Enhance clarity, add examples, or fix typos
16+
- **Bug triaging**: Help categorize and prioritize issues
17+
- **Writing tutorials**: Create guides that help others use RedisVL
18+
- **Testing**: Write tests or help improve test coverage
1919

2020
## Getting Started
2121

2222
Here's how to get started with your code contribution:
2323

24-
1. Create your own fork of this repo
25-
2. Set up your developer environment
26-
2. Apply the changes in your forked codebase / environment
27-
4. If you like the change and think the project could use it, send us a
28-
pull request.
24+
1. **Fork the repository**: Create your own fork of this repo
25+
2. **Set up your development environment**: Follow the setup instructions below
26+
3. **Make your changes**: Apply the changes in your forked codebase
27+
4. **Test your changes**: Ensure your changes work and don't break existing functionality
28+
5. **Submit a pull request**: If you like the change and think the project could use it, send us a pull request
2929

30-
### Dev Environment
31-
RedisVL uses [Poetry](https://python-poetry.org/) for dependency management.
30+
## Development Environment Setup
3231

33-
Follow the instructions to [install Poetry](https://python-poetry.org/docs/#installation).
32+
### Prerequisites
3433

35-
Then install the required libraries:
34+
- **Python**: RedisVL supports Python 3.8 and above
35+
- **Docker**: Required for running Redis Stack and integration tests
36+
- **UV**: Modern Python package manager for fast dependency management
3637

37-
```bash
38-
poetry install --all-extras
39-
```
38+
### Installing UV
4039

41-
### Optional Makefile
40+
RedisVL uses [UV](https://docs.astral.sh/uv/) for fast, modern Python dependency management. Choose your preferred installation method:
4241

43-
If you use `make`, we've created shortcuts for running the commands in this document.
42+
#### Standalone Installer (Recommended)
4443

45-
| Command | Description |
46-
|---------|-------------|
47-
| make install | Installs all dependencies using Poetry|
48-
| make redis-start | Starts Redis Stack in a Docker container on ports 6379 and 8001 |
49-
| make redis-stop | Stops the Redis Stack Docker container |
50-
| make format | Runs code formatting and import sorting |
51-
| make check-types | Runs mypy type checking |
52-
| make lint | Runs formatting, import sorting, and type checking |
53-
| make test | Runs tests, excluding those that require API keys and/or remote network calls|
54-
| make test-all | Runs all tests, including those that require API keys and/or remote network calls|
55-
| make test-notebooks | Runs all notebook tests|
56-
| make check | Runs all linting targets and a subset of tests |
57-
| make docs-build | Builds the documentation |
58-
| make docs-serve | Serves the documentation locally |
59-
| make clean | Removes all generated files (cache, coverage, build artifacts, etc.) |
60-
61-
### Linting and Tests
62-
63-
Check formatting, linting, and typing:
44+
**macOS and Linux:**
6445
```bash
65-
poetry run format
66-
poetry run sort-imports
67-
poetry run check-mypy
46+
curl -LsSf https://astral.sh/uv/install.sh | sh
6847
```
6948

70-
#### TestContainers
49+
**Windows:**
50+
```powershell
51+
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
52+
```
7153

72-
RedisVL uses Testcontainers Python for integration tests. Testcontainers is an open-source framework for provisioning throwaway, on-demand containers for development and testing use cases.
54+
#### Alternative Installation Methods
7355

74-
To run Testcontainers-based tests you need a local Docker installation such as:
75-
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
76-
- [Docker Engine on Linux](https://docs.docker.com/engine/install/)
56+
**Homebrew (macOS):**
57+
```bash
58+
brew install uv
59+
```
7760

78-
#### Running the Tests
61+
**pipx:**
62+
```bash
63+
pipx install uv
64+
```
7965

80-
Tests w/ external APIs:
66+
**pip:**
8167
```bash
82-
poetry run test-verbose --run-api-tests
68+
pip install uv
8369
```
8470

85-
Tests w/out external APIs:
71+
For more installation options, see the [official UV installation guide](https://docs.astral.sh/uv/getting-started/installation/).
72+
73+
### Project Setup
74+
75+
Once UV is installed, set up the project dependencies:
76+
8677
```bash
87-
poetry run test-verbose
78+
# Install all dependencies including development and optional extras
79+
uv sync --all-extras
8880
```
8981

90-
Run a test on a specific file:
82+
This will create a virtual environment and install all necessary dependencies for development.
83+
84+
## Using the Makefile
85+
86+
We provide a comprehensive Makefile to streamline common development tasks. Here are the available commands:
87+
88+
| Command | Description |
89+
|---------|-------------|
90+
| `make install` | Installs all dependencies using UV |
91+
| `make redis-start` | Starts Redis Stack in a Docker container on ports 6379 and 8001 |
92+
| `make redis-stop` | Stops the Redis Stack Docker container |
93+
| `make format` | Runs code formatting and import sorting |
94+
| `make check-types` | Runs mypy type checking |
95+
| `make lint` | Runs formatting, import sorting, and type checking |
96+
| `make test` | Runs tests, excluding those that require API keys and/or remote network calls |
97+
| `make test-all` | Runs all tests, including those that require API keys and/or remote network calls |
98+
| `make test-notebooks` | Runs all notebook tests |
99+
| `make check` | Runs all linting targets and a subset of tests |
100+
| `make docs-build` | Builds the documentation |
101+
| `make docs-serve` | Serves the documentation locally |
102+
| `make clean` | Removes all generated files (cache, coverage, build artifacts, etc.) |
103+
104+
**Quick Start Example:**
91105
```bash
92-
poetry run test-verbose tests/unit/test_fields.py
106+
# Set up the project
107+
make install
108+
109+
# Start Redis Stack
110+
make redis-start
111+
112+
# Run linting and tests
113+
make check
114+
115+
# Stop Redis when done
116+
make redis-stop
93117
```
94118

95-
### Documentation
96-
Docs are served from the `docs/` directory.
119+
## Code Quality and Testing
120+
121+
### Linting and Formatting
122+
123+
We maintain high code quality standards. Before submitting your changes, ensure they pass our quality checks:
97124

98-
Build the docs. Generates the `_build/html` contents:
99125
```bash
100-
poetry run build-docs
126+
# Format code and sort imports
127+
make format
128+
129+
# Check types
130+
make check-types
131+
132+
# Or run all linting checks at once
133+
make lint
101134
```
102135

103-
Serve the documentation with a local webserver:
136+
You can also run these commands directly with UV:
104137
```bash
105-
poetry run serve-docs
138+
uv run ruff format
139+
uv run ruff check --fix
140+
uv run mypy redisvl
106141
```
107142

108-
### Getting Redis
143+
### Running Tests
144+
145+
#### TestContainers
146+
147+
RedisVL uses [Testcontainers Python](https://testcontainers-python.readthedocs.io/) for integration tests. Testcontainers provisions throwaway, on-demand containers for development and testing.
148+
149+
**Requirements:**
150+
- Local Docker installation such as:
151+
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
152+
- [Docker Engine on Linux](https://docs.docker.com/engine/install/)
109153

110-
In order for your applications to use RedisVL, you must have [Redis](https://redis.io) accessible with Search & Query features enabled on [Redis Cloud](https://redis.io/cloud/) or locally in docker with [Redis Stack](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/docker/):
154+
#### Test Commands
111155

112156
```bash
113-
docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest
157+
# Run tests without external API calls
158+
make test
159+
160+
# Run all tests including those requiring API keys
161+
make test-all
162+
163+
# Run tests on a specific file
164+
uv run pytest tests/unit/test_fields.py -v
165+
166+
# Run tests with coverage
167+
uv run pytest --cov=redisvl --cov-report=html
114168
```
115169

116-
Or from your makefile simply run:
170+
**Note:** Tests requiring external APIs need appropriate API keys set as environment variables.
171+
172+
## Documentation
173+
174+
Documentation is served from the `docs/` directory and built using Sphinx.
175+
176+
### Building and Serving Docs
117177

118178
```bash
119-
make redis-start
179+
# Build the documentation
180+
make docs-build
181+
182+
# Serve documentation locally at http://localhost:8000
183+
make docs-serve
120184
```
121185

122-
And then:
186+
Or using UV directly:
187+
```bash
188+
# Build docs
189+
uv run sphinx-build -b html docs docs/_build/html
190+
191+
# Serve docs
192+
uv run python -m http.server 8000 --directory docs/_build/html
193+
```
194+
195+
## Redis Setup
196+
197+
To develop and test RedisVL applications, you need Redis with Search & Query features. You have several options:
198+
199+
### Option 1: Redis Stack with Docker (Recommended for Development)
200+
123201
```bash
202+
# Start Redis Stack with RedisInsight GUI
203+
make redis-start
204+
205+
# This runs:
206+
# docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest
207+
208+
# Stop when finished
124209
make redis-stop
125210
```
126211

127-
This will also spin up the [FREE RedisInsight GUI](https://redis.io/insight/) at `http://localhost:8001`.
212+
This also provides the [FREE RedisInsight GUI](https://redis.io/insight/) at `http://localhost:8001`.
213+
214+
### Option 2: Redis Cloud
128215

129-
## How to Report a Bug
216+
For production-like testing, use [Redis Cloud](https://redis.io/cloud/) which provides managed Redis instances with Search & Query capabilities.
217+
218+
## Reporting Issues
130219

131220
### Security Vulnerabilities
132221

133-
**NOTE**: If you find a security vulnerability, do NOT open an issue.
134-
Email [Redis OSS (<oss@redis.com>)](mailto:oss@redis.com) instead.
222+
**⚠️ IMPORTANT**: If you find a security vulnerability, do NOT open a public issue. Email [Redis OSS](mailto:oss@redis.com) instead.
223+
224+
**Questions to determine if it's a security issue:**
225+
- Can I access something that's not mine, or something I shouldn't have access to?
226+
- Can I disable something for other people?
227+
228+
If you answer *yes* to either question, it's likely a security issue.
229+
230+
### Bug Reports
231+
232+
When filing a bug report, please include:
233+
234+
1. **Python version**: What version of Python are you using?
235+
2. **Package versions**: What versions of `redis` and `redisvl` are you using?
236+
3. **Steps to reproduce**: What did you do?
237+
4. **Expected behavior**: What did you expect to see?
238+
5. **Actual behavior**: What did you see instead?
239+
6. **Environment**: Operating system, Docker version (if applicable)
240+
7. **Code sample**: Minimal code that reproduces the issue
241+
242+
## Suggesting Features
243+
244+
Before suggesting a new feature:
245+
246+
1. **Check existing issues**: Search our [issue list](https://github.com/redis/redis-vl-python/issues) to see if someone has already proposed it
247+
2. **Consider the scope**: Ensure the feature aligns with RedisVL's goals
248+
3. **Provide details**: If you don't see anything similar, open a new issue that describes:
249+
- The feature you would like
250+
- How it should work
251+
- Why it would be beneficial
252+
- Any implementation ideas you have
135253

136-
In order to determine whether you are dealing with a security issue, ask
137-
yourself these two questions:
254+
## Pull Request Process
138255

139-
- Can I access something that's not mine, or something I shouldn't
140-
have access to?
141-
- Can I disable something for other people?
256+
1. **Fork and create a branch**: Create a descriptive branch name (e.g., `fix-search-bug` or `add-vector-similarity`)
257+
2. **Make your changes**: Follow our coding standards and include tests
258+
3. **Test thoroughly**: Ensure your changes work and don't break existing functionality
259+
4. **Update documentation**: Add or update documentation as needed
260+
5. **Submit your PR**: Include a clear description of what your changes do
142261

143-
If the answer to either of those two questions are *yes*, then you're
144-
probably dealing with a security issue. Note that even if you answer
145-
*no* to both questions, you may still be dealing with a security
146-
issue, so if you're unsure, just email us.
262+
### Review Process
147263

148-
### Everything Else
264+
- The core team reviews Pull Requests regularly
265+
- We provide feedback as soon as possible
266+
- After feedback, we expect a response within two weeks
267+
- PRs may be closed if they show no activity after this period
149268

150-
When filing an issue, make sure to answer these five questions:
269+
### PR Checklist
151270

152-
1. What version of python are you using?
153-
2. What version of `redis` and `redisvl` are you using?
154-
3. What did you do?
155-
4. What did you expect to see?
156-
5. What did you see instead?
271+
Before submitting your PR, ensure:
157272

158-
## How to Suggest a Feature or Enhancement
273+
- [ ] Code follows our style guidelines (`make lint` passes)
274+
- [ ] Tests pass (`make test` passes)
275+
- [ ] Documentation is updated if needed
276+
- [ ] Commit messages are clear and descriptive
277+
- [ ] PR description explains what changes were made and why
159278

160-
If you'd like to contribute a new feature, make sure you check our
161-
issue list to see if someone has already proposed it. Work may already
162-
be under way on the feature you want -- or we may have rejected a
163-
feature like it already.
279+
## Getting Help
164280

165-
If you don't see anything, open a new issue that describes the feature
166-
you would like and how it should work.
281+
If you need help or have questions:
167282

168-
## Code Review Process
283+
- **Issues**: Open an issue for bugs or feature requests
284+
- **Discussions**: Use GitHub Discussions for general questions
285+
- **Documentation**: Check our [documentation](https://www.redisvl.com/) for guides and examples
169286

170-
The core team looks at Pull Requests on a regular basis. We will give
171-
feedback as as soon as possible. After feedback, we expect a response
172-
within two weeks. After that time, we may close your PR if it isn't
173-
showing any activity.
287+
Thank you for contributing to RedisVL! 🚀

‎Makefile

Lines changed: 70 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,82 @@
1-
.PHONY: install format lint test test-all test-notebooks clean redis-start redis-stop check-types docs-build docs-serve check
1+
.PHONY: install format lint test test-all test-notebooks clean redis-start redis-stop check-types docs-build docs-serve check help
2+
.DEFAULT_GOAL := help
23

3-
install:
4-
poetry install --all-extras
4+
# Allow passing arguments to make targets (e.g., make test ARGS="--run-api-tests")
5+
ARGS ?=
56

6-
redis-start:
7+
install: ## Install the project and all dependencies
8+
@echo "🚀 Installing project dependencies with uv"
9+
uv sync --all-extras
10+
11+
redis-start: ## Start Redis Stack in Docker
12+
@echo "🐳 Starting Redis Stack"
713
docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest
814

9-
redis-stop:
10-
docker stop redis-stack
15+
redis-stop: ## Stop Redis Stack Docker container
16+
@echo "🛑 Stopping Redis Stack"
17+
docker stop redis-stack || true
18+
docker rm redis-stack || true
19+
20+
format: ## Format code with isort and black
21+
@echo "🎨 Formatting code"
22+
uv run isort ./redisvl ./tests/ --profile black
23+
uv run black ./redisvl ./tests/
24+
25+
check-format: ## Check code formatting
26+
@echo "🔍 Checking code formatting"
27+
uv run black --check ./redisvl
28+
29+
sort-imports: ## Sort imports with isort
30+
@echo "📦 Sorting imports"
31+
uv run isort ./redisvl ./tests/ --profile black
1132

12-
format:
13-
poetry run format
14-
poetry run sort-imports
33+
check-sort-imports: ## Check import sorting
34+
@echo "🔍 Checking import sorting"
35+
uv run isort ./redisvl --check-only --profile black
1536

16-
check-types:
17-
poetry run check-mypy
37+
check-lint: ## Run pylint
38+
@echo "🔍 Running pylint"
39+
uv run pylint --rcfile=.pylintrc ./redisvl
1840

19-
lint: format check-types
41+
check-types: ## Run mypy type checking
42+
@echo "🔍 Running mypy type checking"
43+
uv run python -m mypy ./redisvl
44+
45+
lint: format check-types ## Run all linting (format + type check)
46+
47+
test: ## Run tests (pass extra args with ARGS="...")
48+
@echo "🧪 Running tests"
49+
uv run python -m pytest -n auto --log-level=CRITICAL $(ARGS)
2050

21-
test:
22-
poetry run test-verbose
51+
test-verbose: ## Run tests with verbose output
52+
@echo "🧪 Running tests (verbose)"
53+
uv run python -m pytest -n auto -vv -s --log-level=CRITICAL $(ARGS)
2354

24-
test-all:
25-
poetry run test-verbose --run-api-tests
55+
test-all: ## Run all tests including API tests
56+
@echo "🧪 Running all tests including API tests"
57+
uv run python -m pytest -n auto --log-level=CRITICAL --run-api-tests $(ARGS)
2658

27-
test-notebooks:
28-
poetry run test-notebooks
59+
test-notebooks: ## Run notebook tests
60+
@echo "📓 Running notebook tests"
61+
uv run python -m pytest --nbval-lax ./docs/user_guide -vvv $(ARGS)
2962

30-
check: lint test
63+
check: lint test ## Run all checks (lint + test)
3164

32-
docs-build:
33-
poetry run build-docs
65+
docs-build: ## Build documentation
66+
@echo "📚 Building documentation"
67+
uv run make -C docs html
3468

35-
docs-serve:
36-
poetry run serve-docs
69+
docs-serve: ## Serve documentation locally
70+
@echo "🌐 Serving documentation at http://localhost:8000"
71+
@echo "📁 Make sure docs are built first with 'make docs-build'"
72+
uv run python -m http.server --directory docs/_build/html
3773

38-
clean:
74+
build: ## Build wheel and source distribution
75+
@echo "🏗️ Building distribution packages"
76+
uv build
77+
78+
clean: ## Clean up build artifacts and caches
79+
@echo "🧹 Cleaning up directory"
3980
find . -type d -name "__pycache__" -exec rm -rf {} +
4081
find . -type d -name ".pytest_cache" -exec rm -rf {} +
4182
find . -type d -name ".mypy_cache" -exec rm -rf {} +
@@ -45,3 +86,8 @@ clean:
4586
find . -type d -name "build" -exec rm -rf {} +
4687
find . -type d -name "*.egg-info" -exec rm -rf {} +
4788
find . -type d -name "_build" -exec rm -rf {} +
89+
find . -type f -name "*.log" -exec rm -rf {} +
90+
91+
help: ## Show this help message
92+
@echo "Available commands:"
93+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'

‎poetry.lock

Lines changed: 0 additions & 6478 deletions
This file was deleted.

‎pyproject.toml

Lines changed: 81 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,97 @@
1-
[tool.poetry]
1+
[project]
22
name = "redisvl"
33
version = "0.8.0"
44
description = "Python client library and CLI for using Redis as a vector database"
5-
authors = ["Redis Inc. <applied.ai@redis.com>"]
6-
license = "MIT"
5+
authors = [{ name = "Redis Inc.", email = "applied.ai@redis.com" }]
6+
requires-python = ">=3.9,<3.14"
77
readme = "README.md"
8-
homepage = "https://github.com/redis/redis-vl-python"
9-
repository = "https://github.com/redis/redis-vl-python"
10-
documentation = "https://docs.redisvl.com"
11-
keywords = ["ai", "redis", "redis-client", "vector-database", "vector-search"]
8+
license = "MIT"
9+
keywords = [
10+
"ai",
11+
"redis",
12+
"redis-client",
13+
"vector-database",
14+
"vector-search",
15+
]
1216
classifiers = [
13-
"Programming Language :: Python :: 3.9",
14-
"Programming Language :: Python :: 3.10",
15-
"Programming Language :: Python :: 3.11",
16-
"Programming Language :: Python :: 3.12",
17-
"Programming Language :: Python :: 3.13",
18-
"License :: OSI Approved :: MIT License",
17+
"Programming Language :: Python :: 3.9",
18+
"Programming Language :: Python :: 3.10",
19+
"Programming Language :: Python :: 3.11",
20+
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.13",
22+
"License :: OSI Approved :: MIT License",
1923
]
20-
packages = [{ include = "redisvl", from = "." }]
21-
22-
[tool.poetry.dependencies]
23-
python = ">=3.9,<3.14"
24-
numpy = ">=1.26.0,<3"
25-
pyyaml = ">=5.4,<7.0"
26-
redis = ">=5.0,<7.0"
27-
pydantic = ">=2,<3"
28-
tenacity = ">=8.2.2"
29-
ml-dtypes = ">=0.4.0,<1.0.0"
30-
python-ulid = ">=3.0.0"
31-
jsonpath-ng = ">=1.5.0"
32-
nltk = { version = "^3.8.1", optional = true }
33-
openai = { version = ">=1.1.0", optional = true }
34-
google-cloud-aiplatform = { version = ">=1.26,<2.0.0", optional = true }
35-
protobuf = { version = ">=5.28.0,<6.0.0", optional = true }
36-
cohere = { version = ">=4.44", optional = true }
37-
mistralai = { version = ">=1.0.0", optional = true }
38-
voyageai = { version = ">=0.2.2", optional = true }
39-
sentence-transformers = { version = "^3.4.0", optional = true }
40-
boto3 = { version = "^1.36.0", optional = true }
41-
urllib3 = { version = "<2.2.0", optional = true }
42-
scipy = [
43-
{ version = ">=1.9.0,<1.14", python = "<3.10", optional = true },
44-
{ version = ">=1.14.0,<1.16", python = ">=3.10", optional = true }
24+
dependencies = [
25+
"numpy>=1.26.0,<3",
26+
"pyyaml>=5.4,<7.0",
27+
"redis>=5.0,<7.0",
28+
"pydantic>=2,<3",
29+
"tenacity>=8.2.2",
30+
"ml-dtypes>=0.4.0,<1.0.0",
31+
"python-ulid>=3.0.0",
32+
"jsonpath-ng>=1.5.0",
4533
]
4634

47-
[tool.poetry.extras]
48-
mistralai = ["mistralai"]
49-
openai = ["openai"]
50-
nltk = ["nltk"]
51-
cohere = ["cohere"]
52-
voyageai = ["voyageai"]
53-
sentence-transformers = ["sentence-transformers"]
54-
vertexai = ["google-cloud-aiplatform", "protobuf"]
55-
bedrock = ["boto3", "urllib3"]
56-
57-
[tool.poetry.group.dev.dependencies]
58-
black = "^25.1.0"
59-
isort = "^5.6.4"
60-
pylint = "^3.1.0"
61-
pytest = "^8.1.1"
62-
pytest-asyncio = "^0.23.6"
63-
pytest-xdist = {extras = ["psutil"], version = "^3.6.1"}
64-
pre-commit = "^4.1.0"
65-
mypy = "^1.11.0"
66-
nbval = "^0.11.0"
67-
types-pyyaml = "*"
68-
types-pyopenssl = "*"
69-
testcontainers = "^4.3.1"
70-
cryptography = { version = ">=44.0.1", markers = "python_version > '3.9.1'" }
35+
[project.optional-dependencies]
36+
mistralai = ["mistralai>=1.0.0"]
37+
openai = ["openai>=1.1.0"]
38+
nltk = ["nltk>=3.8.1,<4"]
39+
cohere = ["cohere>=4.44"]
40+
voyageai = ["voyageai>=0.2.2"]
41+
sentence-transformers = ["sentence-transformers>=3.4.0,<4"]
42+
vertexai = [
43+
"google-cloud-aiplatform>=1.26,<2.0.0",
44+
"protobuf>=5.28.0,<6.0.0",
45+
]
46+
bedrock = [
47+
"boto3>=1.36.0,<2",
48+
"urllib3<2.2.0",
49+
]
7150

72-
[tool.poetry.group.docs.dependencies]
73-
sphinx = ">=4.4.0"
74-
pydata-sphinx-theme = "^0.15.2"
75-
nbsphinx = "^0.9.3"
76-
jinja2 = "^3.1.3"
77-
sphinx-copybutton = "^0.5.2"
78-
sphinx-favicon = "^1.0.1"
79-
sphinx-design = "^0.5.0"
80-
myst-nb = "^1.1.0"
51+
[project.urls]
52+
Homepage = "https://github.com/redis/redis-vl-python"
53+
Repository = "https://github.com/redis/redis-vl-python"
54+
Documentation = "https://docs.redisvl.com"
8155

82-
[tool.poetry.scripts]
56+
[project.scripts]
8357
rvl = "redisvl.cli.runner:main"
84-
format = "scripts:format"
85-
check-format = "scripts:check_format"
86-
sort-imports = "scripts:sort_imports"
87-
check-sort-imports = "scripts:check_sort_imports"
88-
check-lint = "scripts:check_lint"
89-
check-mypy = "scripts:check_mypy"
90-
test = "scripts:test"
91-
test-verbose = "scripts:test_verbose"
92-
test-notebooks = "scripts:test_notebooks"
93-
build-docs = "scripts:build_docs"
94-
serve-docs = "scripts:serve_docs"
9558

9659
[build-system]
97-
requires = ["poetry-core>=1.0.0"]
98-
build-backend = "poetry.core.masonry.api"
60+
requires = ["hatchling"]
61+
build-backend = "hatchling.build"
62+
63+
[dependency-groups]
64+
dev = [
65+
"black>=25.1.0,<26",
66+
"isort>=5.6.4,<6",
67+
"pylint>=3.1.0,<4",
68+
"pytest>=8.1.1,<9",
69+
"pytest-asyncio>=0.23.6,<0.24",
70+
"pytest-xdist[psutil]>=3.6.1,<4",
71+
"pre-commit>=4.1.0,<5",
72+
"mypy>=1.11.0,<2",
73+
"nbval>=0.11.0,<0.12",
74+
"types-pyyaml",
75+
"types-pyopenssl",
76+
"testcontainers>=4.3.1,<5",
77+
"cryptography>=44.0.1 ; python_version > '3.9.1'",
78+
]
79+
docs = [
80+
"sphinx>=4.4.0",
81+
"pydata-sphinx-theme>=0.15.2,<0.16",
82+
"nbsphinx>=0.9.3,<0.10",
83+
"jinja2>=3.1.3,<4",
84+
"sphinx-copybutton>=0.5.2,<0.6",
85+
"sphinx-favicon>=1.0.1,<2",
86+
"sphinx-design>=0.5.0,<0.6",
87+
"myst-nb>=1.1.0,<2",
88+
]
89+
90+
[tool.uv]
91+
default-groups = [
92+
"dev",
93+
"docs",
94+
]
9995

10096
[tool.black]
10197
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']

‎scripts.py

Lines changed: 0 additions & 83 deletions
This file was deleted.

‎uv.lock

Lines changed: 5275 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.