Skip to content

Commit 81e4d0b

Browse files
authored
Merge branch 'master' into master
2 parents 8682814 + 8d949a3 commit 81e4d0b

File tree

214 files changed

+47761
-7876
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+47761
-7876
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
_Please make sure to review and check all of these items:_
44

55
- [ ] Does `$ tox` pass with this change (including linting)?
6-
- [ ] Does travis tests pass with this change (enable it first in your forked repo and wait for the travis build to finish)?
6+
- [ ] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
77
- [ ] Is the new or changed code fully tested?
88
- [ ] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
9+
- [ ] Is there an example added to the examples folder (if applicable)?
10+
- [ ] Was the change added to CHANGES file?
911

1012
_NOTE: these things are not required to open a PR and can be done
1113
afterwards / while the PR is open._

.github/release-drafter-config.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name-template: 'Version $NEXT_PATCH_VERSION'
2+
tag-template: 'v$NEXT_PATCH_VERSION'
3+
autolabeler:
4+
- label: 'maintenance'
5+
files:
6+
- '*.md'
7+
- '.github/*'
8+
- label: 'bug'
9+
branch:
10+
- '/bug-.+'
11+
- label: 'maintenance'
12+
branch:
13+
- '/maintenance-.+'
14+
- label: 'feature'
15+
branch:
16+
- '/feature-.+'
17+
categories:
18+
- title: '🔥 Breaking Changes'
19+
labels:
20+
- 'breakingchange'
21+
- title: '🚀 New Features'
22+
labels:
23+
- 'feature'
24+
- 'enhancement'
25+
- title: '🐛 Bug Fixes'
26+
labels:
27+
- 'fix'
28+
- 'bugfix'
29+
- 'bug'
30+
- title: '🧰 Maintenance'
31+
label: 'maintenance'
32+
change-template: '- $TITLE (#$NUMBER)'
33+
exclude-labels:
34+
- 'skip-changelog'
35+
template: |
36+
## Changes
37+
38+
$CHANGES
39+
40+
## Contributors
41+
We'd like to thank all the contributors who worked on this release!
42+
43+
$CONTRIBUTORS
44+

.github/workflows/codeql-analysis.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ master ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ master ]
20+
21+
jobs:
22+
analyze:
23+
name: Analyze
24+
runs-on: ubuntu-latest
25+
permissions:
26+
actions: read
27+
contents: read
28+
security-events: write
29+
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
language: [ 'python' ]
34+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
35+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
36+
37+
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v2
40+
41+
# Initializes the CodeQL tools for scanning.
42+
- name: Initialize CodeQL
43+
uses: github/codeql-action/init@v1
44+
with:
45+
languages: ${{ matrix.language }}
46+
# If you wish to specify custom queries, you can do so here or in a config file.
47+
# By default, queries listed here will override any specified in a config file.
48+
# Prefix the list here with "+" to use these queries and those in the config file.
49+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
50+
51+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
52+
# If this step fails, then you should remove it and run the build manually (see below)
53+
- name: Autobuild
54+
uses: github/codeql-action/autobuild@v1
55+
56+
# ℹ️ Command-line programs to run using the OS shell.
57+
# 📚 https://git.io/JvXDl
58+
59+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
60+
# and modify them (or add more) to build your code if your project
61+
# uses a compiled language
62+
63+
#- run: |
64+
# make bootstrap
65+
# make release
66+
67+
- name: Perform CodeQL Analysis
68+
uses: github/codeql-action/analyze@v1

.github/workflows/install_and_test.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
SUFFIX=$1
6+
if [ -z ${SUFFIX} ]; then
7+
echo "Supply valid python package extension such as whl or tar.gz. Exiting."
8+
exit 3
9+
fi
10+
11+
script=`pwd`/${BASH_SOURCE[0]}
12+
HERE=`dirname ${script}`
13+
ROOT=`realpath ${HERE}/../..`
14+
15+
cd ${ROOT}
16+
DESTENV=${ROOT}/.venvforinstall
17+
if [ -d ${DESTENV} ]; then
18+
rm -rf ${DESTENV}
19+
fi
20+
python -m venv ${DESTENV}
21+
source ${DESTENV}/bin/activate
22+
pip install --upgrade --quiet pip
23+
pip install --quiet -r dev_requirements.txt
24+
invoke devenv
25+
invoke package
26+
27+
# find packages
28+
PKG=`ls ${ROOT}/dist/*.${SUFFIX}`
29+
ls -l ${PKG}
30+
31+
TESTDIR=${ROOT}/STAGETESTS
32+
if [ -d ${TESTDIR} ]; then
33+
rm -rf ${TESTDIR}
34+
fi
35+
mkdir ${TESTDIR}
36+
cp -R ${ROOT}/tests ${TESTDIR}/tests
37+
cd ${TESTDIR}
38+
39+
# install, run tests
40+
pip install ${PKG}
41+
# Redis tests
42+
pytest -m 'not onlycluster'
43+
# RedisCluster tests
44+
CLUSTER_URL="redis://localhost:16379/0"
45+
pytest -m 'not onlynoncluster and not redismod and not ssl' --redis-url=${CLUSTER_URL}

.github/workflows/integration.yaml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'docs/**'
7+
- '**/*.rst'
8+
- '**/*.md'
9+
branches:
10+
- master
11+
- '[0-9].[0-9]'
12+
pull_request:
13+
branches:
14+
- master
15+
- '[0-9].[0-9]'
16+
17+
jobs:
18+
19+
lint:
20+
name: Code linters
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: install python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.9
28+
- name: run code linters
29+
run: |
30+
pip install -r dev_requirements.txt
31+
invoke linters
32+
33+
run-tests:
34+
runs-on: ubuntu-latest
35+
timeout-minutes: 30
36+
strategy:
37+
max-parallel: 15
38+
matrix:
39+
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy-3.7']
40+
test-type: ['standalone', 'cluster']
41+
connection-type: ['hiredis', 'plain']
42+
env:
43+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
44+
name: Python ${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}} tests
45+
steps:
46+
- uses: actions/checkout@v2
47+
- name: install python
48+
uses: actions/setup-python@v2
49+
with:
50+
python-version: ${{ matrix.python-version }}
51+
- name: run tests
52+
run: |
53+
pip install -U setuptools wheel
54+
pip install -r dev_requirements.txt
55+
tox -e ${{matrix.test-type}}-${{matrix.connection-type}}
56+
- name: Upload codecov coverage
57+
uses: codecov/codecov-action@v2
58+
with:
59+
fail_ci_if_error: false
60+
token: ${{ secrets.CODECOV_TOKEN }}
61+
62+
build_and_test_package:
63+
name: Validate building and installing the package
64+
runs-on: ubuntu-latest
65+
strategy:
66+
matrix:
67+
extension: ['tar.gz', 'whl']
68+
steps:
69+
- uses: actions/checkout@v2
70+
- name: install python
71+
uses: actions/setup-python@v2
72+
with:
73+
python-version: 3.9
74+
- name: Run installed unit tests
75+
run: |
76+
bash .github/workflows/install_and_test.sh ${{ matrix.extension }}
77+
78+
install_package_from_commit:
79+
name: Install package from commit hash
80+
runs-on: ubuntu-latest
81+
strategy:
82+
matrix:
83+
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy-3.7']
84+
steps:
85+
- uses: actions/checkout@v2
86+
- name: install python ${{ matrix.python-version }}
87+
uses: actions/setup-python@v2
88+
with:
89+
python-version: ${{ matrix.python-version }}
90+
- name: install from pip
91+
run: |
92+
pip install --quiet git+${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git@${GITHUB_SHA}

.github/workflows/pypi-publish.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish tag to Pypi
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
9+
build_and_package:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: install python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: 3.9
17+
- name: Install dev tools
18+
run: |
19+
pip install -r dev_requirements.txt
20+
pip install twine wheel
21+
22+
- name: Build package
23+
run: |
24+
python setup.py build
25+
python setup.py sdist bdist_wheel
26+
27+
- name: Publish to Pypi
28+
uses: pypa/gh-action-pypi-publish@release/v1
29+
with:
30+
user: __token__
31+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/release-drafter.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- master
8+
9+
jobs:
10+
update_release_draft:
11+
runs-on: ubuntu-latest
12+
steps:
13+
# Drafts your next Release notes as Pull Requests are merged into "master"
14+
- uses: release-drafter/release-drafter@v5
15+
with:
16+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
17+
config-name: release-drafter-config.yml
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ vagrant/.vagrant
1414
env
1515
venv
1616
coverage.xml
17+
.venv*
18+
*.xml
19+
.coverage*
20+
docker/stunnel/keys

.mypy.ini

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[mypy]
2+
#, docs/examples, tests
3+
files = redis
4+
check_untyped_defs = True
5+
follow_imports_for_stubs asyncio.= True
6+
#disallow_any_decorated = True
7+
disallow_subclassing_any = True
8+
#disallow_untyped_calls = True
9+
disallow_untyped_decorators = True
10+
#disallow_untyped_defs = True
11+
implicit_reexport = False
12+
no_implicit_optional = True
13+
show_error_codes = True
14+
strict_equality = True
15+
warn_incomplete_stub = True
16+
warn_redundant_casts = True
17+
warn_unreachable = True
18+
warn_unused_ignores = True
19+
disallow_any_unimported = True
20+
#warn_return_any = True
21+
22+
[mypy-redis.asyncio.lock]
23+
# TODO: Remove once locks has been rewritten
24+
ignore_errors = True

.readthedocs.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
3+
python:
4+
install:
5+
- requirements: ./docs/requirements.txt
6+
7+
build:
8+
os: ubuntu-20.04
9+
tools:
10+
python: "3.9"
11+
12+
sphinx:
13+
configuration: docs/conf.py

.travis.yml

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

0 commit comments

Comments
 (0)