Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating dependencies and docker builds #461

Merged
merged 4 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tests
scripts
CHANGELOG.md
Dockerfile
docs
pyoxidizer.template.bzl
redis-doc
5 changes: 3 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ jobs:
test:
name: Pytest
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04"]
python: ["3.7", "3.8", "3.9", "3.10", "3.11.1"]
redis: [5, 6, 7]
python: ["3.7", "3.8", "3.9", "3.10", "3.11.1", "3.12.0"]
redis: [5, 6, 7, 7.2]
runs-on: ${{ matrix.os }}

services:
Expand Down
28 changes: 13 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
FROM python:3
FROM redis/redis-stack-server:latest

WORKDIR /iredis
COPY README.md poetry.lock pyproject.toml ./
COPY iredis ./iredis

RUN apt-get update && apt-get install -y --allow-unauthenticated \
redis-server && \
rm -rf /var/lib/apt/lists/*
COPY . /iredis

RUN apt-get update --fix-missing
RUN apt-get install -yqq python3 python3-pip python-is-python3
RUN python3 -m pip install poetry
WORKDIR /iredis
RUN poetry config virtualenvs.create false
RUN poetry build
RUN pip install dist/iredis*.tar.gz
WORKDIR /
RUN rm -rf .cache /var/cache/apt
RUN rm -rf /iredis

RUN python3 -m venv iredis_env && \
. iredis_env/bin/activate && \
pip install poetry && \
poetry install --no-dev && \
rm -rf ~/.cache

CMD ["sh","-c","redis-server --daemonize yes && . iredis_env/bin/activate && iredis"]
CMD ["sh", "-c", "/opt/redis-stack/bin/redis-stack-server --daemonize yes && iredis"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<p align="center">
<a href="https://github.com/laixintao/iredis/actions"><img src="https://github.com/laixintao/iredis/workflows/Test/badge.svg" alt="Github Action"></a>
<a href="https://badge.fury.io/py/iredis"><img src="https://badge.fury.io/py/iredis.svg" alt="PyPI version"></a>
<img src="https://badgen.net/badge/python/3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10/" alt="Python version">
<img src="https://badgen.net/badge/python/3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10/" alt="Python version">
<a href="https://pepy.tech/project/iredis"><img src="https://pepy.tech/badge/iredis" alt="Download stats"></a>
</p>

Expand Down
34 changes: 5 additions & 29 deletions poetry.lock

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

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Database",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
]

packages = [
{ include = "iredis" },
{ include = "tests", format = "sdist" },
]

[tool.poetry.dependencies]
Expand All @@ -36,11 +37,11 @@ Pygments = "^2"
mistune = "^3.0"
configobj = "^5.0"
click = "^8.0"
pendulum = "^2.0"
pendulum = "^2.1.0"
# wcwidth 0.2.x uses pkg_resources which is not supported by PyOxidizer
wcwidth = "0.1.9"
packaging = "^23.0"
redis = "^4.5.3"
redis = "^5.0.0"

[tool.poetry.dev-dependencies]
pytest = "^7.2"
Expand Down
Loading