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

convert to pyproject.toml #3466

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
sudo apt-get install -yqq pandoc make
- name: run code linters
run: |
pip install -r requirements.txt -r dev_requirements.txt -r docs/requirements.txt
pip install .[dev,docbuild]
invoke build-docs

- name: upload docs
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@ env:
CURRENT_REDIS_VERSION: '7.4.1'

jobs:
dependency-audit:
name: Dependency audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pypa/[email protected]
with:
inputs: requirements.txt dev_requirements.txt
ignore-vulns: |
GHSA-w596-4wvx-j9j6 # subversion related git pull, dependency for pytest. There is no impact here.

lint:
name: Code linters
runs-on: ubuntu-latest
Expand All @@ -54,7 +43,7 @@ jobs:
cache: 'pip'
- name: run code linters
run: |
pip install -r dev_requirements.txt
pip install .[dev]
invoke linters

redis_version:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ jobs:
python-version: 3.9
- name: Install dev tools
run: |
pip install -r dev_requirements.txt
pip install twine wheel
pip install .[dev]
pip install twine wheel build

- name: Build package
run: |
python setup.py build
python setup.py sdist bdist_wheel
python -m build

- name: Basic package test prior to upload
run: |
Expand Down
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ Here's how to get started with your code contribution:
1. Create your own fork of redis-py
2. Do the changes in your fork
3.
*Create a virtualenv and install the development dependencies from the dev_requirements.txt file:*
*Create a virtualenv and install the project with dependencies:*

a. python -m venv .venv
b. source .venv/bin/activate
c. pip install -r dev_requirements.txt
c. pip install -r requirements.txt
c. pip install -e .

4. If you need a development environment, run `invoke devenv`. Note: this relies on docker-compose to build environments, and assumes that you have a version supporting [docker profiles](https://docs.docker.com/compose/profiles/).
5. While developing, make sure the tests pass by running `invoke tests`
Expand Down
6 changes: 0 additions & 6 deletions INSTALL

This file was deleted.

6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

19 changes: 0 additions & 19 deletions dev_requirements.txt

This file was deleted.

6 changes: 2 additions & 4 deletions doctests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ See https://github.com/redis-stack/redis-stack-website#readme for more details.
## How to test examples

Examples are standalone python scripts, committed to the *doctests* directory. These scripts assume that the
```requirements.txt``` and ```dev_requirements.txt``` from this repository have been installed, as per below.
dependencies from this repository have been installed, as per below.

```bash
pip install -r requirements.txt
pip install -r dev_requirements.txt
pip install -r doctests/requirements.txt
pip install .[dev,doctest]
```

Note - the CI process, runs the basic ```black``` and ```isort``` linters against the examples. Assuming
Expand Down
5 changes: 0 additions & 5 deletions doctests/requirements.txt

This file was deleted.

91 changes: 91 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
[build-system]
requires = ["setuptools>=42"]
build-backend = "setuptools.build_meta"

[project]
name = "redis"
version = "5.3.0b4"
description = "Python client for Redis database and key-value store"
readme = "README.md"
keywords = ["Redis", "key-value store", "database"]
license = {text = "MIT"}
authors = [
{name = "Redis Inc.", email = "[email protected]"}
]
requires-python = ">=3.8"
dependencies = [
"async-timeout>=4.0.3; python_full_version < \"3.11.3\"",
"PyJWT~=2.9.0"
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy"
]

[project.urls]
Homepage = "https://github.com/redis/redis-py"
Documentation = "https://redis.readthedocs.io/en/latest/"
Repository = "https://github.com/redis/redis-py"
Issues = "https://github.com/redis/redis-py/issues"
Changes = "https://github.com/redis/redis-py/releases"

[project.optional-dependencies]
hiredis = ["hiredis>=3.0.0"]
ocsp = ["cryptography>=36.0.1", "pyopenssl==23.2.1", "requests>=2.31.0"]
dev = [
"black==24.3.0",
"click==8.0.4",
"flake8-isort",
"flake8",
"flynt~=0.69.0",
"invoke==2.2.0",
"mock",
"packaging>=20.4",
"pytest",
"pytest-asyncio>=0.23.0,<0.24.0",
"pytest-cov",
"pytest-profiling==1.7.0",
"pytest-timeout",
"ujson>=4.2.0",
"uvloop",
"vulture>=2.3.0",
"wheel>=0.30.0",
"numpy>=1.24.0",
"redis-entraid>=0.1.0b1"
]
docbuild = [
"sphinx>=5.0,<7.0",
"docutils<0.18",
"nbsphinx",
"sphinx_gallery",
"ipython",
"sphinx-autodoc-typehints",
"furo",
"pandoc"
]
doctest = [
"numpy",
"pandas",
"requests",
"sentence_transformers",
"tabulate"
]

[tool.setuptools.packages.find]
where = ["redis", "tests"]

[tool.setuptools.package-data]
redis = ["py.typed"]
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

64 changes: 0 additions & 64 deletions setup.py

This file was deleted.

4 changes: 2 additions & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def devenv(c, endpoints="all"):
@task
def build_docs(c):
"""Generates the sphinx documentation."""
run("pip install -r docs/requirements.txt")
run("pip install .[doc]")
run("make -C docs html")


Expand Down Expand Up @@ -97,4 +97,4 @@ def clean(c):
@task
def package(c):
"""Create the python packages"""
run("python setup.py sdist bdist_wheel")
run("python -m build")
Empty file.
Empty file added tests/test_parsers/__init__.py
Empty file.
Empty file added tests/testdata/__init__.py
Empty file.
Loading