Skip to content

Commit

Permalink
print version
Browse files Browse the repository at this point in the history
  • Loading branch information
rbs333 committed May 21, 2024
1 parent 3fb196d commit 9e54ab7
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 41 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9, 3.10, 3.11]
connection: ['hiredis', 'plain']
redis-stack-version: ['6.2.6-v9', 'latest', 'edge']
python-version: [3.11]
connection: ['plain']
redis-stack-version: ['latest']

services:
redis:
Expand Down
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM python:3.11

ENV PIP_DISABLE_PIP_VERSION_CHECK=on
ENV REDIS_HOST="redis"

RUN pip install poetry

# Set working directory
WORKDIR /app

# Install project dependencies
COPY pyproject.toml poetry.lock /app/

# Copy the notebooks from getting_started
# COPY getting_started /app/getting_started
COPY python-examples/auto_test /app/auto_test


RUN poetry config virtualenvs.create false && poetry install --all-extras

# Run tests
CMD ["poetry", "run", "pytest", "--nbval", "python-examples/auto_test/01_redis-py.ipynb"]
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3'
services:
app:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/app
redis:
image: redis/redis-stack-server:latest
ports:
- "6379:6379"
31 changes: 10 additions & 21 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ pdf2image = "^1.17.0"
nbval = "^0.11.0"
langchain-community = "^0.2.0"
redis = "^5.0.4"
redispy = "^3.0.0"

[tool.poetry.extras]
openai = ["openai"]
Expand Down Expand Up @@ -87,15 +86,6 @@ exclude = '''
log_cli = true
asyncio_mode = "auto"

[tool.coverage.run]
source = ["redisvl"]

[tool.coverage.report]
ignore_errors = true

[tool.coverage.html]
directory = "htmlcov"

[tool.mypy]
warn_unused_configs = true
ignore_missing_imports = true
1 change: 0 additions & 1 deletion python-examples/advanced_capabilities/propositions.json

Large diffs are not rendered by default.

51 changes: 45 additions & 6 deletions python-examples/auto_test/01_redis-py.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {
"id": "dyPfCO3pkB7M"
},
Expand Down Expand Up @@ -194,9 +194,20 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import redis\n",
"import json\n",
Expand All @@ -212,9 +223,37 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"3.0.0\n"
]
}
],
"source": [
"print(redis.__version__)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"client.dbsize() # should be empty"
]
Expand Down Expand Up @@ -1345,7 +1384,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.11.9"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down

0 comments on commit 9e54ab7

Please sign in to comment.